fix: remove isFetching prop from VirtualKeysTable and simplify empty state check - #5297
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 46 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe virtual keys table no longer accepts query fetching state. Its empty-state condition now depends only on zero results and the absence of active filters, while the page removes the corresponding query extraction and prop. ChangesVirtual keys empty-state simplification
Estimated code review effort: 2 (Simple) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
d7a3ac7 to
6a04b8f
Compare
isFetching prop from VirtualKeysTable and simplify empty state check
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (3): Last reviewed commit: "fix: Virtual key flickering when it's em..." | 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/virtual-keys/views/virtualKeysTable.tsx`:
- Line 595: Update the empty-state condition around totalCount and
hasActiveFilters so VirtualKeysEmptyState renders only after the initial
virtual-keys query has resolved; use the existing loaded-data or loading state,
such as virtualKeysData, to distinguish loading from a genuinely empty result
while preserving the current behavior for loaded responses.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a0ecd993-3ed0-43be-87fb-aa852ef6d4d2
📒 Files selected for processing (2)
ui/app/workspace/governance/virtual-keys/page.tsxui/app/workspace/virtual-keys/views/virtualKeysTable.tsx
💤 Files with no reviewable changes (1)
- ui/app/workspace/governance/virtual-keys/page.tsx
Merge activity
|
The base branch was changed.
2f8d29f to
1dd563a
Compare
1dd563a to
15dbc43
Compare
…pty state check (#5297) ## Summary Removes the `isFetching` prop from `VirtualKeysTable` and its usage in the governance virtual keys page. Previously, the empty state check was gated on `isFetching` to avoid flashing the empty state while data was loading. This guard has been removed, simplifying the component interface and relying solely on `totalCount` and `hasActiveFilters` to determine when to render the true empty state. ## Changes - Removed `isFetching` from the `useGetVirtualKeysQuery` destructure in the governance virtual keys page - Removed `isFetching` prop from `VirtualKeysTableProps` interface and the component's destructured parameters - Updated the empty state condition from `totalCount === 0 && !hasActiveFilters && !isFetching` to `totalCount === 0 && !hasActiveFilters` ## Type of change - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test Navigate to the governance virtual keys page and verify: 1. The empty state renders correctly when no virtual keys exist 2. No unintended empty state flash occurs during initial load or pagination ```sh cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` ## Screenshots/Recordings N/A ## Breaking changes - [ ] Yes - [x] No ## Related issues N/A ## Security considerations None. ## 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
…pty state check (#5297) ## Summary Removes the `isFetching` prop from `VirtualKeysTable` and its usage in the governance virtual keys page. Previously, the empty state check was gated on `isFetching` to avoid flashing the empty state while data was loading. This guard has been removed, simplifying the component interface and relying solely on `totalCount` and `hasActiveFilters` to determine when to render the true empty state. ## Changes - Removed `isFetching` from the `useGetVirtualKeysQuery` destructure in the governance virtual keys page - Removed `isFetching` prop from `VirtualKeysTableProps` interface and the component's destructured parameters - Updated the empty state condition from `totalCount === 0 && !hasActiveFilters && !isFetching` to `totalCount === 0 && !hasActiveFilters` ## Type of change - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test Navigate to the governance virtual keys page and verify: 1. The empty state renders correctly when no virtual keys exist 2. No unintended empty state flash occurs during initial load or pagination ```sh cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` ## Screenshots/Recordings N/A ## Breaking changes - [ ] Yes - [x] No ## Related issues N/A ## Security considerations None. ## 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
…pty state check (maximhq#5297) ## Summary Removes the `isFetching` prop from `VirtualKeysTable` and its usage in the governance virtual keys page. Previously, the empty state check was gated on `isFetching` to avoid flashing the empty state while data was loading. This guard has been removed, simplifying the component interface and relying solely on `totalCount` and `hasActiveFilters` to determine when to render the true empty state. ## Changes - Removed `isFetching` from the `useGetVirtualKeysQuery` destructure in the governance virtual keys page - Removed `isFetching` prop from `VirtualKeysTableProps` interface and the component's destructured parameters - Updated the empty state condition from `totalCount === 0 && !hasActiveFilters && !isFetching` to `totalCount === 0 && !hasActiveFilters` ## Type of change - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test Navigate to the governance virtual keys page and verify: 1. The empty state renders correctly when no virtual keys exist 2. No unintended empty state flash occurs during initial load or pagination ```sh cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` ## Screenshots/Recordings N/A ## Breaking changes - [ ] Yes - [x] No ## Related issues N/A ## Security considerations None. ## 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
…pty state check (maximhq#5297) ## Summary Removes the `isFetching` prop from `VirtualKeysTable` and its usage in the governance virtual keys page. Previously, the empty state check was gated on `isFetching` to avoid flashing the empty state while data was loading. This guard has been removed, simplifying the component interface and relying solely on `totalCount` and `hasActiveFilters` to determine when to render the true empty state. ## Changes - Removed `isFetching` from the `useGetVirtualKeysQuery` destructure in the governance virtual keys page - Removed `isFetching` prop from `VirtualKeysTableProps` interface and the component's destructured parameters - Updated the empty state condition from `totalCount === 0 && !hasActiveFilters && !isFetching` to `totalCount === 0 && !hasActiveFilters` ## Type of change - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test Navigate to the governance virtual keys page and verify: 1. The empty state renders correctly when no virtual keys exist 2. No unintended empty state flash occurs during initial load or pagination ```sh cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` ## Screenshots/Recordings N/A ## Breaking changes - [ ] Yes - [x] No ## Related issues N/A ## Security considerations None. ## 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
Removes the
isFetchingprop fromVirtualKeysTableand its usage in the governance virtual keys page. Previously, the empty state check was gated onisFetchingto avoid flashing the empty state while data was loading. This guard has been removed, simplifying the component interface and relying solely ontotalCountandhasActiveFiltersto determine when to render the true empty state.Changes
isFetchingfrom theuseGetVirtualKeysQuerydestructure in the governance virtual keys pageisFetchingprop fromVirtualKeysTablePropsinterface and the component's destructured parameterstotalCount === 0 && !hasActiveFilters && !isFetchingtototalCount === 0 && !hasActiveFiltersType of change
Affected areas
How to test
Navigate to the governance virtual keys page and verify:
Screenshots/Recordings
N/A
Breaking changes
Related issues
N/A
Security considerations
None.
Checklist
docs/contributing/README.mdand followed the guidelines