Thread transfer impact
⚠️ The latest CI run did not produce a thread transfer result for c61cf64.
This comment will update automatically after the next completed run.
The timeline's follow-the-end and new-turn anchoring logic took about 550 lines in the middle of ChatView: the scroll-to-end pill state, about a dozen refs, the scroll, wheel, touch and keyboard listeners, page-scroll keys, and the anchor callbacks. Both send paths also repeated the same nine statements to arm the anchor.
chat/useTimelineFollow.ts now holds all of it. The send paths call anchorNewTurn(threadKey, messageId) instead. The anchor state itself stays in ChatView, because the timeline entries are derived from it.
The behavior is the same. Lint needed legendListRef and setTimelineAnchor added to effect deps; both are stable, so the effects run just as often as before.
| previous layer | this layer | |
|---|---|---|
| ChatView.tsx lines | 8,477 | 7,927 |
Renders were counted with the rc-init.js fiber counter on a dev server seeded from real data (median of 3 runs; base 6a6c84f vs the stack top before its rebase onto current main):
| Interaction | main: commits / renders (ChatView) | stack top: commits / renders (ChatView) |
|---|---|---|
| Type 20 chars in the composer | 22 / 678 (1) | 22 / 678 (1) |
| Switch threads | 14 / 779 (5) | 14 / 777 (5) |
| Open + close the terminal drawer | 15 / 494 (3) | 15 / 497 (3) |
| Open + close the right panel | 21 / 723 (4) | 21 / 726 (4) |
| Drag the right panel's resize handle | 13 / 139 (1) | 1 / 1 (0) |
The +3 renders are the new ChatTerminalDrawers and ChatRightPanel wrappers. The drag row is the right panel layer: the drag's final width commit used to re-render ChatView and the whole chat column, and now re-renders only ChatRightPanel.
Tests: vp test run src/reactCompilerCoverage.test.ts for ChatView and every new file (0 bailouts), tsc-rs --noEmit for apps/web, and oxlint on the changed files.
🤖 Generated with Claude Code
Review completed
Added 1 commit
⚠️ The latest CI run did not produce a thread transfer result for c61cf64.
This comment will update automatically after the next completed run.
Verdict: Approved at c61cf64
Macroscope's review found this PR approvable — This PR moves ChatView’s existing timeline-following, anchoring, and scroll-input handling into a dedicated hook while preserving the existing consumers and behavior. It is a contained reorganization with no new user-facing capability, schema change, default change, or broadened lint suppression.
You can add or adjust custom eligibility rules. Learn more.
No actionable comments were generated in the recent review. 🎉
7357d864-7e4f-4a86-888b-5f96f60b8c21Reviewing files that changed from the base of the PR and between 9c5f157e3dec5256e9ed593a68c129b41db0ba44 and c61cf64dae5de0bba59018c60d73e15b1061b846.
apps/web/src/components/ChatView.tsxapps/web/src/components/chat/useTimelineFollow.tsLimit details: You’ve used all 10 included reviews currently available.
ChatView now delegates timeline follow, scrolling, and anchoring behavior to the new useTimelineFollow hook. The hook manages user navigation, thread-specific positions, new-turn anchors, and end-of-timeline state. Message submission paths call anchorNewTurn.
Changes: Timeline follow behavior
| Layer / File(s) | Summary |
|---|---|
Hook contract and ChatView integration apps/web/src/components/chat/useTimelineFollow.ts, apps/web/src/components/ChatView.tsx | The new hook exposes timeline state and handlers. ChatView uses the hook instead of inline follow logic, and normal and plan follow-up submissions call anchorNewTurn. |
User navigation and live follow apps/web/src/components/chat/useTimelineFollow.ts | The hook handles scroll and keyboard navigation, cancels queued or active programmatic scrolling when the user navigates, and scrolls to the timeline end while honoring reduced-motion settings. |
Anchor and thread-state lifecycle apps/web/src/components/chat/useTimelineFollow.ts | The hook positions and restores new-turn anchors, updates follow state for tool activity and timeline-end changes, and restores remembered state when threads change. |
Priority: ⬇️ Low
Estimated code review effort: 4 (Complex) | ~60 minutes
Change: Refactor
Suggested reviewers: t3dotgg
c61cfThis refactor moves timeline follow and anchoring logic into a hook without an identified behavior change. No concrete merge-blocking risk was found.
Failed Failed checks: 1 warning
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Description check | Warning | The description explains the problem, implementation, behavior comparison, performance measurements, and verification commands. It does not include the required Scope and approval section or explain t… | Add a Scope and approval section with the triaged issue or explicit maintainer approval, including the approval comment, or explain why this focused refactor qualifies for an exemption. Add before-and-after screenshots and a short recording… |
| Check name | Status | Explanation |
|---|---|---|
| Title check | Passed | The title clearly identifies the main change: moving ChatView timeline-follow and anchoring logic into useTimelineFollow. |
| Linked Issues check | Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | Passed | Check skipped because no linked issues were found for this pull request. |
Explanation
The description explains the problem, implementation, behavior comparison, performance measurements, and verification commands. It does not include the required Scope and approval section or explain the issue and maintainer approval basis. It also omits the required before-and-after screenshots for a UI change.
Resolution
Add a Scope and approval section with the triaged issue or explicit maintainer approval, including the approval comment, or explain why this focused refactor qualifies for an exemption. Add before-and-after screenshots and a short recording if interaction timing or scrolling behavior requires visual evidence. State any verification that could not be completed.
Note
This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.
Comment @coderabbitai help to get the list of available commands.