fix(workspace): bind each console pane to the lane it shows
LaneConsolePane kept handle/cwd/prompt/runHistory in local state that was never reset when the laneId prop changed, so selecting another lane swapped the header and detail panel while the terminal stayed attached to the previous lane's tmux session. Reset the pane on lane switch and re-attach immediately to the new lane's live run from GET /api/run when it has one, falling back to that lane's setup form when it does not. `lanes`/`activeRuns` are read through a ref so the page's 5s poll cannot wipe a half-typed prompt.
This commit is contained in:
@@ -315,6 +315,8 @@ The dashboard web UI merges lanes and runs into a single **Workspace** page acce
|
||||
|
||||
Run history is per lane, queryable via `GET /api/run/history?laneId=<n>`.
|
||||
|
||||
**A console pane follows the lane it shows.** Selecting another lane — from the lane strip in layout 1, or from a pane's own lane picker in layouts 2 and 4 — swaps that pane's cwd, run history and terminal over to the new lane. If the new lane already has a live run in `GET /api/run`, the pane re-attaches to it immediately, so each lane sticks to its own `ccam-lane-<id>` tmux session; if it has none, the pane shows that lane's setup form. Nothing of the previous lane (a half-typed prompt, its terminal) carries over.
|
||||
|
||||
### Active runs list
|
||||
|
||||
The **Active runs** button in the console header opens the merged run list. It shows three sources in one place, newest first:
|
||||
|
||||
Reference in New Issue
Block a user