mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-19 12:49:32 +01:00
docs(adopt): document the routes and the overlay, correct stale comments
The two routes are public under /api/v1, so they get an API reference section. The overlay gets an architecture note and a CLAUDE.md rule: an adopted session has session.remote and session.docker undefined and a neutral workingDir, so any new code that reads workingDir as a workspace must also test isAdopted. That is the class of bug this round fixed a dozen times. Records a measured limit: while the view exists an owner's kill-session leaves the window alive under it until the tab closes. Comments that still called workingDir the foreign pane's cwd now say what is true since the wrapper got its neutral folder. Also drops a zh-CN key that duplicated an existing one, and updates the two structure tests pinned on the lines this round changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d62fa10c01
commit
1f6f21fd24
15 files changed
+148
-34
No files matched your search
+7
-7
@@ -461,13 +461,13 @@ export function resolveMuxAttachCwd(
|
||||
//
|
||||
// ⚠️ An ADOPTED session needs the same treatment and does NOT get it from the
|
||||
// two checks above: its connection facts live on `adopt.docker`/`adopt.remote`,
|
||||
// so `session.docker` is undefined even for an in-container adoption. Its
|
||||
// `workingDir` is the FOREIGN pane's cwd — a path that routinely does not exist
|
||||
// on this host. Measured against a real container: adopting an in-container
|
||||
// session produced `workingDir: /workspace/pythonserver`, the local PTY spawn
|
||||
// inherited it as its cwd, and the session came up with `pid: null` and a blank
|
||||
// terminal while the wrapper tmux session and the in-container grouped view had
|
||||
// both been created successfully — i.e. it looked half-alive rather than failed.
|
||||
// so `session.docker` is undefined even for an in-container adoption. Its pane
|
||||
// only attaches, so no folder on this host means anything to it. Measured against
|
||||
// a real container, when `workingDir` still held the foreign pane's cwd: the local
|
||||
// PTY spawn inherited `/workspace/pythonserver`, and the session came up with
|
||||
// `pid: null` and a blank terminal while the wrapper tmux session and the
|
||||
// in-container grouped view had both been created successfully, so it looked
|
||||
// half-alive rather than failed.
|
||||
return remote || docker || adopt ? '/tmp' : workingDir;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user