Repository navigation
fix(workspaces): add main-owned project move pause barrier - #32940
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
b286569c-4158-41a3-893e-cd3fc31f928e
📒 Files selected for processing: 13
src/main/ipc/worktrees/sleep/register-worktree-sleep-handlers.tssrc/main/runtime/workspaces/workspace-sleep-execution.test.tssrc/main/runtime/workspaces/workspace-sleep-execution.tssrc/main/window/project-move-pause.test.tssrc/main/window/project-move-pause.tssrc/preload/api/ui-bridge-clipboard-and-window-controls.tssrc/preload/api/ui-command-event-api.tssrc/renderer/src/components/sidebar/project-move-pause-follower.test.tssrc/renderer/src/components/sidebar/project-move-pause-follower.tssrc/renderer/src/components/sidebar/workspace-sleep-follower.tssrc/renderer/src/hooks/ipc-events/mobile-terminal-close-ipc-bridge.tssrc/shared/project-move-pause.tssrc/shared/workspace-sleep.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
Main's project move pause barrier (#32940) replaces the deleted renderer sleep relay: the move's quiesce now pauses through pauseWorkspacesForProjectMove, which keeps browser tabs and waits for the window's session to persist. Conflicts resolved as unions; the restore cwd keeps the WSL folder check on Windows and main's folder probe elsewhere. (register-core-handlers max-lines is inherited and fixed in the next commit of the stack.) Co-Authored-By: Claude <[email protected]>
One day of upstream past stage 13: 365 commits and 24 conflicting files, base `120f01331ca`. Three cluster analysts, one implementer, one independent critic, which returned ACCEPT with 0 blocking defects. The target is the parent of the PTY delivery refactor `ad1b81d53a0` (stablyai#33358, "group PTY delivery and drain ownership"), which is left to stage 15 on its own. The remaining gap after this merge is about 1,685 commits. ## Most PTY conflicts were comments Bisection showed the first upstream commit to make any PTY file conflict is `3286f3b2591` (stablyai#32966, a comment audit); before it there were 5 conflicts and no PTY ones. 16 of the 24 conflicts are that audit colliding with the fork's per-window delivery code. Each was resolved as the fork's code with upstream's comment text, adapted where it now misdescribes per-window behaviour, and the critic confirmed by token comparison that the resolved code is identical to `main` in all 16 (two more resolved files also qualify). ## Collateral outside the conflict list - `terminal-query-responder.test.ts`: upstream stablyai#33273 wrote a one-argument `markHiddenRendererPty` call against the single-window gate; the fork keys marks by `webContentsId`, so the test now marks `GATE_WINDOW`. - `pty-spawn-env-terminal-basics.test.ts`: a cast upstream removed is restored with a `SAFETY:` reason, because the fork's `registerPtyHandlers` takes a `BrowserWindow` for owner routing. - `local-file-access.test.ts`: the fork's census still named `WorkspaceEmptyState.tsx`, which upstream deleted when reverting stablyai#32182 (stablyai#32838). Its renderer-relative path hid it from the repo-rooted path sweep; the regression sweep found it. ## Identity `LOCAL_HOST_ROOT_NAME = 'Orcinus'` and the `sj900211/orcinus` release feed (`TAG_HREF_RE`) survive; the identity guard passes with `upstreamRefs=0`. The guard cannot see regex-escaped URLs, so the feed's unit test is what protects that hunk. Pre-existing `stablyai` drift in the prerelease feed's download regex and its readiness-test mocks is left for a separate commit so this merge stays attributable. ## Gates Cold typecheck 0 errors (17,824 files), full-tree oxlint 0 errors and 0 `max-lines` (`register-handlers.ts` and `daemon-host-relocation.ts` at 297/300), identity guard OK, fork contracts green. A full `discoverUnitFiles()` sweep on three trees (13,498 / 13,523 / 13,585 files, missing=0) raised 81 merge-only tests; isolated and serial rechecks attribute every one to Windows EPERM teardown or shell timing that also fails on the baselines, leaving 0. The critic's independent 807-file resample on LF trees agrees. Not applied here, by ruling: cosmetic comment ports into fork-only extractions, and upstream stablyai#32940's main-window-only project-move pause barrier, which has no production caller yet and is a watch item for when upstream wires one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ELI5
Updating the WSL mover stack onto current main removed the old sleep relay. A direct replacement would close browser tabs and let export read terminal state before the window finished saving it. This adds the main-owned pause boundary needed to refresh that stack safely.
What Changed
pauseWorkspacesForProjectMove(window, runtime, workspaceIds). The window resolves existing terminal/twin/chat owners, then main runs the existing sleep lifecycle queues and host stop proofs.ProjectMovePauseError.outcomespreserves known partial-stop results and chat receipts on rejected barriers.Why
This is the compatibility prerequisite for #31417/#32401 and their descendants in the stack ending at #32789. It reuses current main's lifecycle ownership rather than restoring the deleted renderer-owned sleep path.
The WSL owner agreed to adopt this API, remove the old relay plumbing, and review this PR before merge. No WSL stack branches are rewritten here, and the larger restore redesign remains a separate decision.
Linked Issue
Refs #31417, #32401, #32789.
Visual Proof
N/A — adds a lifecycle integration API and renderer persistence handshake; no new rendered UI. The WSL caller is not wired in this PR. Its packaged move/restart/undo verification follows stack adoption.
Testing
Local checks ran on macOS with
ORCA_BACKGROUND_LAUNCH=1. Hosted PR checks cover platform validation; no claim of local Windows/WSL execution.Review
The caller must retain its move gate/fence across pause and export, inspect every outcome's
failure,chatFailed, andvmSuspendFailure, and journal existing receipts. On rejection, journalProjectMovePauseError.outcomestoo. An empty error outcomes array is not evidence that no stop occurred. This API does not replace mover admission, restore hints, post-stop proofs, or transfer/undo logic.Agent skill upstream boundary
Notes
The handshake is desktop-only; web/headless clients fail closed. Remote terminal and chat targeting uses existing owner resolution and compatibility paths. General mobile/CLI Sleep remains unchanged. No OS-specific process or path behavior is introduced.
Checklist