You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cortex-tui): fix scrollbar position to reflect viewport, not selection
The scrollbar in dropdown menus was incorrectly using the selected item
index as its position, which caused the scrollbar thumb to jump around
based on the highlighted item rather than showing the actual viewport
position.
This fix changes the scrollbar state to use:
- scrollable_range = total_items - max_visible (the actual scrollable area)
- position = scroll_offset (the current viewport position)
This makes the scrollbar properly indicate which portion of the list is
currently visible, so when scrolling past items like /usage, the user
can see that there are more items above that are now hidden.
Fixed in:
- AutocompletePopup (slash commands)
- MentionPopup (file mentions)
- ScrollableDropdown (generic component)
- SelectionList (generic selection)
Added max_visible() getter to FileMentionState for proper scrollbar
calculation.
Fixes scrollbar behavior from PR #216.
0 commit comments