Workspaces 9/10: dor workspace move, dor list --window, iframe move gate - #622
Workspaces 9/10: dor workspace move, dor list --window, iframe move gate#622nedtwigg wants to merge 25 commits into
Conversation
`dor workspace move <ref> --window <label|new> --index <n>` runs the same transfer the strip's drag does, through a platform hook the Tauri adapter fills; `--index` alone reorders, and a host with one window reorders only. `dor list --window <label>` lists a sibling window, routed there by Rust. A move between windows cannot carry a plain iframe's document: it reopens at its saved URL. The Wall handle now names its iframe Surfaces, Doored ones included; the drag release raises the kill's typed-letter confirmation when there are any, and the CLI refuses unless --dangerously-destroy-iframe-page-state is passed, naming them. Agent-browser Surfaces reconnect and are not gated. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PkPyEFCxiPo5UFeju5Ya9u
Deploying mouseterm with
|
| Latest commit: |
7c2100d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5e2ba13a.mouseterm.pages.dev |
| Branch Preview URL: | https://workspaces-move-verb.mouseterm.pages.dev |
dormouse-bot
left a comment
There was a problem hiding this comment.
Feedback on work in progress — not a merge verdict. Mark it ready when you want the full review.
The new CLI surface has no dor-side test. dor/test/cli-output.test.mjs pins the exact request every other Workspace verb sends (newWorkspace, renameWorkspace, switchWorkspace, closeWorkspace with force: true) and snapshots the --force-on-the-wrong-action refusal, but fixtureClient has no moveWorkspace and nothing exercises move or list --window. So nothing pins that --window becomes toWindow and --index becomes index, nor the four new misuse errors. That mapping is where the first inline comment's bug lives: a test asserting the request shape for move build --window ws-2 --index 0 is what would have caught the dropped index.
`dor workspace move` reported `moved` the moment Rust took the invoke,
but the target can still close mid-transfer or the watchdog can hand the
Workspace back, so a script chaining `dor list --window` behind it read a
move that never happened. `transferWorkspaceTo` / `tearOutWorkspace` now
resolve only when `workspace-departed` (adopted) or
`workspace-arrival-failed` (handed back, with Rust's reason) arrives for
that Workspace, from a per-Workspace deferred settled by `handleDeparted`
and `handleArrivalFailed`; a refused invoke settles at once. The Tauri
adapter rejects with the reason, so the CLI prints `was not moved: ...`.
A window emptied by the move now issues `close_window` on a later task,
so the answer leaves the webview before Rust destroys it. The drag
callers keep ignoring the outcome.
`--index` was dropped on a move between windows: the cross-window branch
answered before the reorder and the payload carried no slot. The payload
now has an optional `index`, which the target reads ahead of the
pointer-derived slot; it is threaded through `PlatformAdapter.
transferWorkspace(workspaceId, toWindow, { index })`. A tear-out has one
tab, so the adapter does not forward it there.
The strip's move gate now waits behind a close confirmation (the two key
handlers are siblings on one node, so with both pending the close's
letter could also move the Workspace), and ignores a bare Shift or Meta
the way the pane kill confirmation does.
`--index` parses through a shared `parseNonNegativeInt` beside
`parsePositiveInt`, so its failure reads like every other flag's
(`invalid --index 'x'`). `dor list --workspaces --window <label>` was
refused by the overview's flag allowlist despite its usage line; the
allowlist now admits `--window`.
dor tests pin the `move` request shape, the four flag-misuse errors, the
invalid index, and `list --window`.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RChsJ5rMUMyfu22UZDfUus
Carries the review fixes from the earlier stages up the stack. The hand-off arms its mark wait before the invoke and settles the move on adoption or hand-back, replaying a hand-back's since-mark tail into the source; the move tests install an id pool now that refs are stable only under one. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RChsJ5rMUMyfu22UZDfUus
dormouse-bot
left a comment
There was a problem hiding this comment.
Feedback on work in progress — not a merge verdict. Mark it ready when you want the full review.
Making moved mean "the target adopted it" puts dor's 30 s socket deadline in a fixed order against routing::ARRIVAL_MAX (20 s, in standalone/src-tauri/src/routing.rs), and nothing on either side says so. Raise the watchdog past 30 s — its own doc comment frames it purely against the target's 3 s collection and a torn-out window's boot, so there is nothing there to stop you — and every hand-back this commit exists to report arrives after the client has already given up: dor workspace move prints timed out waiting for workspace.move instead of the reason docs/specs/dor-cli.md now promises, and the caller is back to not knowing where the Workspace is. The inline suggestion names the ordering at the dor end; the Rust constant is where an editor raising it would actually be looking, so it wants the same line.
| // A move between windows serializes every terminal and waits for the target | ||
| // to adopt the Workspace, so it too can outlast the ordinary deadline. |
There was a problem hiding this comment.
| // A move between windows serializes every terminal and waits for the target | |
| // to adopt the Workspace, so it too can outlast the ordinary deadline. | |
| // A move between windows serializes every terminal and waits for the target | |
| // to adopt the Workspace, so it too can outlast the ordinary deadline — and | |
| // must outlast `routing::ARRIVAL_MAX` too, the watchdog that hands an | |
| // unadopted arrival back: under it, a hand-back reaches the CLI as a | |
| // transport timeout rather than the reason it is supposed to print. |
# Conflicts: # standalone/src/workspace-move.ts
# Conflicts: # standalone/src/workspace-move.ts
dor workspace move <ref> --window <label|new> --index <n>through a platform hook;dor list --window <label>. A move between windows that would destroy a plain iframe's page state asks with the kill's typed letter on drag, and the CLI refuses unless--dangerously-destroy-iframe-page-stateis passed.Based on
workspaces-fidelity.🤖 Generated with Claude Code
https://claude.ai/code/session_01PkPyEFCxiPo5UFeju5Ya9u