Repository navigation
Conversation
This was referenced Oct 23, 2026
nwparker
force-pushed
the
nwparker/wsl-mover-restore-pane-history
branch
4 times, most recently
from
October 24, 2026 03:17
3e5a2f4 to
5356b3e
Compare
This was referenced Oct 24, 2026
nwparker
force-pushed
the
nwparker/wsl-mover-restore-pane-history
branch
5 times, most recently
from
October 25, 2026 10:17
1a9a420 to
40e4d64
Compare
…nal-history blob the host restores once Replaces the host-side stored-scrollback seed (#32789) with an installed interrupted session the pane's first start claims. Co-Authored-By: Claude <[email protected]>
…ts terminal-history blob Drops the snapshot-ref spooling and the restore-hints blob for moved panes: one source (the pane's daemon checkpoint) carries history and folder. Co-Authored-By: Claude <[email protected]>
Keeps register-core-handlers under the max-lines limit.
Co-Authored-By: Claude <[email protected]>
…ign deletes The moved pane's history now comes from its own checkpoint; wsl-move-restore-lifecycle.spec.ts covers it once, across reloads. Co-Authored-By: Claude <[email protected]>
…til 2/3 deletes them Main's layout-writer ratchet now counts main-process writers; wsl-move-echoed-browser-tabs.ts, the file the hold-and-reload in 2/3 deletes, writes two. Restore redesign 2/3 removes the entry. Co-Authored-By: Claude <[email protected]>
…ts own focus The carried session named this desktop's focus, and a host that already focused another project refused it (orcad_migration_dormant_focus_conflict:activeRepoId), so moving the project you had open reset with "Nothing was moved" (awin verify-7 N1). The desktop's focus names nothing on the host and the desktop rewrites its own focus after the move, so the export now carries none and the host keeps its own. The reset result also says why the move stopped. Co-Authored-By: Claude <[email protected]>
… journal dropped A run killed mid-pause is reset at the next startup without its process, so its export documents (25 KB per pane on awin verify-7) stayed under wsl-move-slept-scrollback for good. Co-Authored-By: Claude <[email protected]>
…oves it gone The cold restore checked a WSL pane's folder with stat over \\wsl.localhost, which waits for a stopped distro and fails for reasons other than absence. After a rollback the pane stayed blank about 15 s, then opened at the project root without its folder (awin verify-7, 5e). It now uses the bounded wsl.exe probe every other restore uses, which keeps the folder unless proven missing. Co-Authored-By: Claude <[email protected]>
The carried screen ends on the old shell's prompt with the cursor after it, so the host's new shell printed its prompt beside it (`$ $`, awin verify-7). The exported checkpoint now ends the normal screen with a line break; a TUI's screen and an unfinished escape are left as they are. Co-Authored-By: Claude <[email protected]>
… instead of sleeps Main's flaky-test ratchet flags the mover's tests: - The browser-draft and pane-history e2e slept fixed seconds. They now wait on what they slept for: the host's tabs mirrored, the host terminal's last line, the moved tabs shown, the pane painted. - The journal sweep test read the wall clock; it runs on a fixed fake time. - Each longer per-test timeout says why it needs the time. Co-Authored-By: Claude <[email protected]>
The mover's startup (rewrite stores, interrupted-move recovery, retention, retry) lived inline in main-process-ready-foundation.ts. With main, the host reconnect and D1c branches each adding a few lines on top, the file passed the max-lines limit in the combined build. It moves as one unit to wsl-move-startup.ts; the foundation keeps the one call and its ordering. Co-Authored-By: Claude <[email protected]>
nwparker
force-pushed
the
nwparker/wsl-mover-restore-pane-history
branch
from
October 25, 2026 12:15
96acf50 to
46a13cd
Compare
10 tasks done
8 of 9 tasks
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked for owner review. Do not merge. Behind the internal WSL hosts gate (
ORCA_INTERNAL_WSL_HOSTS). Base:nwparker/wsl-mover-restore-base(#32923 at 6a4f795 plus the browser/draft commits).Summary
First slice of the approved restore redesign (docs/design/wsl-via-orcad-restore-review.md). A moved terminal's history and folder now come from one source: the pane's own daemon checkpoint. The host's daemon restores it once, the same way it would after an app restart.
Before / after
scrollback.binand once from the window's ref-load, and added another copy on every reload. The pane also opened at its start folder instead of where the shell was.terminal-historyblob. The host installs it as an interrupted session in its own daemon history folder, under an id derived from the pane. The pane's first start claims that session, and the daemon cold-restores it once. After that the daemon's own checkpoints take over, so a reload reattaches and a host restart restores the latest state, never the moved copy again.Mechanism
terminal-history: key = 16 hex of the pane key's sha256, capabilityorcad.migration-blob.terminal-history.v1, 16 MiB cap. A host without the capability refuses the move up front ("Update Orca on this host…"), so a mixed-version pair never loses history silently.readWslMoveSleptScrollbackFromHistorywrites one document per pane (checkpoint plus Linux cwd: the guest probe's shell folder, else the checkpoint's). Those leaves are left out of the snapshot channel, so no ref or snapshot also paints them. Theterminal-restore-hintsblob is no longer sent; the folder is inside the checkpoint.installOrcadMigrationTerminalHistorywritescheckpoint.json, thenmeta.jsonwithendedAt: null, atomically and idempotently, after the commit is durable. A pre-commit content check validates the document and the checkpoint, and refuses a pane the manifest does not move.claimMovedPaneHistorySessionreplaces the fix(wsl-mover): a moved pane's stored history shows on every client #32789 seed inrestored-pane-materialize.ts, and never runs over SSH.stored-scrollback-session-seed.tsand its ledger and runtime-store hook,wsl-move-restore-hints-blob.ts, and the slept-snapshot spooling (withSleptSnapshots,sleptScrollbackReader).terminal-restore-hintsfrom older desktops.Why this approach
Every earlier fix added another writer for the same field, and the awin rounds kept regressing (verify-4 to verify-6). Daemon cold restore is the path an app restart already proves on awin. It replays once and rewrites the checkpoint itself.
The host's saved layout can't carry bindings: the shared manifest validation forbids
ptyIdsByLeafId, and older hosts read it. So the session id is derived from the pane key on both sides instead.Testing
HistoryReaderon the host. All 2,000 lines come back once, in the shell folder, and a retry after the pane has started never rewinds it.blob:terminal-history);Not in this PR (next slices)
TERMINAL_MULTIPLEX_RECOVERY_SCROLLBACK_ROWS) is shared by every SSH and WSL host terminal. This stack leaves it unchanged; raising it is a separate owner decision.