Repository navigation
feat: navigate long chats with a previewable position rail - #138603
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 5, 2026, 3:00 PM ET / 19:00 UTC. ClawSweeper reviewWhat this changesAdds a desktop chat-position rail with message previews, keyboard navigation, reader-position tracking, and automatic hiding when the transcript lacks spare space. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this remains a distinct feature absent from the inspected main and release trees. Earlier findings are addressed, no new blocking defect was established, and product sponsorship remains explicitly pending. Likely related people: Peter Steinberger — unverified routing candidate, low confidence. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI renders loaded conversation messages through a session-owned transcript virtualizer. The rail samples visible conversational messages and uses the existing scroll owner to reveal a selected destination without fetching additional history. flowchart LR
A[Loaded conversation messages] --> B[Visible transcript rows]
B --> C[Sampled landmarks]
D[Reader position and pane geometry] --> E[Transcript scroll owner]
E --> C
C --> F[Preview and keyboard controls]
F --> E
E --> G[Selected message revealed]
Decision needed
Why: The author explicitly leaves product sponsorship pending; source correctness and browser proof cannot establish design acceptance. Before merge
Agent review detailsSecurityNone. PR surfaceSource +557, Tests +529. Total +1086 across 10 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep landmarks and navigation within the existing transcript owner, preserving loaded-history limits, saved widths, native scrolling, and session-scoped cleanup. Do we have a high-confidence way to reproduce the issue? Not applicable as an existing-product bug: this proposes a navigation capability. Captured browser scenarios exercise the feature and earlier branch regressions; this read-only review did not execute them. Is this the best way to solve the issue? Yes at the architectural level: the patch reuses visible-row projection, preview text, and message reveal instead of introducing another scroll listener or pagination owner. Product acceptance remains a separate decision. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ac53dc9687ca. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
…138603) * feat: add previewable conversation-position rail * fix: keep conversation rail current during reader scrolling * fix: keep rail previews readable and dismissible on hover * fix: keep conversation rail clear of full-width messages * fix(ui): measure position rail after nested layout settles --------- Co-authored-by: brokemac79 <[email protected]>
Closes #138587
What Problem This Solves
Long conversations are difficult to navigate by scrolling alone: the scrollbar shows distance, but not the content at a destination.
Why This Change Was Made
Adds a restrained, previewable conversation-position rail in the spare gutter of wide Control UI chat panes. Up to ten landmarks sample visible, loaded conversational rows. Hover or focus previews a destination; click or Enter/Space reveals its message through the existing transcript virtualizer.
User Impact
Readers can orient themselves and return to earlier exchanges without guessing from scrollbar position. This complements transcript search rather than replacing it.
Author direction: proceed with the desktop, loaded-history rail shown below. This implementation follows the author's approved interactive mockup. This is a proposed product addition, not a claim that project-wide design approval or merge approval has already been granted.
Maintainer decision pending: the author will share this PR on Discord once implementation and code review are complete, so a Control UI maintainer can evaluate the interaction, modify the editable branch, and decide whether to merge it. Product sponsorship is not yet established; this PR requests that review rather than claiming merge readiness.
Review Follow-up
The first hosted ClawSweeper review identified missing reader-position invalidation. Reproduced the precise failure: with 120px rows and a 600px viewport, offsets 50 → 70 retain the same visible range while the midpoint moves from row 2 to row 3. TanStack memoizes notifications by scrolling state and range endpoints, so it did not request the second render.
The repair publishes distinct offset changes through the transcript's existing observer, including native-offset synchronization. Lit coalesces render requests; no second scroll listener or parallel scroll owner is added. Meaningful viewport changes invalidate the marker too. The regression asserts rendered
aria-currentthrough consecutive forward/backward scroll events, resize, duplicate-event suppression, and disconnection cleanup. It failed before the repair and passes afterward.The broader end → middle → top browser scenario also passes in both themes. The review's prediction that this broad scenario fails was not reproduced; the same-range case above establishes the actual defect and repair.
The transcript owner is the appropriate repair boundary: a second rail-owned scroll subscription would duplicate lifecycle and offset synchronization, while invalidation through the existing new-message indicator misses unchanged indicator state. The directive retains only transient interaction state and delegates position and navigation to that owner.
Independent Codex review also identified that a mouse-only preview could not be hovered. Its browser regression failed before repair. The rail and preview now share a contiguous hover region; marker hit targets remain above the transparent bridge. Escape dismisses the preview even when focus stays in the composer, clears stale hover state, and leaves focus alone. The preview's Lit ref owns the single key listener and removes it on teardown. Browser coverage verifies stepped pointer movement onto the text, dismissal, re-entry, and subsequent keyboard navigation in both themes. This follows the hoverable/dismissible requirements described in WCAG 1.4.13; assistive-technology user testing itself was not performed.
The next hosted ClawSweeper review accepted the scroll repair and marked the behavior proof sufficient, then identified overlap with saved full-width message settings. The new browser regression reproduced that failure in both themes before repair. The transcript geometry owner now measures the actual right-side gutter after committed layout, viewport changes, and sidebar commits (including unchanged outer width). It shows the rail only when 80px accommodates the marker/tick footprint and spacing. There is no new observer, settings parser, or width override. The browser changes the real Appearance setting through
100%,none,95%, and48rem, verifies persistence and rendered width, and checks that the rail hides or returns accordingly. A fixed-pane foreign-host geometry event also verifies inner-only width changes in both directions.The stronger unchanged-pane scenario also exposed a reduced-motion timing defect: the global 0.01ms transition duration let a synchronous geometry commit observe the old inner width. The transcript inner column now disables transitions, matching the existing virtual-row geometry policy. Both theme scenarios pass this regression without timers, additional observers, or changed motion preferences.
CI then caught an intermediate-layout regression in the gutter repair. On
341777c8900a41463c7a1e39afa7144bac148bbe, the existing question-footer and disclosure-anchor suites failed together at 505px and 48px from the end. A/B runs passed all 24 tests on the preceding revision and when gutter reads were disabled; retaining the reads without changing the visibility attribute reproduced both failures. A browser state trace showed the question transition moving native scrollTop from 561 to 449 without reader input, then setting the existing follow lock. The parent-update gutter measurement forced layout after removal of the old composer but before nested Lit content finished, allowing the browser to clamp against a temporary viewport.The geometry owner now registers a session-owned Lit controller that coalesces update-time measurements into one animation frame, after nested render work. Disconnect cancels pending work; execution-time getters and DOM ownership checks prevent stale measurements after remounts. Actual viewport-observer and sidebar-geometry commits remain synchronous. No scroll-policy change, additional row scan, observer, test timeout, or weakened assertion is needed. The previously failing suites plus both rail themes pass together: 26 browser tests. Existing tests provide the pre-fix regression evidence; no duplicate test or production-only testing hook was added.
Scope against the pinned base: production +560/-3 lines (net +557), tests +529/-0, ten files. The growth implements the new interaction and its styles; it adds no generic framework, dependency, configuration surface, or alternate navigation backend. The final repair replaces the unowned synchronous measurement with a cancellable, coalesced lifecycle owner, adding 31 net production lines. The lifecycle state is necessary to avoid intermediate layout and retire pending work on disconnect; sharing the row-measurement frame would add needless row scans during ordinary renders.
Evidence
Real Behavior Proof
Checked head:
decebd2a825b4e9da5050eb531f6fe039b7d3262, based on137698c76560b4b552e848533529c963ffed87fa. Behavior proof, the full changed-check gate, and independent Codex local-candidate and committed-branch reviews passed. Both reviews were scoped-clean through P2; the committed review includes the final behavior-preserving constructor-wiring cleanup. Product and merge decisions remain with a Control UI maintainer./chatentrypoint, actual transcript renderer, rail directive, and TanStack virtualizer in Chromium.chat-position-rail.e2e.test.tsuses the repository's mocked Gateway with 72 synthetic persisted conversation messages. Covers idle state, end/middle/top scrolls, hover styling and preview, keyboard jump to checkpoint 47, Escape, Home/End, pane-local width 800px, viewport width 900px, dark/light themes, and reduced motion. The real Appearance screen saves100%,none,95%, and48rem; the test verifies persistence, rendered width, rail visibility, and clear spacing. Same-pane foreign geometry commits cover inner-only width changes under reduced motion. Adjacent agent-run and focused-row browser scenarios also ran.provider=local-container, leasecbx_80e1f4d11c47, slugswift-krill-d8be, imagemcr.microsoft.com/playwright:v1.62.0-noble, Node 24.18.0, pnpm 12.1.0, frozen lockfile, Playwright 1.62.1. Commands below executed inside the owned worker withdocker exec --user crabboxafter Crabbox provisioning.137698c76560b4b552e848533529c963ffed87fawith the same synthetic fixture, not simulated by hiding the rail. The saved-width baseline is from9fb3c0982b4c65e81f20da027347fa36e994987e; its after screenshots cover the gutter and reduced-motion fixes. The question-footer baseline uses exact product revision341777c8900a41463c7a1e39afa7144bac148bbe; its after capture includes the lifecycle repair, before a behavior-preserving constructor-wiring cleanup. The final 33-test browser run includes that cleanup. The proof worker's tracked source was compared against committed headdecebd2a825b4e9da5050eb531f6fe039b7d3262withgit diff --exit-codeand matched exactly. Final Chromium run started at 00:42:06 UTC on September 5, 2026 and passed in 85.39 seconds; logs were retained asposition-rail-final-deferred-browser.logandposition-rail-final-deferred-focused.log. Question screenshots use.artifacts/position-rail-deferred-proof; earlier overview recordings use.artifacts/position-rail-final.Before and after
Same loaded conversation at its end, before the feature:
After, idle with the last landmark current and no preview:
Dark-mode hover preview:
Light-mode keyboard jump:
Continuous browser proof: scrolling, hover, keyboard jumps, and narrow-pane hiding. The recorder pads the smaller viewport during the narrow-pane portion.
[email protected]
Latest accessibility regression: the pointer is over the preview text while keyboard focus remains in the composer.
Continuous real-time recording of the updated scenario (approximately five seconds; includes hover-to-card, Escape, keyboard jumps, and narrow-pane hiding):
[email protected]
Saved full-width regression
Before the gutter repair,
100%message width lets the rail overlap the right-aligned message column:After the repair, the same setting and fixture retain their full-width layout and the rail hides:
Restoring
48rembrings back the rail with clear space beside the message column (light theme). Both after screenshots are from the successful nine-test gutter-repair run, before the behavior-preserving landmark-search simplification:Question-footer regression
The same synthetic question scenario before the lifecycle repair, built from
341777c8900a41463c7a1e39afa7144bac148bbe: older messages remain visible and the latest-message arrow appears despite no reader input. The existing end-follow assertion fails at 505px.After the repair, the latest assistant message stays above the question and the unnecessary arrow disappears. The unchanged test passes its end-position, question placement, and absent-arrow assertions.
The before capture uses a separate exact-product checkout with only diagnostic screenshot insertion in the test; the after capture is the test's existing screenshot hook. Both images were inspected before attaching.
Additional verification
node scripts/check-changed.mjs --base 137698c76560b4b552e848533529c963ffed87fa --timedgate passed: core-test and UI type checks, formatting, typed lint, UI style lint, keyless i18n verification, unused-export scans, and repository guards. Changed-file lint reported zero warnings and zero errors.@tanstack/virtual-core3.17.8 source:observeElementRect(lines 99–144), the native offset observer (170–230), and memoized range notification (737–758), plus@tanstack/lit-virtual/src/index.ts(1–100) for Lit update/lifecycle delegation. Linked proof images and videos were also loaded and inspected locally; the previous hosted review's DNS failure was a reviewer access limitation, not an unverified dependency claim or absent contributor artifact.scoped-cleanand no accepted P0–P2 findings before the behavior-preserving constructor-wiring cleanup. Final committed-branch review also completedscoped-cleanwith no accepted P0–P2 findings for137698c76560b4b552e848533529c963ffed87fa→decebd2a825b4e9da5050eb531f6fe039b7d3262.decebd2a825b4e9da5050eb531f6fe039b7d3262, including all thirteen UI browser shards and the real-Gateway browser lane. Both browser shards that failed on the preceding revision passed.No production deployment or merge has been performed.