Repository navigation
fix(web): typing a citation comment no longer scrolls the page - #36194
AkiVonAkira wants to merge 1 commit into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Citation-comment popovers now stay within the visible timeline when their source quote scrolls offscreen. The change is limited to positioning, with no changes to comment storage or sending behavior. You can add or adjust custom eligibility rules. Learn more. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Note Claude Opus 5.5 posting on behalf of Benjamin Tested this on current main (bf20415) with the PR's diff applied, in a scenario that does what #36193 describes while a reply is still streaming: Long stream replay, cite a passage, type in the comment box, wheel up 12 x 120 px with one keystroke after each step, then wheel back down. Positions were logged every frame.
+1 from a daily Cite user. Happy to share the scenario. Before (main), after typing while the comment box is below the screen: |
|
Note 🤖 Claude Opus 5.5 responding on behalf of Kayzel @juliusmarminge This has been on
We've stopped pushing to this branch, so the head stays where you left it to decide. It allows maintainer edits. |
|
This PR conflicts with See the conflict window. |
678f2e9 to
b6dfd66
Compare
|
@juliusmarminge Could you take a look at this when you have a moment? It's rebased onto main as one commit ( Since your #42603 landed, the comment box no longer comes up empty when its cited row scrolls out. The rest of the bug still happens on main. After you scroll the quote away, the box doesn't sit above the composer and doesn't move with the scroll. It stays over the composer, as in the screenshot below. Typing while the quote is out of view still scrolls the page. With this PR, the box stays inside the visible timeline. It sits just above the composer when the quote is below the screen and at the top when the quote is above it. Typing scrolls nothing. Benjamin's frame log above measures the page scroll at 0 px over 309 frames with this PR, against 484 px on main. Since this has |



Problem
Cite text, scroll the timeline so the quote goes out of view, then type a comment: the whole app jumps. The comment box follows the quote off-screen, so the browser scrolls the page to the caret. Reported in #36193.
Change
The comment box now stays inside the visible part of the timeline, which runs from the timeline's top edge to the top of the composer floating over it.
collisionBoundary, so the box flips above the composer instead of covering it. The boundary uses getters because Floating UI reads it on every position update.PopoverPopuppassescollisionBoundarythrough to the positioner. When it's unset, Base UI's default applies, so existing callers don't change.Typing never scrolls the timeline or the page. This differs from #34787, which scrolls the timeline back to the quote on each keystroke. The user scrolled away for a reason, often to reread something while writing the comment, so this PR keeps their scroll position.
Scope
Fixes #36193. One component, plus one pass-through prop on the shared popover. No contract, server, desktop, or mobile changes. The mobile app doesn't have this popover.
Verification
AssistantCitationChip.browser.test.tsxopens the box next to a visible quote, then scrolls the quote under a composer and past the top. Onmainit fails: the box bottom is at 893, below the composer top at 776. With the fix it passes, and typing leaves page and timeline scroll unchanged.vp run check:changedpasses (format, lint, knip, typecheck, tests, React Compiler).Scrolled down past the quote, and at phone width:
Reviewed with sol-loop: 1 round with GPT-6.1 Sol. Sol verdict: approved.
Created with Claude Opus 5.5 in T3 Code. GPT-6.1 Terra searched for existing issues.