Skip to content

fix(wsl-mover): restore folders of panes slept before the move; keep browser tabs - #32401

Closed
nwparker wants to merge 1 commit into
nwparker/wsl-mover-p1-split-shellsfrom
nwparker/wsl-mover-p1-paused-panes
Closed

nwparker wants to merge 1 commit into
nwparker/wsl-mover-p1-split-shellsfrom
nwparker/wsl-mover-p1-paused-panes

Conversation

@nwparker

@nwparker nwparker commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​57 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​57
Prod 8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​42 $\color{#cf222e}{\Huge{\mathbf{−}}}$​11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​31

Stacked on #32400. Behind ORCA_INTERNAL_WSL_HOSTS, except the Sleep request option: an optional keepBrowserTabs field on main's own Sleep request, which only the WSL move sets. Not for merge until the stack is reviewed.

Summary

Things a WSL move lost in the D1b-10 real-host run on awin (report bugs 7 and 8) and in verify-3:

  1. The folder of a pane slept before the move. It reopened at the project root; verify-3 lost deep/. fix(wsl-mover): fix the P0s the first real-machine move run found #32343 already carries such a pane's history; this carries its folder.
  2. In-app browser tabs. The tab vanished; only its cookies were copied.
  3. Unsaved drafts (pinned, not changed): a moving project's draft carries. The refusal the run saw came from a draft in another project, fixed in fix(wsl-mover): fix the P0s the first real-machine move run found #32343.

Mechanism

  • Folders: the pause step adds the panes slept before the move to the panes it hands on. It uses fix(wsl-mover): fix the P0s the first real-machine move run found #32343's listWslMoveSleptSessionPanes: bindings the saved session still holds, plus the window-reported sleptPanes, each checked against the moved workspaces. Restore hints and history now read the same panes. These panes were never live, so the exit proof's session set is unaffected for them.
  • Browser tabs: the move pauses projects through Sleep, and Sleep closes a workspace's browser tabs. A move's Sleep request carries keepBrowserTabs: true, and the renderer then skips shutdownWorktreeBrowsers. An older renderer ignores the field.
  • Drafts: by design the move never sends draft contents to the host; the host-session seed lays this desktop's draft back over the moved tab.

Testing

  • wsl-move-driver.test.ts: a pane slept before the move, both one the saved session binds and one only the window reports, reaches the restore-hint capture (fails on the old code).
  • sleep-worktree-flow.test.ts, worktree-sleep-request-relay.test.ts: the move's Sleep keeps browsers; other callers unchanged.
  • wsl-move-manifest-export.test.ts: an in-scope draft carries without a blocker.
  • Mover tests pass (55 files); pnpm tc and the changed-code quality gate pass.

@nwparker
nwparker force-pushed the nwparker/wsl-mover-p1-split-shells branch from a9274db to ebee49b Compare October 23, 2026 11:44
@nwparker
nwparker force-pushed the nwparker/wsl-mover-p1-paused-panes branch from cd27476 to f9e25f7 Compare October 23, 2026 11:44
@nwparker
nwparker force-pushed the nwparker/wsl-mover-p1-split-shells branch from ebee49b to 23adc7b Compare October 23, 2026 14:31
@nwparker
nwparker force-pushed the nwparker/wsl-mover-p1-paused-panes branch from f9e25f7 to 38291e2 Compare October 23, 2026 14:31
@nwparker nwparker changed the title fix(wsl-mover): carry folders, scrollback and browser tabs of paused panes fix(wsl-mover): restore folders of panes slept before the move; keep browser tabs Oct 23, 2026
…browser tabs

D1b-10 real-host run on awin (report bug 7, with bug 8 pinned), and verify-3:

- A pane slept before the move had no live terminal, so its last folder never reached
  the restore hints and it reopened at the project root (verify-3 lost `deep/`). The
  pause step now adds the panes the saved session or the window still binds, through
  the slept-pane listing that already feeds their history, so hints and history read
  the same panes.
- The move pauses projects through Sleep, which closes a workspace's browser tabs, so
  a moved project lost its in-app browser tab. A move's Sleep request now asks the
  renderer to keep them; an older renderer ignores the field.
- A moving project's unsaved draft carries (the host-session seed lays it back); a
  test pins that it never refuses the move.

Co-Authored-By: Claude <noreply@anthropic.com>
@nwparker
nwparker force-pushed the nwparker/wsl-mover-p1-split-shells branch from 23adc7b to 501641f Compare October 23, 2026 15:41
@nwparker
nwparker force-pushed the nwparker/wsl-mover-p1-paused-panes branch from 38291e2 to a63e76f Compare October 23, 2026 15:41
@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