feat(hybridFilter): add shift-click range selection#108367
Merged
Conversation
Implements shift-click multi-selection for hybrid filter components, allowing users to select a range of items by holding shift and clicking. This works alongside existing Cmd/Ctrl modifier for individual toggles. - Separate shift key detection from Cmd/Ctrl modifiers - Add range selection logic that selects all items between anchor and clicked item - Extract performSingleToggle helper to reduce code duplication - Track last selected item as anchor point for range selection - Clear text selection on shift-click to prevent UI glitches - Keep menu open during shift operations - Add comprehensive unit tests for shift-click functionality - Update all consumers to pass options array to hook
- Use Ctrl+row clicks to set anchor instead of checkbox clicks - This ensures keyboard events are properly captured by CompactSelect - Fix array ordering in shiftToggleRange to preserve option order - All 13 tests now passing
The text selection clearing isn't needed for the shift-click functionality.
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
…ift-click in portal overlays The onKeyDown/onKeyUp handlers on the CompactSelect wrapper div never fired during dropdown interactions because the overlay renders in a portal, so keyboard events don't bubble back up to the outer div. Switch to window.addEventListener for keydown/keyup to reliably track modifier key state regardless of which element is focused. Use useRef for synchronous access in event handlers (avoiding stale closures), and import the isModifierKeyPressed utility that was added but unused.
SelectKey is string | number, so a value of 0 or "" would pass a falsy check and incorrectly treat a valid anchor as unset. Use === null instead.
… & Billing, Account
natemoo-re
approved these changes
Feb 17, 2026
a46f115 to
fe37d8c
Compare
5ce1339 to
fe37d8c
Compare
1 task
mchen-sentry
pushed a commit
that referenced
this pull request
Feb 24, 2026
Split away from #108294 as we de didn't merge the upstream change
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Split away from #108294 as we de didn't merge the upstream change