Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Contributor
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
This branch was successfully deployed
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.
Resolves CHAT-48.
Stacked on #90, which adds the alignment math this moves into the shared helper. This PR targets #90's branch so the diff shows only this change; once #90 merges, GitHub retargets it to
main, and the branch then needs a rebase ontomain.The package scrolled things into view three ways. The command list used
scrollIntoView({ container: "nearest" }), whosecontaineroption is Chromium-only: Safari and Firefox ignore it and scroll every ancestor, so arrowing through the list could scroll the page. That was accepted as a known bug on 2026-07-10.Changes
internal/scroll-into-view-within.tsnow holds both pieces.alignedScrollTop(moved fromthread/scroll-animation.ts) returns the destination instead of scrolling, for the thread's timed scroll. It followsscrollIntoView'sblock(start/center/end/nearest) and honorsscroll-marginandscroll-padding.scrollIntoViewWithin(target, boundary, { block })walks the scrollable ancestors up toboundary, aligning in each one with that same math.targetis an element, or{ rect, from }for the caret, which has no element.containeroption and the KNOWN BUG comment are removed.scroll-marginand the list'sscroll-padding.scrollIntoViewcalls remain inpackages/chat/src.Behavior changes
nearest, a target taller than the view now brings its top in, as browsers do, instead of its bottom. This only affects an unusually tall ask-user option or command row.Tests
alignedScrollToptests moved totests/scroll-into-view-within.test.ts, plus a case for a bare rect.scroll-padding.block, with its scroll-margin included.Not verified
scrollIntoView), and the containment test covers the walk.