Repository navigation
fix(thread): a trim's scrollTop clamp no longer unsticks the transcript (#1475) - #1491
Merged
currentbits merged 3 commits intoOct 6, 2026
Merged
Conversation
…-switch-frame-8d0baa' and 'origin/coder/perf-h-heap-renderer-heap-growth-3944b5' into coder/deep-dive-transcript-window-stops-trimmi-adb0e3
…pt (#1475) Trimming the tail window's head makes the browser clamp scrollTop, and the clamp's scroll event can land after the next streamed push grew the tail past STICK_BOTTOM_PX. onBodyScroll read that as the user scrolling up, so the window stopped trimming for the rest of the session. Ignore scrolls for the two frames a trim's clamp can take to dispatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Oct 6, 2026
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.
Part of #1475 (deep dive). During the renderer-heap investigation, in about 2 of 10 soaks the transcript window never trimmed again, as if #1482 weren't there. It's a real app bug; root cause and numbers are in
docs/perf/2026-10-06-window-trim.md.Root cause: the window's own trim unpins the view.
scrollTopto the new height, and that clamp'sscrollevent is dispatched a frame later.STICK_BOTTOM_PX(80), soonBodyScrollreads it as the user scrolling up.Logs ruled out the #607 pins, the #1489 fill-in and the ResizeObserver pins.
Fix: after a trim while stuck,
onBodyScrollignores scroll events for two animation frames, the window in which the clamp's event can arrive. There's no layout read, so #1489's guarantee of zero layout reads per streaming push still holds. Trade-off: a real scroll-up that starts inside those two frames loses only its first event; the next one unpins as usual.Reproduction (dev server, headless Chromium, real 3.3 MB thread, 30 short streams per run, varied push interval, CPU throttle, viewport and mid-stream switches):
Verified independently, on main merged with this branch
vite buildpasses.🤖 Generated with Claude Code