Window long transcripts behind a Show-earlier pill - #207
Conversation
Long computer-use threads mount hundreds of rows — inline base64 screenshots included — so the DOM stays heavy even though the memoized list bails out of re-renders. ChatView and GroupView now mount only the last 120 messages; a quiet "Show earlier messages (X more)" pill at the top of the transcript pulls the boundary back by another 120 per click. The boundary is a pure decision in src/lib/transcript-window.ts: it is anchored per bot+task (render-phase reset on bot.id/threadId switch), so appends grow the window instead of sliding rows out from under the reader, and a thread that shrinks beneath a stale boundary — branch switch, edit rewind — falls back to a fresh tail window rather than blanking the transcript. Expanding must not yank the viewport: the click captures scrollHeight, then a layout effect shifts scrollTop by the growth before paint (browser scroll anchoring is disabled on these containers). The bottom-follow scrollTo keys on the FULL list's length, so expansion never re-triggers it, and expanding breaks follow the way any scrollback reading does. Tail-derived logic — working dots, lastBotTextId, regenerate — still computes from the full list. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 32 minutes Limit details: You’ve used all 3 included reviews currently available under your plan. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Comment |
main의 milind-soni#207(긴 대화 Show-earlier), milind-soni#206(Cmd+K 팔레트), milind-soni#204(iOS 컴패니언), milind-soni#203(스트리밍 코드 하이라이트) 병합. 충돌은 테스트 파일의 node:fs import union뿐이었다. Tested: pnpm typecheck, pnpm vitest run (94 files, 905 passed, 8 skipped) Confidence: high Scope-risk: narrow Reversibility: clean
In plain terms
Long threads (especially computer-use ones full of inline screenshots) no longer mount every message ever: the transcript renders the last 120, with a quiet "Show earlier messages (X more)" pill that expands by 120 per click. Applies to both 1:1 chats and rooms.
Notes
src/lib/transcript-window.ts) — the boundary is anchored: appends grow the window (rows you're reading never slide out), and a boundary stranded past the end by a branch switch/edit rewind falls back to a fresh tail instead of blanking.scrollTopshifts by the growth in auseLayoutEffectbefore paint (browser anchoring is off on this container). The restore also updates the follow heuristic's memory so it isn't read as a user scroll, and expanding breaks bottom-follow (reading scrollback shouldn't get re-pinned by a mid-expand stream event).Test plan
src/lib/transcript-window.test.ts— 15 tests: under/exact/over the window size, append anchoring, stepwise expansion to zero, clamp past start, shrink-under-boundary reset, empty thread, custom sizepnpm typecheckclean; fullpnpm vitest rungreen (751 passed); touched files add zero oxlint findings over base🤖 Generated with Claude Code