Repository navigation
fix(web): minimap Next turn no longer sticks on adjacent user messages - #33036
Merged
Merged
Conversation
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.
Problem
In a thread where one user message directly follows another (for example a follow-up sent before the agent replied), the timeline minimap's "Next turn" button stops advancing once the view reaches the pair. Further clicks do nothing, even with many turns below.
"Next turn" scrolls its target 24px below the top of the view, so the bottom of the row above stays on screen. The minimap takes the first user message on screen as the current turn. When the row above is also a user message, the current turn resolves back to it, and "Next turn" targets the same row on every click.
Change
TIMELINE_MINIMAP_TARGET_OFFSET, used both by the scroll and by this check.Scope and approval
Fixes #33026
Triaged via the automated issue flow.
Verification
MessagesTimeline messages > steps the minimap's next turn past two adjacent user messagesinMessagesTimeline.browser.test.tsxrenders the real timeline in Chromium with three turns, two adjacent user messages, then two more turns, and steps through with "Next turn". On main it fails withturn at the top after Next turn: expected 'pair-b' to be 'turn-3'; on this branch it passes (re-run 3× by a reviewer).790f0ac.Evidence
For #33036: before 7171fdd, after 790f0ac. Eleven scoped rows retained, with the requested gap scenes added. Other rows below preserve round-one evidence. R05 remains an explicitly labelled fractional state/geometry harness, not proof of native fractional measurement.
Headless Chromium 148.0.7778.96 / Playwright 1.60.0, Linux x64; fresh databases created by each revision, synthetic RPC-dispatched turns only; message roles/text/createdAt verified equal. 1440×900, DPR1 except the preserved R05 DPR2 harness; fine mouse, no device emulation; en-US/UTC, 100% fonts/root16px, frozen 2026-11-10T09:00:00Z. Original R10/R12 viewport sizes and R03 motion remain as documented in their retained rows. All new stills: reduced motion, loaded fonts/network idle, two byte-identical full screenshots 500ms apart. Diff0: AE/fuzz0%, every changed pixel amplified red; DiffT: fuzz2%. Times are settled observations from recording start, not mouse-down times; allow 0.1s screencast/resampling tolerance. New narrated recordings add a 100px caption band below the untouched app viewport; speech is locally synthesized. The observation overlay reads current selections/coordinates; composer occlusion is retained.
R01 · 1440×900 · light · Adjacent pair, Next from the top
Environment: Chromium 148.0.7778.96 / Playwright 1.60.0; no device emulation; fine pointer; DPR 1; font scaling 100%,root 16px; 1440×900 CSS px; light; reduced motion; frozen clock as above.

Script: Start at turn-0; activate Next seven times (the last attempt is disabled after the fix). Still after activation 5.
Before observations: 0.00s start; 2.07s Next; 3.11s Next; 4.14s Next; 5.18s Next; 6.22s Next; 7.55s still:settled; 8.65s Next; 9.70s Next.
After observations: 0.01s start; 2.07s Next; 3.10s Next; 4.14s Next; 5.17s Next; 6.20s Next; 7.55s still:settled; 8.65s Next; 8.66s Next disabled.
Before recording: R01-before.mp4
After recording: R01-after.mp4
Before repeats pair-b; after visits turn-3 and turn-4 and disables Next at the final current turn.
Diff0: 1,679/1,296,000 pixels; DiffT 2%: 1,285.
R01-interaction.json
Full comparison sheet:
R02 · 1440×900 · dark · Adjacent pair, Previous from the final turn, then Next twice
Environment: Chromium 148.0.7778.96 / Playwright 1.60.0; no device emulation; fine pointer; DPR 1; font scaling 100%,root 16px; 1440×900 CSS px; dark; reduced motion; frozen clock as above.

Script: Start with turn-4 aligned at the top; attempt Previous seven times, then Next twice. Still after Previous 3.
Before observations: 0.00s start; 2.04s Previous; 3.09s Previous; 4.12s Previous; 5.55s still:settled; 6.66s Previous; 7.71s Previous; 7.72s Previous disabled; 7.72s Previous disabled; 8.78s Next; 9.88s Next.
After observations: 0.02s start; 2.12s Previous; 3.18s Previous; 4.22s Previous; 5.67s still:settled; 6.83s Previous; 7.92s Previous; 8.96s Previous; 8.97s Previous disabled; 10.06s Next; 11.11s Next.
Before recording: R02-before.mp4
After recording: R02-after.mp4
Before skips pair-a when reversing from pair-b; after visits pair-a, then turn-2. Both reach the first endpoint and return through turn-1/turn-2.
Diff0: 14,720/1,296,000 pixels; DiffT 2%: 11,670.
R02-interaction.json
Full comparison sheet:
R03 · 1440×900 · light · Triple, smooth scrolling, repeated clicks and reversal
Environment: Chromium 148.0.7778.96 / Playwright 1.60.0; no device emulation; fine pointer; DPR 1; font scaling 100%,root 16px; 1440×900 CSS px; light; normal smooth scrolling; reduced only for settled still; frozen clock as above.

Script: Start at turn-0; Next ×4 with 1100 ms post-input waits; Next ×2 with 80 ms post-input waits; reverse with Previous; settle and capture; Next, Previous. Inputs use direct trusted mouse clicks, bypassing Playwright stability waits so rapid clicks occur during smooth motion.
Before observations: 0.01s start; 2.21s Next; 3.35s Next; 4.77s Next; 5.90s Next; 6.01s Next; 6.11s Next; 7.54s Previous; 9.02s still:settled; 10.28s Next; 11.42s Previous.
After observations: 0.01s start; 2.20s Next; 3.33s Next; 4.49s Next; 5.96s Next; 6.07s Next; 6.17s Next; 7.51s Previous; 8.98s still:settled; 10.21s Next; 11.34s Previous.
Before recording: R03-before.mp4
After recording: R03-after.mp4
After the rapid inputs and reversal, before settles at turn-2; after settles with pair-b at the top and pair-c immediately below. The recording shows intermediate motion; a repeated in-flight target is not counted as a skipped turn.
Diff0: 15,608/1,296,000 pixels; DiffT 2%: 12,302.
R03-interaction.json
Full comparison sheet:
R04 · 1440×900 · dark · Wheel across the top band, then Next/Previous
Environment: Chromium 148.0.7778.96 / Playwright 1.60.0; no device emulation; fine pointer; DPR 1; font scaling 100%,root 16px; 1440×900 CSS px; dark; reduced motion; frozen clock as above.


Script: Start with pair-b aligned and pair-a tail in the top band; wheel −5 px, wheel +5 px; capture identical-geometry band frame; Next, capture divergence; Previous.
Before observations: 0.00s start; 1.01s pair-b aligned: pair-a tail in top band; 2.05s wheel -5; 3.06s wheel +5; 4.44s still:band; 5.54s Next; 6.94s still:settled; 8.06s Previous.
After observations: 0.00s start; 1.01s pair-b aligned: pair-a tail in top band; 2.05s wheel -5; 3.06s wheel +5; 4.46s still:band; 5.56s Next; 6.97s still:settled; 8.08s Previous.
Before recording: R04-before.mp4
After recording: R04-after.mp4
At the same band position both full surfaces and in-view ticks are pixel-identical; the following Next remains at pair-b before and advances to turn-3 after.
Diff0: 1,733/1,296,000 pixels; DiffT 2%: 1,434.
R04-interaction.json
Full comparison sheet:
Same geometry before Next: full-range tick highlighting and the whole surface are identical at zero threshold.
Gap addition — bottom boundary (dark): Start turn-1 top at 852px, viewport end 848px; wheel +8 (top844), −8 (top852), +8, Next, Previous. Both revisions select turn-0 / Next turn-1 while outside, turn-1 / Next turn-2 while inside; tick 1 enters/leaves identically. Next reaches turn-2 and Previous turn-1. The edge lies under the composer; measurements now appear only in the caption band below the untouched app viewport. No observer covers the message lane or destination labels. Every paired control still has Diff0=DiffT=0.
Before: narrated recording · raw recording. Observations: 0.03s start; 1.05s turn-1 top is 4px BELOW bottom viewport edge; assistant-only view; 2.64s still:outside; 3.83s wheel +8: turn-1 ENTERS bottom edge by 4px; 5.41s still:inside; 6.65s wheel -8: turn-1 LEAVES bottom edge; 8.15s still:outside-again; 9.29s wheel +8: turn-1 enters again; observe current and Next target; 10.39s Next; 11.90s still:settled; 13.11s Previous.
After: narrated recording · raw recording. Observations: 0.03s start; 1.04s turn-1 top is 4px BELOW bottom viewport edge; assistant-only view; 2.55s still:outside; 3.65s wheel +8: turn-1 ENTERS bottom edge by 4px; 5.12s still:inside; 6.21s wheel -8: turn-1 LEAVES bottom edge; 7.87s still:outside-again; 8.98s wheel +8: turn-1 enters again; observe current and Next target; 10.16s Next; 11.66s still:settled; 12.88s Previous.
Coordinates, selections, ticks and recording clock
Gap addition — assistant only (dark): No user row is visible. Both select preceding turn-1, Next turn-2, Previous turn-0. Next and Previous are demonstrated independently from the same assistant-only start; destination labels are unobstructed and all paired stills have Diff0=DiffT=0. All 14 retaken stills passed the 500ms byte-identical check; all raw/narrated recordings were visually inspected. Top-band captures above have no observer and are retained. Retake artifacts, stability pairs and reproduction.
Before: narrated recording · raw recording. Observations: 0.02s start; 1.03s assistant-only viewport: no visible user; observe current/Next/Previous; 2.48s still:assistant-only; 3.66s Next; 5.08s still:next-target; 5.80s restore same assistant-only start; 6.88s Previous; 8.39s still:settled.
After: narrated recording · raw recording. Observations: 0.01s start; 1.06s assistant-only viewport: no visible user; observe current/Next/Previous; 2.56s still:assistant-only; 3.77s Next; 5.61s still:next-target; 6.40s restore same assistant-only start; 7.53s Previous; 9.16s still:settled.
Coordinates, selections, ticks and recording clock
R07 · 1440×900 · dark · Next-only terminal endpoint
Pre-existing, unchanged by this PR. Setup selects penultimate turn-3 with the rail keyboard before recording. Recording then uses Next clicks only, never wheel. Both reach scrollTop19829/max20009 (180px short); terminal turn-4 top781px is behind the composer; Next disables. Capture is taken at that exact endpoint. Full paired endpoint Diff0=DiffT=0. This demonstrates the shared occlusion, not a visibility fix.
Before: narrated recording · raw recording. Observations: 0.00s start; 2.03s Next; 2.03s Next-only endpoint: pre-existing, unchanged by this PR; final user behind composer; 3.37s still:settled; 3.41s Next disabled.
After: narrated recording · raw recording. Observations: 0.01s start; 2.04s Next; 2.04s Next-only endpoint: pre-existing, unchanged by this PR; final user behind composer; 3.40s still:settled; 3.44s Next disabled.
Coordinates, selections, ticks and recording clock
R13 · 1440×900 · light · Keyboard focus, arrows, Home/End, Enter/Space
Environment: Chromium 148.0.7778.96 / Playwright 1.60.0; no device emulation; fine pointer; DPR 1; font scaling 100%,root 16px; 1440×900 CSS px; light; reduced motion; frozen clock as above.

Script: Start with pair-b aligned; focus rail; ArrowDown, Enter; capture; ArrowUp, Home, Enter, End, Enter, Home, ArrowDown, Space; blur.
Before observations: 0.00s start; 1.02s focus rail; 1.04s ArrowDown; 2.05s Enter; 3.40s still:settled; 4.09s ArrowUp; 4.75s Home; 5.41s Enter; 6.07s End; 6.74s Enter; 7.40s Home; 8.06s ArrowDown; 8.71s Space; 8.74s blur.
After observations: 0.00s start; 1.02s focus rail; 1.04s ArrowDown; 2.05s Enter; 3.42s still:settled; 4.12s ArrowUp; 4.79s Home; 5.45s Enter; 6.11s End; 6.77s Enter; 7.44s Home; 8.10s ArrowDown; 8.77s Space; 8.79s blur.
Before recording: R13-before.mp4
After recording: R13-after.mp4
Rail focus initially previews pair-a before versus pair-b after. ArrowDown+Enter therefore selects pair-b before versus turn-3 after. Focus previews and their outlines are intentional in the stills.
Diff0: 35,415/1,296,000 pixels; DiffT 2%: 22,079.
R13-interaction.json
Full comparison sheet:
Pointer addition (light): Pointer-click pair-a tick (index3/6), then arrow buttons Next twice and Previous twice. Tick click and first Next are identical across revisions (Diff0=0). Second Next: main repeats pair-b; fix reaches turn-3. First Previous: main skips to turn-2; fix reaches pair-b. Second Previous: main reaches turn-1; fix reaches pair-a.
Before: narrated recording · raw recording. Observations: 0.00s start; 1.71s pointer hover pair-a tick; 2.72s pointer CLICK pair-a tick; 4.03s still:tick-click; 5.10s Next; 6.43s still:first-next; 7.51s Next; 8.81s still:settled; 9.88s Previous; 11.18s still:previous; 12.23s Previous.
After: narrated recording · raw recording. Observations: 0.00s start; 1.72s pointer hover pair-a tick; 2.73s pointer CLICK pair-a tick; 4.06s still:tick-click; 5.14s Next; 6.46s still:first-next; 7.53s Next; 8.87s still:settled; 9.95s Previous; 11.28s still:previous; 12.35s Previous.
Coordinates, selections, ticks and recording clock
R10 · 1100×900 · dark · Hover-only rail — labelled geometry harness
Environment: Chromium 148.0.7778.96 / Playwright 1.60.0; no device emulation; fine pointer; DPR 1; font scaling 100%,root 16px; 1100×900 CSS px; dark; reduced motion; frozen clock as above.

Script: Start at turn-0 with rail hidden; hover/click Next seven times; capture after activation 5; clear focus and leave rail, which becomes hidden again.
Before observations: 0.00s start; 1.01s hover-only rail hidden at rest; 2.07s Next; 3.09s Next; 4.13s Next; 5.16s Next; 6.20s Next; 7.53s still:settled; 8.63s Next; 9.68s Next; 10.39s leave rail: hidden at rest.
After observations: 0.00s start; 1.01s hover-only rail hidden at rest; 2.06s Next; 3.10s Next; 4.13s Next; 5.16s Next; 6.20s Next; 7.55s still:settled; 8.63s Next; 8.64s Next disabled; 9.36s leave rail: hidden at rest.
Before recording: R10-before.mp4
After recording: R10-after.mp4
Controlled inline padding 26 px produces measured gutter 32 px and pointer strip 20 px at 1100×900. Rail opacity is 0 at start/end and 1 during interaction. The usual desktop minimum gutter required a labelled geometry override; this is not natural-width proof.
Diff0: 1,737/990,000 pixels; DiffT 2%: 1,437.
R10-interaction.json
Full comparison sheet:
R05a · 1440×900 · light · 24px / 24.5px / 25px — labelled state/geometry harness
Retaken fractional state/geometry harness (light, DPR2): Same retained list-ref substitution as round one: pair-a cached51px is replaced with measured DOM50.75px; fractional padding controls its bottom. Only the harness badge border radius is now zero, identically on both sides. Every badge-area pixel matches at fuzz0%; no unexplained badge pixels remain. At pair-a bottom24/24.5/25px: main selects pair-a; fix selects pair-b. Next at25px remains at pair-b before and reaches turn-3 after.
Before: narrated recording · raw recording. Observations: 0.00s start; 3.22s set pair-a bottom 24px; 3.24s focus current at 24px; 5.02s Next; 6.06s Previous; 8.89s set pair-a bottom 24.5px; 8.90s focus current at 24.5px; 10.68s Next; 11.71s Previous; 14.53s set pair-a bottom 25px; 14.54s focus current at 25px; 16.29s Next; 17.62s still:settled; 18.71s Previous.
After: narrated recording · raw recording. Observations: 0.00s start; 3.19s set pair-a bottom 24px; 3.21s focus current at 24px; 4.97s Next; 5.99s Previous; 8.80s set pair-a bottom 24.5px; 8.82s focus current at 24.5px; 10.59s Next; 11.60s Previous; 14.42s set pair-a bottom 25px; 14.43s focus current at 25px; 16.19s Next; 17.53s still:settled; 18.59s Previous.
Coordinates, selections, ticks and recording clock
R05b · 1440×900 · light · 25px / 25.5px — labelled state/geometry harness
Retaken fractional state/geometry harness (light, DPR2): Same retained list-ref substitution as round one: pair-a cached51px is replaced with measured DOM50.75px; fractional padding controls its bottom. Only the harness badge border radius is now zero, identically on both sides. Every badge-area pixel matches at fuzz0%; no unexplained badge pixels remain. At25px: main selects pair-a, fix pair-b. At25.5px: both select pair-a, and the full focus still is pixel-identical at zero threshold. Next then Previous from25.5px reaches turn-2 before and pair-a after.
Before: narrated recording · raw recording. Observations: 0.00s start; 3.40s set pair-a bottom 25px; 3.43s focus current at 25px; 5.26s Next; 6.71s still:boundary25; 7.85s Previous; 10.75s set pair-a bottom 25.5px; 10.78s focus current at 25.5px; 12.90s still:boundary25-5; 14.04s Next; 15.11s Previous; 16.51s still:settled.
After: narrated recording · raw recording. Observations: 0.00s start; 3.22s set pair-a bottom 25px; 3.23s focus current at 25px; 4.99s Next; 6.31s still:boundary25; 7.38s Previous; 10.21s set pair-a bottom 25.5px; 10.22s focus current at 25.5px; 12.28s still:boundary25-5; 13.39s Next; 14.42s Previous; 15.76s still:settled.
Coordinates, selections, ticks and recording clock
R08 · 1440×900 · light · Two short users, no overflow
Environment: Chromium 148.0.7778.96 / Playwright 1.60.0; no device emulation; fine pointer; DPR 1; font scaling 100%,root 16px; 1440×900 CSS px; light; reduced motion; frozen clock as above.

Script: From the top, activate Next, attempt disabled Previous, capture. No overflow means physical scrolling cannot align the second user at the target offset.
Before observations: 0.00s start; 2.08s Next; 2.09s Previous disabled; 3.51s still:settled.
After observations: 0.00s start; 2.07s Next; 2.09s Previous disabled; 3.49s still:settled.
Before recording: R08-before.mp4
After recording: R08-after.mp4
Both revisions keep first current because both users remain in the non-scrolling viewport. Previous is disabled; Next cannot produce physical movement. Zero differing pixels in the settled pair.
Diff0: 0/1,296,000 pixels; DiffT 2%: 0.
R08-interaction.json
Full comparison sheet:
R12 · 1100×900 · light · Zero pointer strip, keyboard — labelled geometry harness
Environment: Chromium 148.0.7778.96 / Playwright 1.60.0; no device emulation; fine pointer; DPR 1; font scaling 100%,root 16px; 1100×900 CSS px; light; reduced motion; frozen clock as above.

Script: Start at pair-b; focus Previous to establish keyboard entry; Tab into rail, Shift+Tab out, Tab back; ArrowDown, Enter; capture; Home, Enter, End, Enter, Space.
Before observations: 0.00s start; 1.08s Tab from Previous into rail at pair-b; 1.14s Shift+Tab to Previous; 1.16s Tab back into rail; 1.19s ArrowDown; 1.99s Enter; 3.35s still:settled; 4.05s Home; 4.71s Enter; 5.37s End; 6.04s Enter; 6.69s Space.
After observations: 0.01s start; 1.09s Tab from Previous into rail at pair-b; 1.14s Shift+Tab to Previous; 1.16s Tab back into rail; 1.18s ArrowDown; 1.99s Enter; 3.33s still:settled; 4.02s Home; 4.68s Enter; 5.34s End; 6.00s Enter; 6.66s Space.
Before recording: R12-before.mp4
After recording: R12-after.mp4
Full chat width with controlled inline padding 0 px gives measured gutter 6 px and strip 0 px. Fine-pointer keyboard focus still reveals the rail. Tab/Shift+Tab/Tab exercise local reach; the entire page’s Tab order is not covered. ArrowDown+Enter selects pair-b before and turn-3 after.
Diff0: 34,947/990,000 pixels; DiffT 2%: 22,079.
R12-interaction.json
Full comparison sheet:
What else changed:
Unverified rows, reproduction and audit
R17 remains unverified (guest path needs unavailable T3 Connect). R18/R09/R11/R14–R16/C01–C05 were outside the lead’s scoped captures; R06 mixed-height/attachment/disclosure remains unverified. Natural R05 fractional measurement and natural R10/R12 gutter settings remain unverified; their explicit harnesses do not establish native layout. R07 terminal-message visibility remains a pre-existing issue. Gap reproduction · Verified synthetic fixture · Capture audit · Round-one reproduction · capture.mjs · seed.mjs · seed-agent.mjs · rpc-driver.mjs · pair-bootstrap.mjs · freeze-clock.mjs · assemble.py · verify-seed.py · audit-captures.py · narrate.py · review-videos.py · write-gap-evidence.py · upload-gap.py · All captures, masks, raw recordings, narration, source frames and scripts
Cleanup: cleanup.py · cleanup-report.txt
AI-assisted; verified with the tests and tools listed above.