chore: reformat virtualKeysTable.tsx and fix dropdown menu close-on-action - #3602
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR standardizes per-row action dropdowns across workspace views by extracting several inline menus into local action-menu components, converting other menus to controlled open/close state, and ensuring menus explicitly close after selection. ChangesDropdown Menu Control Refactoring Across Workspace Tables
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
virtualKeysTable.tsx and fix dropdown menu close-on-action
0113030 to
b5c60e1
Compare
90b89b3 to
0e6e600
Compare
b5c60e1 to
5c657d1
Compare
Confidence Score: 5/5Safe to merge — changes are UI-only, self-contained, and consistently applied across all affected files. The refactor is purely additive state management on controlled Radix UI dropdowns; the onSelect+e.preventDefault()+setIsOpen(false) pattern is idiomatic and all callbacks are threaded correctly. No data-fetching, auth, or backend logic is touched. No files require special attention. Important Files Changed
Reviews (3): Last reviewed commit: "fix: dropdown open state in the vkey tab..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ui/app/workspace/mcp-registry/views/mcpClientsTable.tsx`:
- Around line 62-87: The new DropdownMenuItem entries for reconnect and delete
lack data-testid attributes needed for E2E tests; update the Reconnect
DropdownMenuItem (the one that calls onReconnect(client) and checks
isPerUserOAuth / client.config.disabled / isReconnecting) and the Delete
DropdownMenuItem (the one that calls onDelete(client) and uses
variant="destructive") to include unique data-testid values (e.g., data-testid
values incorporating client.id or client.name such as reconnect-<client.id> and
delete-<client.id>) so tests can reliably target them while preserving the
existing props and behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9c214f2f-eea8-4ea5-a3f9-716686103858
📒 Files selected for processing (10)
ui/app/workspace/custom-pricing/overrides/scopedPricingOverridesView.tsxui/app/workspace/governance/views/customerTable.tsxui/app/workspace/governance/views/teamsTable.tsxui/app/workspace/logs/views/columns.tsxui/app/workspace/mcp-logs/views/mcpLogDetailsSheet.tsxui/app/workspace/mcp-registry/views/mcpClientsTable.tsxui/app/workspace/model-limits/views/modelLimitsTable.tsxui/app/workspace/providers/views/modelProviderKeysTableView.tsxui/app/workspace/routing-rules/views/routingRulesTable.tsxui/app/workspace/virtual-keys/views/virtualKeysTable.tsx
5c657d1 to
630a813
Compare
0e6e600 to
0afc367
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ui/app/workspace/mcp-logs/views/mcpLogDetailsSheet.tsx`:
- Around line 168-178: The delete action item in the McpLogDetailsSheet React
component lacks a stable selector for E2E tests; update the JSX for the delete
control (the delete ActionItem/button inside the McpLogDetailsSheet component)
to add a data-testid attribute (e.g. data-testid="mcp-log-delete" or your
project's naming convention) so the element can be targeted by tests, and ensure
any related clickable wrapper uses the same test id if the visible label is
nested.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d4064c40-9c9d-49eb-9bc5-8dadf3b18b28
📒 Files selected for processing (10)
ui/app/workspace/custom-pricing/overrides/scopedPricingOverridesView.tsxui/app/workspace/governance/views/customerTable.tsxui/app/workspace/governance/views/teamsTable.tsxui/app/workspace/logs/views/columns.tsxui/app/workspace/mcp-logs/views/mcpLogDetailsSheet.tsxui/app/workspace/mcp-registry/views/mcpClientsTable.tsxui/app/workspace/model-limits/views/modelLimitsTable.tsxui/app/workspace/providers/views/modelProviderKeysTableView.tsxui/app/workspace/routing-rules/views/routingRulesTable.tsxui/app/workspace/virtual-keys/views/virtualKeysTable.tsx
0afc367 to
39e7ac4
Compare
630a813 to
6ca2e78
Compare
Merge activity
|
The base branch was changed.
…-action (#3602) ## Summary Reformats `virtualKeysTable.tsx` to use tab-based indentation consistently throughout the file, and fixes a bug where the `VKActionsMenu` dropdown would remain open after selecting "Edit" or "Delete". ## Changes - Converted all 2-space indentation to tabs across the entire `virtualKeysTable.tsx` file to match the project's preferred style - Added explicit `isOpen` / `setIsOpen` state to `VKActionsMenu` and wired it to the `DropdownMenu`'s `open` / `onOpenChange` props so the menu closes immediately when "Edit" or "Delete" is selected, preventing the dropdown from staying visible while a sheet or dialog opens ## Type of change - [x] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test 1. Navigate to the Virtual Keys table. 2. Open the actions menu (⋯) on any virtual key row. 3. Click **Edit** — the dropdown should close immediately and the edit sheet should open. 4. Repeat and click **Delete** — the dropdown should close immediately and the delete confirmation dialog should appear. 5. Confirm neither the edit nor delete action leaves the dropdown menu visible in the background. ```sh cd ui pnpm i || npm i pnpm build || npm run build ``` ## Screenshots/Recordings N/A ## Breaking changes - [ ] Yes - [x] No ## Related issues N/A ## Security considerations No security implications. The change only affects UI rendering and dropdown state management. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable

Summary
Reformats
virtualKeysTable.tsxto use tab-based indentation consistently throughout the file, and fixes a bug where theVKActionsMenudropdown would remain open after selecting "Edit" or "Delete".Changes
virtualKeysTable.tsxfile to match the project's preferred styleisOpen/setIsOpenstate toVKActionsMenuand wired it to theDropdownMenu'sopen/onOpenChangeprops so the menu closes immediately when "Edit" or "Delete" is selected, preventing the dropdown from staying visible while a sheet or dialog opensType of change
Affected areas
How to test
Screenshots/Recordings
N/A
Breaking changes
Related issues
N/A
Security considerations
No security implications. The change only affects UI rendering and dropdown state management.
Checklist
docs/contributing/README.mdand followed the guidelines