feat(terminal): keep recent sessions warm - #195
Draft
Lint111 wants to merge 2 commits into
Draft
Conversation
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
Why
Every session switch currently downloads and replays the terminal tail. On mobile, rapid switches can expose stale frames, repeat expensive xterm parsing, and make recently viewed sessions feel cold even though their rendered state is already in memory.
This change keeps a small recent range live. A quick switch-back becomes:
Any uncertainty falls back to the existing canonical fetch.
Correctness Boundaries
Dependencies
Merge order:
This branch temporarily includes
92dbe64from #193 and should be rebased after #193 merges. It does not duplicate #189. Before #189 is present, the extended subscription ID is rejected and entries remain ineligible, so the client safely uses canonical loads.Commit Structure
92dbe64 fix(terminal): retain session replay ownership- prerequisite from fix(terminal): preserve replay and history ownership #1938d9e00c feat(terminal): keep recent sessions warm- this featureOut Of Scope
Validation
npx vitest run --config config/vitest.config.ts test/warm-terminal-cache.test.ts test/terminal-flush-budget.test.ts test/codex-snapshot-replay.test.ts test/terminal-buffer-flush.test.ts- 26 passednpm run check:lockfilenpm run typechecknpm run lintnpm run check:frontend-syntaxnpm run check:public-assetsnpm run format:checknpm run buildgit diff --checkThe unsafe bare full-suite path was not run; its destructive quick-start fixture is isolated separately in #175.