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.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
Merge approved PR871 preserving account refusals and IME adapter
review5be2eaf50771
diff --cc CLAUDE.mdindex 14553a9b6,9c142e324..7e1c35aab--- a/CLAUDE.md+++ b/CLAUDE.md@@@ -4951,14 -4951,37 +4951,45 @@@ sessions is a hazard whatever kills itWhen a change is genuinely desktop-only (native menus, auto-update, Keychain), say so; thepoint is to make the call consciously, not to leave the other surfaces to rot.+Remote Codex safety (#736): `spawnNew` requires managed SSH Codex accounts (including custom+Codex harnesses and known agent-less login terminals) to have a safe id in the saved Codex account+list and a safe resolved `remoteHome`. `remoteAccountScopeEnvArgs` then supplies the private+`CODEX_HOME` and account marker. An unresolved or unsafe home must refuse before env staging/spawn,+not fall back to the host's system login. System Codex retains the host environment even before+home discovery during early attach. Never guess HOME/CODEX_HOME. Desktop and Server share this+core gate; Desktop supports the remote lifecycle, while Server account management remains unavailable.++ ## Media playback lifetime (#680)++ Audio routes through `isMediaFile` to the existing persisted `video` kind and native audio controls.+ Legacy audio editor nodes migrate on load. Desktop uses the existing local/SSH allowlist; Server+ and relay retain their explicit media transport degradation. Native mobile does not consume these+ React nodes; its own player/IME behavior requires a separate device check.++ Remote cache entries requested in this run are retained until exit, including cache hits; pruning+ waits are coordinated with a concurrent cache reader. The 20-entry cap is soft for retained files,+ so disk use may grow in a long run; prior-run entries are eligible again after restart. `mediaRange`+ handles suffix ranges and rejects unsatisfiable ones without weakening the serve-time path jail.++ ## Subagent reload replay (#680)++ `core/subagent-replay.ts` retains at most 512 running starts for the existing WORKING_STALE_MS,+ with original host timestamps. The shared mirror event path feeds it (including synthetic async+ ends); session boundaries and clearNode discard it. Both shells expose the same read, and desktop+ preload / browser / relay subscribe before requesting it. Only lifecycle events wait behind the+ snapshot (bounded to 512 events / 3 seconds); live permission alerts are not delayed or replayed.+ No disk restore, transcript backlog, completed-card replay, or authorization evidence is provided.+ A host restart or a missed original start is still outside this recovery.+++ ## IME mode switching (#680)++ `terminal/ime-mode-switch.ts` adapts xterm 5.5's composition helper after `open()` in both terminal+ surfaces. Caps Lock must not finalize an active composition: the subsequent native compositionend+ owns that commit. The test executes the dependency's real helper, with an unpatched double-send+ control. This pins one event ordering, not every native IME; macOS Chinese Caps Lock still needs a+ device run, including insertText and compositionend orderings. Revalidate the adapter on xterm upgrades.+### Standing phone consent lifetime (#819)A browse socket can close before the human clicks the SAS dialog. `core/phone-approval.ts` retainsdiff --cc CONTRIBUTING.mdindex f6564d870,7f4ff2578..ceb88e159--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@@ -819,14 -819,11 +819,19 @@@ Two files, two audiencesinvariant that only lives in a commit message is one refactor away from being violated by someonewho never saw it.+Remote Codex account safety (#736): managed SSH Codex sessions and agent-less login terminals+require a known safe account id and a safe resolved remote home before spawning. The remote env+builder supplies their private `CODEX_HOME`; never fall back to the system login when that scope+is unavailable. System SSH Codex retains the host environment, including during early attach+before home discovery; never inject a guessed `HOME` or `CODEX_HOME`. Custom Codex harnesses use+the same guard. Desktop supports remote account lifecycle; the Server browser still explicitly+rejects managed Codex account management.++ - Media URLs live for the app run. Remote cache pruning must keep files already handed to+ players; the cache cap is soft until restart. Use the existing `video` node for audio too.+ - Subagent reload replay is display-only and current-host-only. Never replay status/permission+ events or treat a replayed card as verified process ownership; subscribe before taking its snapshot.+**Phone consent belongs to the verified handshake, not the browse socket.** A standing phone'sSAS request survives transport closure only until its 120-second deadline; approval requires theissued id and displayed box key together. Keep request/reply outcomes distinct (stale request,diff --cc src/renderer/components/kanban/ModalTerminal.tsxindex 62a9cc3db,27ed48748..5f81189e9--- a/src/renderer/components/kanban/ModalTerminal.tsx+++ b/src/renderer/components/kanban/ModalTerminal.tsx@@@ -1,4 -1,4 +1,6 @@@+import { ptyRefusal } from '@shared/pty-refusal'+++ import { patchImeModeSwitch } from '../../terminal/ime-mode-switch'import { useCallback, useEffect, useRef, useState } from 'react'import { Terminal } from '@xterm/xterm'import { FitAddon } from '@xterm/addon-fit'diff --cc src/renderer/nodes/TerminalNode.tsxindex 4dac6d06e,5c0b6db6a..6e925826f--- a/src/renderer/nodes/TerminalNode.tsx+++ b/src/renderer/nodes/TerminalNode.tsx@@@ -1,4 -1,5 +1,7 @@@+import { ptyRefusal } from '@shared/pty-refusal'+++ import { patchImeModeSwitch } from '../terminal/ime-mode-switch'+import { deliverRelayInitialLaunch } from '../terminal/relay-initial-launch'import { commitLaunch } from '../terminal/launch-attempt'import { isLaunchShell } from '@shared/agents/pane'