Repository navigation
feat(wsl): a pane main held for a stopped distro shows the Start card - #35927
Conversation
The renderer maps main's terminal_held_wsl_distro_stopped start failure to #35813's shared stopped card; its Start calls layout.startWslHeldPanes, which starts each pane through ensureRestoredPaneStarted as the user's act.
[Low impact] The change is limited to explicit Start actions for main-owned WSL-held panes. The PR appears safe to merge, with a non-blocking stale-card issue. Findings
SummaryThis PR shows the shared WSL Start card for local panes whose main-owned start was held.
|
| const hold = reason ? parseWslDistroHold(reason) : null | ||
| if (hold && !session.disposed && !session.runtimeEnvironmentId) { |
There was a problem hiding this comment.
A retry that fails for another reason does not clear the previous WSL card. For example, after the distro starts outside Orca, automatic tab activation can retry the pane and fail because its directory is missing. Both starting and failed stay inside the wait, so neither reaches the card cleanup. The pane still says the distro is stopped alongside the new error.
Clear the old hold when main publishes a non-WSL failure, and add a test for that transition.
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 2

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:
99adcad7-0bc0-4a1e-82eb-448ce1e6d80a
Files ignored due to path filters: 1-
src/shared/rpc-contract/rpc-params-catalog.generated.tsis excluded by!**/*.generated.*
Files selected for processing: 5-
src/main/runtime/rpc/methods/workspace-layout.tssrc/main/runtime/session-lifecycle/projection/restored-pane-materialize.tssrc/main/runtime/wsl-held-pane-start-layout-owner.test.tssrc/renderer/src/components/terminal-pane/pty-connection/main-pane-start-wait.test.tssrc/renderer/src/components/terminal-pane/pty-connection/main-pane-start-wait.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
-
| heldCards.get(session)?.() | ||
| heldCards.delete(session) |
There was a problem hiding this comment.
Clear the hold card when the failure reason changes.
If another start attempt fails for a non-WSL reason, failed remains gated. The failure handler reports the new error, but this cleanup does not run. The obsolete WSL Start card remains visible. Clear the prior card before handling a new failure that is not a WSL hold. (raw.githubusercontent.com)
| release: () => | ||
| callRuntimeRpc({ kind: 'local' }, 'layout.startWslHeldPanes', { panes: [pane] }) |
There was a problem hiding this comment.
Keep the Start action available if the RPC fails before a start attempt.
startHeldPanesForWslDistro removes the card before calling release() and does not handle a rejected promise. If the local RPC rejects before main starts the pane, no start-state update restores the card. The user cannot retry Start from that card. Handle the rejection and restore the card while the pane remains held. (raw.githubusercontent.com)
ELI5
When Orca's own background work holds a terminal because its WSL distro is stopped (#35865), the pane used to show "The terminal could not start: terminal_held_wsl_distro_stopped:Ubuntu". Now it shows the same "Ubuntu is stopped" card with Start that #35813 added for held restores. If Orca couldn't check the distro, it shows #35860's "couldn't check" wording. Pressing Start starts that pane, and that press is your act, so it may start the distro.
User risk: low. This only changes panes main owns and already publishes as failed with a WSL hold reason. That happens only in the layout-owner build, where main owns the pane layout, so in shipped builds nothing changes. Other failures still show their message as before.
What Changed
main-pane-start-wait.ts, a pane whose main-side start failed always showed "could not start: ". Main had no way to start a held pane as the user's act.showPaneStartFailureparses the reason with fix(wsl): a held pane whose distro could not be checked says so, not that it stopped #35860'sparseWslDistroHold.wsl-distro-stopped-hold-statestore, with its{ distro, state }, instead of showing the error text. The sharedWslDistroStoppedCardthen renders.layout.startWslHeldPanes, which reusesLayoutReopenHeldPanesParams.startWslHeldTerminalPanescallsensureRestoredPaneStarted(pane, { wslUserAct: true })for each pane. fix(wsl): main's background terminal starts never start a stopped WSL distro #35865 already threads that trigger through materialization into the spawn.failed, neverheld, so older and paired desktops never offer the newer-build Reopen (whose action stops newer terminal services).Why
It reuses the existing pieces, so there is no second card or store: #35813's card and store, #35860's states, and main's one start for an owned pane (
ensureRestoredPaneStarted).layout.reopenHeldPanesisn't reused because it first stops newer daemons, which is specific to the newer-build hold.Third of the stopped-distro follow-ups after #35857 and #35865.
Linked Issue
N/A (maintainer change; follow-up to #35813 and #35865)
Visual Proof
N/A: the card is #35813's existing
WslDistroStoppedCard, unchanged. It now also appears on a main-owned held pane, which exists only in the layout-owner build, not in shipped builds.Testing
wsl-held-pane-start-layout-owner.test.ts(real runtime, layout-owner build):failedwith the hold reason, and main's own start didn't name the user's act;startWslHeldTerminalPanesspawns withwslUserActand clears the failure.main-pane-start-wait.test.ts:layout.startWslHeldPaneswith the pane;state: 'unverifiable'.pnpm tc,pnpm run typecheck:ci,oxlint, the anti-slop lint,check:code-quality:changed, the ast-grep test and gates,verify:rpc-params-catalog, and the pty-connection and layout-owner tests (1,113 passed).Review
Agent skill upstream boundary
Notes
failedwith a reason), so older and paired clients behave as before.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)