Skip to content

RI-8132 Fix view-type dropdown crash with external plugins#5616

Open
pd-redis wants to merge 2 commits intomainfrom
fe/bugfix/RI-8132/fix-view-type-dropdown-crash
Open

RI-8132 Fix view-type dropdown crash with external plugins#5616
pd-redis wants to merge 2 commits intomainfrom
fe/bugfix/RI-8132/fix-view-type-dropdown-crash

Conversation

@pd-redis
Copy link
Contributor

@pd-redis pd-redis commented Mar 10, 2026

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/components Select (Radix UI) validation. Replaced with a non-empty sentinel value and added a guard in onChangeView.

Testing

  • Run FT.SEARCH in Workbench with an external plugin loaded — dropdown should render without crash
  • Existing unit tests pass; two new tests verify the separator renders and the sentinel value is rejected

Closes #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 value with a non-empty sentinel (VIEW_TYPE_SEPARATOR).

QueryCardHeader now ignores the sentinel in onChangeView, and tests add coverage to ensure the dropdown renders with external plugins and selecting the separator does not change the view (with a simplified RiSelect mock for test stability).

Written by Cursor Bugbot for commit 8273295. This will update automatically on new commits. Configure here.

…pe dropdown

References: #RI-8132
Made-with: Cursor
@jit-ci
Copy link

jit-ci bot commented Mar 10, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 2026

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 82.42% 23529/28546
🟡 Branches 67.58% 9836/14555
🟡 Functions 77.62% 6457/8319
🟢 Lines 82.86% 23034/27798

Test suite run success

6530 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant