Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

Merge remote-tracking branch 'origin/main' into feat/orchestrator-failure-notice

reviewd6a07e012780
diff --cc CONTRIBUTING.md
index 58c7b8559,588d1445a..afd995829
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@@ -314,16 -314,23 +314,33 @@@ anything else. Board-level fields survi
against the renderer's dispositions — deliberately cross-layer, because that is the only way
"every verb" is checked rather than remembered.
+- **A new canvas-control open path must record who opened the node.** When a station stops, the
+ agent that opened it is told (`src/core/agents/station-notice.ts`) — and a rope alone cannot say
+ who that is, because an `--after` node is roped to the stations it waited on too, with the same id
+ shape. So every open verb stamps `data.openedBy` where it draws the opener's rope
+ (`lib/stationOpener.ts`; the live paths get it from `connect`, the off-canvas and cold-open writes
+ call `withOpenedBy` themselves). An open path that ropes without stamping compiles and passes, and
+ its stations fail in silence; `src/main/station-notice-wiring.test.ts` pins the sites that exist.
+ The notice text is app-authored and fixed — never add anything the STATION wrote to it (its
+ output is exactly where an injection aimed at the orchestrator would come from).
+
+ - **A location from `.nodeterm/settings.json` is hostile input.** That file is committed to the
+ repository, so anyone who can commit wrote it. A worktree location it produces must pass
+ `sharedWorktreeLocationRefusal` (`src/shared/worktree-location.ts`) on every create path, and
+ every `git worktree add` passes the real-path backstop in `GitService.worktreeAdd`. If you add
+ another setting that names a place on disk the app will WRITE to, give it the same two layers:
+ a lexical rule keyed on `source: 'shared'`, and a check on real paths where the write happens.
+
+ - **A node you just created is not in `nodesRef` yet, and a `setNodes` updater is not "now".**
+ `nodesRef` mirrors React state at render time, so a frame made this tick is invisible to the next
+ line that looks it up — and an updater runs at RENDER time, after any zustand write may already
+ have flushed a render that mirrored `nodesRef` back to a list without it. Compute anything that
+ reads `nodesRef` (parenting, a cwd, a position) BEFORE `setNodes`, and when one flow creates a
+ frame and a node inside it, do both in one synchronous block (`attachWorktree` writes the new
+ frame into `nodesRef` for exactly this). Every worktree creation goes through
+ `createBoundWorktree` (`renderer/lib/worktreeCreate.ts`); do not add a fourth copy of
+ "`git worktree add`, then bind".
+
- **A dialog raised on someone else's behalf must know that request's lifetime.** Main abandons a
canvas-control request after 120 s and tells the renderer nothing, so an unanswered dialog sat
there forever AND held the one-confirm-at-a-time guard, which refused every later destructive
diff --cc src/core/canvas-control-core.ts
index 26bb36215,c8c33d231..7534ae53a
--- a/src/core/canvas-control-core.ts
+++ b/src/core/canvas-control-core.ts
@@@ -23,12 -23,7 +23,13 @@@ import { nodeColorChoices } from '@shar
import { offScreenGuidanceLines } from '@shared/control-off-screen'
import { codexThreadIdentityResolverSh } from './codex-thread-identity-sh'
import { ISSUE_SESSION_COLUMNS, issueLaunchPrompt, parseIssueArg } from '../shared/github-issue-ref'
+import {
+ STATION_NOTICE_COMMON_OPTIONS,
+ STATION_QUESTION_NOTICE_MS,
+ STATION_TRIGGERS
+} from '../shared/station-notice'
+import { STATION_NOTICE_FROM } from '../shared/agents/agent-messaging'
+ import { ISSUE_BRANCH_SLUG_MAX, issueWorktreeBranch } from '../shared/issue-worktree'
/**
* The messaging verbs' retry guidance, RENDERED from `RETRYABLE` — the table is the source, and