fix(desktop/transcript): accurate insight-turn jumps — auto behavior + item-height estimate#349
Merged
Conversation
…+ item-height estimate
physercoe
approved these changes
Jul 20, 2026
physercoe
left a comment
Owner
There was a problem hiding this comment.
Reviewed — approve. Focused on what CI can't catch (correctness/regressions).
- Diff matches the description; only two hunks in
AgentTranscript.tsx(behaviorsmooth→auto;defaultItemHeight={120}on the insight Virtuoso). scrollToSeqis shared by both the live lens stepper and insight jumps;autofixes the same estimated-height overshoot for both — consistent, no live-path regression.defaultItemHeight={120}matches the live list exactly, so the two instances are now consistent; it only seeds the pre-measurement estimate.- The 1.4s
ev-flashthe PR cites for orientation genuinely exists and is applied on jump, so nothing visual is lost by dropping the smooth animation. - No index/off-by-one/behavior-string bugs;
index < 0guarded.
Non-blocking (pre-existing, not introduced here): a single virtuosoRef is shared by both Virtuoso instances — safe only because exactly one renders per mode.
physercoe
pushed a commit
that referenced
this pull request
Jul 20, 2026
…) + quiescence reveal / #331 (#350) Co-Authored-By: Claude Opus 4.8 <[email protected]>
physercoe
pushed a commit
that referenced
this pull request
Jul 20, 2026
…rity (#332) Two director-reported insight-mode bugs, both fixed against the mobile InsightTranscript reference (lib/widgets/insight_transcript.dart): 1. Turn jumps landed at the same position. A turn's `start_seq` anchors to a turn.start marker, which is ALWAYS_HIDDEN (never a rendered row), so the exact `findIndex(seq)` returned -1 and scrollToSeq bailed without moving the view. #349's smooth→auto change couldn't help — the index never resolved. Now, when there's no exact row, seek lands on the nearest visible row AT OR AFTER the target (the turn's first rendered event), mirroring insight_transcript.dart:1404 ("the anchor may be a hidden marker (ACP turn.start) or filtered out"). Flash the row actually landed on. 2. Insight showed telemetry the live feed hides ("started M2", turn.start, turn.result, usage, lifecycle). Insight now applies the SAME isHiddenInFeed filter as live (insight_transcript.dart:1377), with a Details toggle in the nav header to reveal the verbose-only tier (parity with mobile's verbose chip). Build (tsc + vite) + lint-desktop-tokens clean. Co-Authored-By: Claude Opus 4.8 <[email protected]>
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.
What
Fixes a director-reported bug in the agent transcript's INSIGHT view: clicking different turns (or error rows) jumped to the same — wrong — position instead of the turn's location.
Two surgical changes, both in
desktop/src/surfaces/AgentTranscript.tsx:scrollToSeqnow callsscrollToIndexwithbehavior: 'auto'instead of'smooth'.defaultItemHeight={120}(parity with the live list).Root cause
Verified against the react-virtuoso 4.18.10 sources (
node_modules/react-virtuoso/dist/index.mjs, scrollToIndex system ~:1100-1160):defaultItemHeight, so early-measured rows skewed the average. Estimates for distant indices overshot, and the browser clamped the scroll at the same max offset (bottom) — hence different turns landing at the same position.smoothScrollTargetReachedfires, and a hardsetTimeout(..., 1200)cleanup cuts that retry chain mid-flight, leaving the list wherever the last estimated fling stopped.'auto'path instead re-firesscrollToIndexon everylistRefresh(debounced 150ms) until the list stops changing — it converges to the true offset as rows get measured.The 1.4s ev-flash that already follows a jump gives the user the orientation the smooth animation was providing, so nothing is lost visually. The added
defaultItemHeight={120}improves the estimate the auto-retry converges from.Side effect (intentional improvement, not scope creep): the live-mode lens stepper uses the same
scrollToSeq, so its long-distance jumps are now accurate too.How verified
npm ci && npm run build(desktop): clean (tsc + vite).bash scripts/lint-desktop-tokens.sh: clean (66 off-token, all <= baseline, no phantom tokens).git diff origin/main --stat: 1 file changed, 15 insertions(+), 1 deletion(-) —desktop/src/surfaces/AgentTranscript.tsxonly.