Skip to content

fix(wsl-mover): move dialog and add-host fixes from the real-host run - #32403

Closed
nwparker wants to merge 1 commit into
nwparker/wsl-mover-p1-journal-tempsfrom
nwparker/wsl-mover-p1-move-ux
Closed

nwparker wants to merge 1 commit into
nwparker/wsl-mover-p1-journal-tempsfrom
nwparker/wsl-mover-p1-move-ux

Conversation

@nwparker

@nwparker nwparker commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​71 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​71
Prod 17 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​94 $\color{#cf222e}{\Huge{\mathbf{−}}}$​20 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​74

Stacked on the journal-temporaries PR. Behind ORCA_INTERNAL_WSL_HOSTS (move dialog, add-host dialog). Not for merge until the stack is reviewed.

Summary

Move-dialog and add-host fixes from the D1b-10 real-host run on awin (report bug 9).

Before / after

Before After
Host disconnected Preview: "Orca could not check these projects. Try again." and "Move 0 projects" "The host is not connected. Connect it in Settings, then try again."
A run that did not commit, followed by a window that didn't start it Dialog stuck on "Moving… Preparing"; Cancel did nothing until a reload The dialog shows how the run ended
Preview summary "Terminals: 5" (tabs) beside "7 terminals are running a program" (panes) Counts panes
Small transfer "0.0 MB of 0.0 MB" B / KB / MB
Distro stopped after the add-host list was read " is stopped. Start it to add it as a host." while the picker said Running The list refreshes, the button becomes "Start and add", and the message says why
Add-host description "Use it for new projects; projects you opened through \wsl.localhost keep working as they are." "…keep working as they are until you move them to this host." (all 6 locales)

Mechanism

  • prepareWslMove: a connect that throws becomes wsl_move_host_unavailable (detail: connect_failed). Nothing is journaled at that point, so a refusal is safe at start too.
  • New reportWslMoveRunEnd: after any run that did not commit, main sends one more progress event carrying the result. A window that adopted the run moves to its result stage; a window that started the run already gets the result from its own call. The driver's own line count is unchanged.
  • wslMoveCounts reads terminalLayoutsByTabId and counts leaves per terminal tab.
  • formatWslMoveBytes uses B and KB below 1 MB.
  • AddWslHostDialogBody refreshes the distro list on a distro-stopped refusal, so consent to start stays explicit.

Why this approach

Starting a stopped distro must stay the user's explicit choice, so refreshing the list beats silently starting it. Sending the end on the existing progress channel avoids a new IPC channel.

Testing

  • wsl-move-driver.test.ts: connect failure refuses as host-unavailable in preview and start, and the end event carries the result (fails on the old code).
  • wsl-move-dialog-store.test.ts: an adopted run ends on its result; an unfollowed end opens nothing.
  • wsl-move-scope-rows.test.ts: pane counting (fails on the old code).
  • AddWslHostFormPanel.test.tsx: the new description copy.
  • Locale catalogs verify; pnpm tc and the changed-code quality gate pass.

Not changed

The result dialog's "Use on this computer again" promise is met now that #29833 is below this stack; its sidebar section lists every moved project, not only those with chats.

@nwparker
nwparker requested a review from brennanb2025 as a October 23, 2026 11:37
@nwparker
nwparker force-pushed the nwparker/wsl-mover-p1-journal-temps branch from 31935d0 to aa0303a Compare October 23, 2026 11:44
@nwparker
nwparker force-pushed the nwparker/wsl-mover-p1-move-ux branch from 3af041a to d5584ac Compare October 23, 2026 11:45
@nwparker
nwparker force-pushed the nwparker/wsl-mover-p1-journal-temps branch from aa0303a to 30f85c9 Compare October 23, 2026 14:31
@nwparker
nwparker force-pushed the nwparker/wsl-mover-p1-move-ux branch from d5584ac to 9c35a58 Compare October 23, 2026 14:31
D1b-10 real-host run on awin, report bug 9:
- A host that will not connect now refuses as host-unavailable, in the preview and
  at start, instead of "Orca could not check these projects" / an unexpected error.
- A run that ends without committing reports its result on the progress channel, so
  a window that only follows the run (reloaded mid-move, or started elsewhere) leaves
  "Moving… Preparing" for the result instead of sticking there until a reload.
- The preview counts terminal panes, as the terminal blockers do, not tabs.
- Small transfers read in B or KB, not "0.0 MB of 0.0 MB".
- A distro that stopped after the add-host list was read refreshes the list, so the
  button becomes Start and add, with a message that says so.
- The add-host copy no longer says bridge projects keep working "as they are" with
  no mention that they can move to the host.

Co-Authored-By: Claude <[email protected]>
@nwparker

Copy link
Copy Markdown
Contributor Author

Contained in the dark landing PR #34059 (its head commit is an ancestor of the landing branch). Closing in favour of it; branch kept.

@nwparker nwparker closed this Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant