Conversation
Co-authored-by: Orca <help@stably.ai>
nwparker
force-pushed
the
nwparker/term-speed-2-hidden-sync-state-reset
branch
from
June 10, 2026 00:08
2baaa51 to
0318394
Compare
nwparker
force-pushed
the
nwparker/term-speed-2-wake-session-reregister
branch
from
June 10, 2026 00:08
4d5410e to
8cc550e
Compare
…arker/term-speed-2-wake-session-reregister # Conflicts: # src/main/daemon/history-manager.ts
…arker/term-speed-2-wake-session-reregister
|
Ready to review this PR? Stage has broken it down into 3 individual chapters for you:
Chapters generated by Stage for commit b2e8cf3 on Jun 17, 2026 9:10am UTC. |
…arker/term-speed-2-wake-session-reregister
…arker/term-speed-2-wake-session-reregister
…arker/term-speed-2-wake-session-reregister
…arker/term-speed-2-wake-session-reregister
Contributor
Author
|
Closing as superseded by merged PR #7214 (merge e84a8dd), which explicitly revived the complete term-speed-2 model/view chain into current main and then added newer scheduler, producer flow-control, snapshot, and reliability work. This old component/rollup branch no longer has an independent delta to rebase. |
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.
Summary
activeSessionIdsand re-attach its history writer whenspawn()returns the cached sleep cold-restore payloadHistoryManager.reopenSession: registers the writer without deletingcheckpoint.json(still the only recovery data until the next tick) and clearsendedAt/exitCodeso future sleep captures can cold-restore againWhy
Sleep kills the daemon PTY; the exit event closes the session history (removes the writer, sets
meta.endedAt). The wakespawn()hit thecoldRestoreCacheearly return — added for StrictMode double-mounts, where the first call had already registered everything — and skippedactiveSessionIds.addplus all history re-registration. After wake:markSessionDirtyno-ops, so periodic checkpoints stop for the woken terminalcheckpoint()silently no-ops (no writer) anddetectColdRestorereturns null (endedAtset), so the second wake restores a blank terminal — post-wake scrollback is losthasPty()stays false, degrading thepty:writeAcceptedpath for woken panesBoth re-registrations are idempotent, so the StrictMode double-mount path is unaffected.
Validation
cold restores the second sleep/wake cycle with post-wake outputfails without the product fix (at thehasPtyassertion) and passes with itpnpm exec vitest run --config config/vitest.config.ts src/main/daemon/daemon-pty-adapter.test.tspassed: 63 testsnpx playwright test tests/e2e/terminal-sleep-wake-restore.spec.ts --config tests/playwright.config.ts --project electron-headless --workers=1passed 1/1 on a fresh build including this fixpnpm exec oxlinton touched files passedpnpm run typecheckpassedgit diff --checkpassedMade with Orca 🐋