Repository navigation
feat(wsl-mover): D3a-2 move status line on WSL host rows (dark) - #34676
Conversation
…with decline causes and stale-record pruning (dark)
…l module in the renderer
…unreadable host file; calm paused line; one-key blocker sentence; Show terminal feedback
…o (stopped-distro gates)
bf22142 to
3c93a4e
Compare
|
No actionable comments were generated in the recent review.
|
#34676's test mocks use-wsl-hosts-enabled; WslHostsSection now also reads useWslHostsAcceptNewWork, which follows the same gate there.
Main's move status line (#34676) names every park reason; the finish-pending reason this PR adds needs one: the earlier move is done on the host, and finishes here at restart or with Check again.
…e host's server update during a move (#34823) * fix(wsl-mover): settle an interrupted move automatically, and hold the host's server update during a move An app update or crash between sending a move's copy and the host's commit leaves a `blobs-transferred` record. Startup recovery has no host to ask, so the projects stay fenced, and the automatic mover only previewed, which refuses an in-flight move, retrying forever. The projects stayed read-only until the user started the move from the dialog. The automatic mover's preview now settles that record first (through the host: back to zero, or forward when the host committed), holding the distro's run while it does so it never races a move the user starts. The dialog's preview stays read-only. The preview moves to its own module. A Settings Update or Force, or any reconnect, could also redeploy the host's server in the middle of a move, cutting it off (safe, but the move is lost). Once a running move has journaled, a version-changing redeploy now keeps the running server and reports the update as waiting for the move, mirroring the SSH path's skip while migrating. The move's own first connect, before it journals, can still update an outdated server. * fix(wsl-mover): an automatic settle never reloads the window, and never holds its own host update Review of #34823: - A settle that finds the host committed ran the desktop rewrite, which reloads the window past its unload veto. From the automatic mover it now records the commit only (the projects stay fenced), and the next start's rewrite pass finishes it before any window opens. A move the user starts still finishes at once. - The server hold counted any unfinished record of the distro, so an automatic settle of an old record with an outdated server was held, refused for an update, and retried the same way. The hold now counts only the cutover the running move journaled itself. * fix(wsl-mover): let the user finish a committed move in-session; park the automatic mover meanwhile After an automatic settle records a commit for the next start, nothing could finish it in-session: the user's Move refused as already in flight and the orchestrator retried for nothing. - A settle that finds the head committed but not yet rewritten on this desktop finishes it now when the user asked (their Move, or the status line's Retry), returning the existing "finished an earlier move" answer; the automatic mover still leaves it for the next start. - The automatic refusal carries detail `finish-pending`, which parks the distro (new reason `finish-pending`) instead of retrying; the next start, whose rewrite pass finishes the move before any window opens, puts it back to pending. - The park rules move to wsl-move-orchestrator-park.ts. * fix(wsl-mover): give the finish-pending park its own status line Main's move status line (#34676) names every park reason; the finish-pending reason this PR adds needs one: the earlier move is done on the host, and finishes here at restart or with Check again.
…/2) (#34694) * feat(wsl): admit no new WSL host or move in serve-only Main refuses wslHosts:add while the internal gate is closed and reports acceptsNewWork in the WSL host capability; moves already need the open gate. The renderer hides Add WSL distro and every Move entry point once main says serve-only, while saved hosts keep their Connect and Remove. * fix(wsl): offer no new WSL host or move until main answers the capability The renderer's acceptsNewWork now starts false, so Add WSL distro and the Move entries never flash in serve-only before the capability reply. * fix(wsl): point the WSL-bridge chat refusal at Add WSL distro only when it is offered In serve-only Add WSL distro is hidden, so the refusal keeps its terminal-only words there. * test(wsl): give the move status-line test's hosts mock the new-work hook #34676's test mocks use-wsl-hosts-enabled; WslHostsSection now also reads useWslHostsAcceptNewWork, which follows the same gate there.
ELI5
Orca can now move WSL projects onto a server inside each distro on its own (the D3a "orchestrator", #33802). Sometimes that move has to wait: terminals are busy, the user brought the projects back, or an earlier move never finished settling. Until now the user saw nothing about that. This PR adds one short status line per distro under its row in Settings → WSL hosts, plus a toast when a move finishes or stops to wait for the user. Like the rest of the mover, it only shows in internal builds started with
ORCA_INTERNAL_WSL_HOSTS=1.What Changed
What the user sees (one line per distro, only while something needs saying):
How it works:
parked: declinednow records itscause(released-hereorremoved), so the renderer doesn't have to guess.wsl-move-distro-in-use.ts). It never prunes a user's own choice (declined, Not now). A host file it can't read counts as "in use".usersteps run insiderunAsWslUserAct(distro), so the driver's reads of a just-connected distro aren't refused by the stopped-distro gates (fix(wsl): background repo probes, PR refresh and worktree scans never start a stopped distro (E9) #34632). Wakes and timers stay background work (A1).wsl-move-orchestrator-status.ts) loads the records withwslMove.listOrchestratorand followsonOrchestratorStatus. It's mounted inWslMoveDialogHostonly while WSL hosts are enabled.WslMoveOrchestratorStatusLine) renders in the host row'sServerListRowfooter, using existing tokens andButtonxs/outline. Its copy is inwsl-move-orchestrator-copy.ts.Why
The orchestrator's states only matter if the user can see and act on the ones that wait for them. One line on the host row, rather than a dialog or a banner, keeps the surface small, which the owner asked for.
The decline cause is stored in main rather than inferred in the renderer from whether the host row exists, because inferring loses to a race with a re-add. Pruning lives in main so stale records never reach any client.
"Show terminal" instead of a real "End" keeps any way of killing a process off this line.
Linked Issue
N/A (internal tracker: D3a-2)
Visual Proof
Taken with CDP on a hidden window (
ORCA_BACKGROUND_LAUNCH=1). The dev build used fake WSL hosts on a throwaway profile, with Ubuntu stuck and Debian waiting on a working agent:Testing
Automated tests added. Flag-off checks:
listOrchestratororonOrchestratorStatus; with hosts on, it does.Main: decline causes, pruning (never a user choice, never on an unreadable host file), wiring, and that the driver runs as the user's act only for "Check again".
Manually tested by CDP screenshot on macOS with fake WSL hosts (above). That run also caught a renderer bundle break: a shared module pulled in
node:crypto. It's fixed.Local checks:
typecheck:ci, oxlint on the touched files,check:code-quality:changed, the localization checks, and the D3a suites (1609 tests across 226 files).Review
Agent skill upstream boundary
Notes
ORCA_INTERNAL_WSL_HOSTS=1. Main constructs nothing, the preload has no WSL host API, and the renderer neither reads nor subscribes.causeis optional, so older builds still readdeclined.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)