You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): keep minimap scroll updates out of the timeline - #39613
Scrolling a long thread changes the minimap's current turn. That state update re-renders the whole conversation timeline and virtualized list, even though only the minimap navigation controls depend on it.
Change
Keep the current turn and bottom position in a store scoped to the timeline. Only the minimap subscribes to it. The same scroll measurements still drive the controls.
Scope
Addresses one source of extra renders related to #39545 in the web client shared by the desktop app.
Verification
On Omarchy Linux, mounted the real timeline in headless Chromium with 320 synthetic turns. Starting at the bottom, scrolled to the top and five evenly spaced positions, letting each move settle. T3's React render counter reported:
Component
Before
After
Conversation timeline
6
0
Virtualized list
6
0
Minimap
6
6
All three existing minimap browser tests passed, covering Previous/Next navigation, restoring a thread above the bottom, and bottom detection after resize or footer growth. pnpm exec node scripts/check-changed.ts origin/main passed, including 196 timeline tests, React Compiler coverage, type checking, lint, formatting, and Knip.
The render counts measure React work. End-to-end desktop frame timing and the remaining list measurement cost from #39545 were outside this check.
Reviewing files that changed from the base of the PR and between c32014d and d67639e.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
MessagesTimeline now keeps minimap position in a Zustand store and updates it only when the calculated index or end status changes. TimelineMinimap receives the store and reads both values from it.
Changes: Minimap position state
Layer / File(s)
Summary
Store contract and minimap subscription apps/web/src/components/chat/MessagesTimeline.tsx, apps/web/src/components/chat/TimelineMinimap.tsx
TimelineMinimapPosition defines the store values. MessagesTimeline creates and updates the store when either value changes, then passes it to TimelineMinimap, which reads the values with useStore.
pingdotgg/t3code#39545 — The changes address one source of timeline re-renders during scrolling, but do not address the issue’s remaining legend-list work.
Possibly related PRs
pingdotgg/t3code#33038 — Both changes use minimap bottom-position state and its refresh path.
pingdotgg/t3code#33036 — Both changes involve the current-turn state and its computation.
pingdotgg/t3code#30084 — The in-view result computed by refreshMinimap is among the values moved into the store.
This change keeps minimap scroll-state updates from re-rendering the conversation timeline. No merge-blocking risk was identified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: minimap scroll-state updates are kept out of the timeline, which matches the raw summary and objectives (store-scoped current turn and bottom position, subscribed only…
Description check
The description covers the required template sections: Problem, Change, Scope, and Verification. The problem and change are clear and the scope links the related issue #39545. Verification is detailed…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: minimap scroll-state updates are kept out of the timeline, which matches the raw summary and objectives (store-scoped current turn and bottom position, subscribed only by the minimap). The title follows the conventional commit form and is specific, so it passes.
Full details: Description check
Explanation
The description covers the required template sections: Problem, Change, Scope, and Verification. The problem and change are clear and the scope links the related issue #39545. Verification is detailed, with a before/after render-count table, the browser tests run, and the repo check command. It also states what was not measured (end-to-end frame timing). The UI-change screenshot requirement is not met, since the render counts are numeric rather than before/after screenshots. The Scope section also does not say why this is a bug fix rather than a feature, nor does it link a specific bug issue, only #39545 as related. The agent attribution is present. Overall the description is mostly complete.
Resolution
Optional improvements: link the specific bug issue in Scope (or explain why none is needed), and clarify whether the change alters any user-visible UI. If it does, add before/after screenshots or a recording as the template requests.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between e963572 and c32014d.
Files selected for processing: 2
apps/web/src/components/chat/MessagesTimeline.tsx
apps/web/src/components/chat/TimelineMinimap.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The automated pipeline stopped on this pull request and will not merge it:
the capture step could not show the problem on the base commit, so there is nothing to prove fixed.
After seeding completed, reload the thread before each repetition. Scroll to the top and click Load earlier turns until absent; verify 320 minimap strips and no running turn. Scroll to the bottom and wait for 600 ms without a React commit. Measure a no-scroll control, reset counters, then set scrollTop to 0/6 through 5/6 of the scroll range, waiting for quiet after every move. Repeat seven times on each commit. Separately record the same sequence and check Next, Previous, strip midpoint selection, keyboard End/Enter, keyboard Home/Enter, and wheel forwarding.
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
size:M30-99 changed lines (additions + deletions).takeover:blockedTakeover blocked; reason in the PR bodyvouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
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
Scrolling a long thread changes the minimap's current turn. That state update re-renders the whole conversation timeline and virtualized list, even though only the minimap navigation controls depend on it.
Change
Keep the current turn and bottom position in a store scoped to the timeline. Only the minimap subscribes to it. The same scroll measurements still drive the controls.
Scope
Addresses one source of extra renders related to #39545 in the web client shared by the desktop app.
Verification
On Omarchy Linux, mounted the real timeline in headless Chromium with 320 synthetic turns. Starting at the bottom, scrolled to the top and five evenly spaced positions, letting each move settle. T3's React render counter reported:
All three existing minimap browser tests passed, covering Previous/Next navigation, restoring a thread above the bottom, and bottom detection after resize or footer growth.
pnpm exec node scripts/check-changed.ts origin/mainpassed, including 196 timeline tests, React Compiler coverage, type checking, lint, formatting, and Knip.The render counts measure React work. End-to-end desktop frame timing and the remaining list measurement cost from #39545 were outside this check.
Agent: OpenAI GPT-6.2 Sol via Codex in T3 Code.