Repository navigation
fix(web): typing a citation comment no longer scrolls the page - #36194
AkiVonAkira wants to merge 2 commits 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. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
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.