Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions docs/design/web-shell/web-shell-global-turn-navigation-phase2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## Status

Proposed, 2026-09-04. Builds on
Phase 2A implemented in [#11054](https://github.com/QwenLM/qwen-code/pull/11054)
(under review); Phase 2B pending. Original proposal: 2026-09-04. Builds on
`web-shell-global-turn-navigation.md` (Phase 1 merged as #10751) and the
page-table model of `web-shell-bounded-transcript-and-subagent-details.md`.

Expand All @@ -18,8 +19,11 @@ assigns the complete data layer — including those four — to Phase 2 and leav
Phase 3 as the rail UI. The parent design's delivery plan is updated in the
same PR so the two documents stop contradicting each other.

Facts about current code were verified against `origin/main` (`80497a74d0`),
which includes the merged Phase 1.
The [implementation plan](../../plans/2026-09-04-web-shell-global-turn-navigation-phase2.md)
supersedes the proposed API names and migration sequence below. Phase 2A adds
the headless index, isolated historical page table, reconciliation, and hooks;
Phase 2B migrates legacy sequential pagination. The problem analysis below
describes `origin/main` at `80497a74d0`, before Phase 2A.

## Problem

Expand All @@ -42,9 +46,9 @@ today:
- The rail (`SessionTimeline`) is derived from the loaded `messages` array, so
its completeness is coupled to transcript retention.

Phase 2 builds the two stores that remove those couplings and migrates the
existing sequential prepend pagination onto the new window before any random
jump is wired (the parent design's delivery order).
Phase 2A builds the two stores and headless random-read API without changing
the visible transcript. Phase 2B migrates existing sequential pagination;
Phase 3 wires the visible random-jump UI.

## Consumed contract (Phase 1, shipped)

Expand Down Expand Up @@ -542,8 +546,10 @@ retryable error storm.

### Migration of existing prepend pagination

Per the parent design, sequential prepend moves onto the window before random
access:
The original proposal below put sequential migration before the headless
random-access API. It is retained as design history, not the delivery order:
the parent design and implementation plan now place headless reads in Phase
2A, sequential compatibility in Phase 2B, and visible random access in Phase 3.

1. Introduce the ledger in degenerate form: the initial load page and every
prepend become ledger entries; eviction stays prefix-only (today's trim).
Expand Down
25 changes: 16 additions & 9 deletions docs/design/web-shell/web-shell-global-turn-navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## Status

Accepted; Phase 1 implemented, Phases 2–3 proposed, 2026-09-02.
Accepted; Phases 1 and 2A implemented, Phases 2B–3 proposed; delivery boundary
Comment thread
doudouOUC marked this conversation as resolved.
Resolved
clarified 2026-09-04.

This design complements
`web-shell-bounded-transcript-and-subagent-details.md`. That document defines
Expand Down Expand Up @@ -583,14 +584,20 @@ provisional reconciliation, and canonical locator map — belong to this phase,
leaving Phase 3 as the rail UI. The detailed design lives in
`web-shell-global-turn-navigation-phase2.md`.)

1. Land the immutable historical page table and separate live tail described
by the bounded-transcript design.
2. Add bidirectional boundaries, deduplication by record ID, page admission,
eviction, and detached-live behavior.
3. Migrate existing sequential prepend pagination to that window before adding
random jump.
4. Add the turn-index store, tail refresh, provisional reconciliation, and
canonical locator map.
Phase 2A (implemented in [#11054](https://github.com/QwenLM/qwen-code/pull/11054),
under review) delivers steps 1–3. Phase 2B delivers step 4. The
[implementation plan](../../plans/2026-09-04-web-shell-global-turn-navigation-phase2.md)
defines the current client contract and delivery slices.

1. Add the bounded turn-index store, tail refresh, provisional reconciliation,
and canonical locator map without coupling metadata residency to transcript
residency.
2. Land the immutable historical page table beside the existing connected live
window, with bidirectional boundaries, deduplication by record ID, page
admission, eviction, detached-live behavior, and random anchored reads.
3. Expose the complete headless state and locator contract needed by the rail.
4. Migrate existing sequential prepend pagination behind the page-table
boundary while preserving its current public behavior.

### Phase 3: global rail

Expand Down
Loading
Loading