feat(desktop): preserve transcript continuity across bounded ranges - #4560
Draft
Sun-GLiang wants to merge 18 commits into
Draft
feat(desktop): preserve transcript continuity across bounded ranges#4560Sun-GLiang wants to merge 18 commits into
Sun-GLiang wants to merge 18 commits into
Conversation
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Resolve the Runtime Host protocol conflict by assigning bounded transcript position paging compatibility epoch 97 after main's epochs 95 and 96. Generated-by: Codex
Sun-GLiang
marked this pull request as ready for review
September 2, 2026 16:40
Sun-GLiang
marked this pull request as draft
September 2, 2026 16:44
Keep state-only backfill metadata from materializing empty historical Turns, consume search restoration once, and clear reading anchors before paging or returning to the live tail. Cover the exact active-overlay handoff and make native transcript performance evidence reproducible. Generated-by: Codex
The model label updates before the Host-backed composer gate settles. Wait for the actual Send control before pressing Enter so the Session-switch anchor E2E does not race model persistence. Generated-by: Codex
Generated-by: Codex
The model picker label reflects its optimistic overlay before the Host-backed Session catalog commits. Wait for the authoritative Session summary so the composer cannot remount between filling and sending the transcript-scroll fixture prompt. Generated-by: Codex
The transcript-scroll suite does not exercise keyboard submission, and the editor intentionally consumes Enter while transient popups close. Click the real submit control so Playwright waits for the remounted composer and the test remains focused on Session scroll behavior. Generated-by: Codex
Sun-GLiang
marked this pull request as ready for review
September 2, 2026 19:17
…unded-continuity # Conflicts: # apps/desktop/e2e/transcript-scroll.spec.ts # apps/desktop/src/main/e2e-fixture.ts # apps/desktop/src/renderer/app-shell.tsx # packages/runtime-host/src/protocol/index.ts # packages/ui/src/chat-view.tsx
Sun-GLiang
marked this pull request as draft
September 3, 2026 06:59
…unded-continuity # Conflicts: # packages/runtime-host/src/protocol/index.ts
Generated-by: Codex
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
Preserve transcript continuity while durable bodies remain bounded to the existing 512 KiB and 10-Turn range.
This adds a lightweight per-Turn position index, pages it through the existing Runtime Host transcript subscription, carries a bounded position sidecar through
DesktopTranscriptReplica, and projects unloaded ranges as gap rows after the existing Turn materialization. Historical paging is serialized per transcript and resolves only after the requested range is delivered to the renderer, so repeated visible anchors can advance page by page without duplicate requests or stale acknowledgements.Scrolling now prefetches symmetrically near both resident edges and retains a semantic visible-Turn anchor across bounded range replacement. The dock arrow loads the real latest range before pinning to the tail. The in-flow “正在查看较早的消息 / 返回最新消息” notice has been removed; the existing dock arrow is the single return affordance.
No full-history snapshots, generations, leases, second body protocol, byte scanner, or second transcript replica are introduced.
Fixes #4123
Verification
transcript-bidirectional-scroll.spec.ts; 20/20 repeated runs passed after the final fix).6c8e749d3: median TaskDuration 883.385 ms → 880.742 ms (-0.30%); median RecalcStyleDuration 6.733 ms → 6.707 ms (-0.39%); candidate Long Animation Frames over 50 ms: 0/7; mounted Turns remained 10.npm run format:check,npm run lint,npm run typecheck, renderer architecture check againstupstream/main,npm run build, andgit diff --checkpassed on the final tree.Review focus
AI use
Select exactly one:
Tool(s) and scope: Codex implemented the storage, Runtime Host, Desktop, renderer, test, and review-fix changes. Each affected commit includes a
Generated-by: Codextrailer.Checklist
Does this PR entail a change in behavior?