Skip to content

feat(desktop): preserve transcript continuity across bounded ranges #4123

Description

@Astro-Han

Problem

#4206 replaced Renderer turn virtualization with a bounded Runtime Host range. That change substantially improved long-transcript performance and removed a second scroll and layout authority.

One problem remains. Opening an older range replaces the current resident range. Turns between those ranges remain durable in Storage, but Desktop no longer has enough position information to represent them. This can make separated ranges appear adjacent and makes navigation across unloaded history incomplete.

The previous plan in this issue was written before #4206 established the current architecture. Its Renderer virtualizer and PR1-PR4 implementation plan are superseded.

Current boundary

flowchart LR
    S[Storage<br/>complete transcript] --> P[Runtime Host pager<br/>bounded bodies]
    P --> D[Desktop<br/>bounded projection]
    D --> R[Renderer<br/>single scroll authority]
Loading

Direction

Add the smallest position contract needed by a real Desktop consumer:

  • Maintain lightweight Turn positions incrementally.
  • Page positions with a simple keyset cursor and stable revision or watermark.
  • Continue loading message bodies through the existing session.transcript.page path.
  • Let Desktop represent unloaded ranges without creating another scroll authority.
  • Deliver the first change as an end-to-end Desktop slice.

Do not introduce materialized full-history snapshots, durable generations or leases, a second body protocol, or a custom byte scanner unless the Desktop consumer demonstrates that they are necessary.

Acceptance

  • Navigating tail to old Turn to intermediate Turn to tail does not create false adjacency.
  • Durable Turns remain discoverable while message bodies stay bounded.
  • Appending a Turn does not rebuild an O(N) position snapshot.
  • The existing transcript scroll authority remains the only writer of scroll position.
  • Large-transcript performance does not regress from perf(desktop): bound transcript rendering and eliminate scroll LoAF #4206.

Related: #4206, #4244, #4295.

Codex helped analyze the architecture and draft this correction. I verified the issue against the current implementation and recent performance changes.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions