RI-8132 Fix view-type dropdown crash with external plugins#5616
Open
RI-8132 Fix view-type dropdown crash with external plugins#5616
Conversation
…pe dropdown References: #RI-8132 Made-with: Cursor
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
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, have a team admin enable autofix in the Cursor dashboard.
redisinsight/ui/src/components/query/query-card/QueryCardHeader/QueryCardHeader.spec.tsx
Show resolved
Hide resolved
Contributor
Code Coverage - Frontend unit tests
Test suite run success6530 tests passing in 792 suites. Report generated by 🧪jest coverage report action from 8273295 |
Updated tests for QueryCardHeader to include a mock implementation of the RiSelect component, ensuring proper handling of the view-type dropdown selection. Adjusted the selected value to a default state for improved test reliability.
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.
What
Fix the Workbench view-type dropdown crash when external plugins are loaded. The separator between internal and external plugin options used an empty-string
value, which violates the@redis-ui/componentsSelect (Radix UI) validation. Replaced with a non-empty sentinel value and added a guard inonChangeView.Testing
FT.SEARCHin Workbench with an external plugin loaded — dropdown should render without crashCloses #RI-8132
References #5608
Made with Cursor
Note
Low Risk
Small UI-only change localized to dropdown option construction and selection handling, plus unit tests; minimal behavioral impact beyond preventing a crash.
Overview
Fixes a Workbench view-type dropdown crash when external plugin visualizations are present by replacing the separator option’s empty
valuewith a non-empty sentinel (VIEW_TYPE_SEPARATOR).QueryCardHeadernow ignores the sentinel inonChangeView, and tests add coverage to ensure the dropdown renders with external plugins and selecting the separator does not change the view (with a simplifiedRiSelectmock for test stability).Written by Cursor Bugbot for commit 8273295. This will update automatically on new commits. Configure here.