diff --git a/docs/specs/alert.md b/docs/specs/alert.md index d9374e52c..55f955250 100644 --- a/docs/specs/alert.md +++ b/docs/specs/alert.md @@ -418,6 +418,8 @@ Source of truth: `SettingsDialog` and `TOPICS` in `lib/src/components/SettingsDi **Must project every Workspace, active or not.** The Activity store spans the whole Window, so what scopes it to one Workspace is the membership each mounted Wall publishes — panes ∪ doors, on every layout commit. +**Must retain TODO and attention by stable Surface ID across a Workspace move and republish membership on both sides**, without replaying notifications on remount. GUI focus acknowledges without input; CLI movement alone does not acknowledge. Pinned by `preserves Session identity, TODO and retained cwd, retires the source ref, and recomputes both unions` in `lib/src/components/WorkspaceWindow.test.tsx`. + Source of truth: `computeWorkspaceUnion` in `lib/src/lib/workspace-union.ts`; `setWorkspaceSurfaces` in `lib/src/lib/workspace-surfaces.ts`; `lib/src/lib/workspace-union.test.ts`. Where it surfaces is host-specific: diff --git a/docs/specs/dor-browser.md b/docs/specs/dor-browser.md index 76f40f10b..e43568840 100644 --- a/docs/specs/dor-browser.md +++ b/docs/specs/dor-browser.md @@ -971,6 +971,8 @@ Source of truth: `lib/src/lib/platform/iframe-proxy-types.ts`, `vscode-ext/src/message-router.ts`, `vscode-ext/src/webview-html.ts`, `standalone/src/tauri-adapter.ts`. +A moved iframe Surface remounts at its saved URL after consent: `docs/specs/layout.md` → Moving Surfaces between Workspaces. + ## Future - Stable agent-browser profile/state persistence so pop-out preserves logins, diff --git a/docs/specs/dor-cli.md b/docs/specs/dor-cli.md index 118832f67..5242731f9 100644 --- a/docs/specs/dor-cli.md +++ b/docs/specs/dor-cli.md @@ -267,9 +267,7 @@ and each host's hop in `standalone/src/tauri-adapter.ts`, ## Handle Model -`Window ⊃ Workspace ⊃ Pane ⊃ Surface` (`docs/specs/glossary.md`). **A command's -positional target is always a Surface; a container is named by `--workspace -`** ([dor workspace](#dor-workspace)). `Reserved:` no command targets +`Window ⊃ Workspace ⊃ Pane ⊃ Surface` (`docs/specs/glossary.md`). **Must treat a command's primary target as a Surface; `dor move` also takes a destination Workspace, while `--workspace ` scopes the source** ([dor workspace](#dor-workspace)). `Reserved:` no command targets another Window; a request reaches the window that owns its Surface instead (§Standalone), and the ref grammar for one is [Future](#future). @@ -283,12 +281,12 @@ Invariants: layout/list positions: each Workspace starts at `surface:1` and assigns the next number when a Surface is created/restored. The map and its counter persist in the session snapshot, which is what keeps a retired number from - being reused (`docs/specs/transport.md` → "Persisted session types"). **Only - creation assigns a ref** — layout churn (reorder, + being reused (`docs/specs/transport.md` → "Persisted session types"). **Must assign a ref on creation or adoption into another Workspace** — layout churn (reorder, minimize/reattach, zoom, focus), replacing an untouched terminal with a browser Surface, and browser render-mode swaps all leave it unchanged. **Killing a Surface retires its ref; a later target that names it must fail rather than silently retarget.** +- **Must retire a moved Surface's source ref**, retaining its stable ID. **Must route a moved caller by that stable ID**: its cached `surface:N` refs now resolve in the destination and may name strangers; unscoped `ensure` searches there and may duplicate work left behind. Agents must use stable IDs across moves or explicitly scope the original Workspace. Print a renderer-local notice in the moved terminal with old/new handles and these scope changes, once after success, without PTY input or Activity changes; use an eight-second pane notice in alternate-screen programs. - Surface targets also accept `title:`, for human recovery; a title can drift, so automation should prefer refs from command responses or `dor list`. Action commands (`read`, `send`, `await`, `kill`, `dor agent-browser @@ -318,7 +316,7 @@ Invariants: never a name. **A Window is `window: