fix: scroll active sidebar items into view#4965
Merged
timothycarambat merged 5 commits intomasterfrom Feb 7, 2026
Merged
Conversation
shatfield4
approved these changes
Feb 5, 2026
Collaborator
shatfield4
left a comment
There was a problem hiding this comment.
LGTM, we can reuse this hook in the future on the main chat sidebar to scroll into view the active workspace if a user has a lot of workspaces.
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.
Pull Request Type
Relevant Issues
resolves #4963
What is in this change?
This PR fixes the sidebar selection scroll behavior so that active items are automatically scrolled into view when selected.
Changes:
useScrollActiveItemIntoViewthat handles scrolling an element into the viewport when it becomes activeMenuOptionin the Settings Sidebar so the currently selected setting is scrolled to center viewThreadItemin the main Sidebar so the active thread is scrolled to center viewbehavior: "instant"to avoid visible scroll animation artifacts (since sidebars remount on navigation, smooth scrolling would animate from the top)Additional Information
The
instantbehavior is used intentionally because the Settings Sidebar remounts on each page navigation. Usingsmoothwould cause a visible scroll animation from the top of the sidebar to the active item every time you navigate.Developer Validations
yarn lintfrom the root of the repo & committed changes