Skip to content

fix: remove isFetching prop from VirtualKeysTable and simplify empty state check - #5297

Merged
Pratham-Mishra04 merged 1 commit into
devfrom
07-16-fix_virtual_key_flickering_when_it_s_empty
Jul 17, 2026
Merged

Pratham-Mishra04 merged 1 commit into
devfrom
07-16-fix_virtual_key_flickering_when_it_s_empty

Conversation

@impoiler

@impoiler impoiler commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

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
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • 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
cd ui
pnpm i || npm i
pnpm test || npm test
pnpm build || npm run build

Screenshots/Recordings

N/A

Breaking changes

  • Yes
  • 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

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 911652c2-c469-4d0b-9940-9019286cd19b

📥 Commits

Reviewing files that changed from the base of the PR and between 6a04b8f and 15dbc43.

📒 Files selected for processing (2)
  • ui/app/workspace/governance/virtual-keys/page.tsx
  • ui/app/workspace/virtual-keys/views/virtualKeysTable.tsx
📝 Walkthrough

Walkthrough

The 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.

Changes

Virtual keys empty-state simplification

Layer / File(s) Summary
Update table contract and empty-state rendering
ui/app/workspace/virtual-keys/views/virtualKeysTable.tsx
Removes the optional isFetching prop and renders the empty state when totalCount is zero without active filters.
Remove fetching-state wiring
ui/app/workspace/governance/virtual-keys/page.tsx
Stops extracting isFetching from the query and passing it to VirtualKeysTable.

Estimated code review effort: 2 (Simple) | ~5 minutes

Suggested reviewers: akshaydeo, bearts, pratham-mishra04

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately describes the main change: removing isFetching and simplifying the empty-state condition.
Description check ✅ Passed The PR description follows the template and includes summary, changes, type, affected areas, testing, and other required sections.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 07-16-fix_virtual_key_flickering_when_it_s_empty

Comment @coderabbitai help to get the list of available commands.

impoiler commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

@impoiler
impoiler changed the base branch from 07-16-feat_routing_rules_cel_expression_validation_backend to graphite-base/5297 July 16, 2026 09:13
@impoiler
impoiler force-pushed the 07-16-fix_virtual_key_flickering_when_it_s_empty branch from d7a3ac7 to 6a04b8f Compare July 16, 2026 09:13
@impoiler
impoiler changed the base branch from graphite-base/5297 to 07-16-feat_routing_rules_cel_expression_validation_front-end July 16, 2026 09:13
@impoiler impoiler changed the title fix: Virtual key flickering when it's empty fix: remove isFetching prop from VirtualKeysTable and simplify empty state check Jul 16, 2026
@impoiler impoiler self-assigned this Jul 16, 2026
@impoiler
impoiler marked this pull request as ready for review July 16, 2026 09:18
@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

This looks safe to merge.

  • Uncached query transitions remain covered by the page-level loading state.
  • Cached refetches keep the previous query data while loading.
  • No blocking issue was found in the updated code.

Important Files Changed

Filename Overview
ui/app/workspace/governance/virtual-keys/page.tsx Removes the unused fetching-state value and table prop while preserving the page-level loading guard.
ui/app/workspace/virtual-keys/views/virtualKeysTable.tsx Removes fetching state from the component interface and simplifies the true empty-state condition.

Reviews (3): Last reviewed commit: "fix: Virtual key flickering when it's em..." | Re-trigger Greptile

Comment thread ui/app/workspace/virtual-keys/views/virtualKeysTable.tsx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 206069d and 6a04b8f.

📒 Files selected for processing (2)
  • ui/app/workspace/governance/virtual-keys/page.tsx
  • ui/app/workspace/virtual-keys/views/virtualKeysTable.tsx
💤 Files with no reviewable changes (1)
  • ui/app/workspace/governance/virtual-keys/page.tsx

Comment thread ui/app/workspace/virtual-keys/views/virtualKeysTable.tsx
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 16, 2026

Pratham-Mishra04 commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Merge activity

  • Jul 17, 11:09 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 17, 11:16 AM UTC: Graphite rebased this pull request as part of a merge.
  • Jul 17, 11:18 AM UTC: Graphite rebased this pull request as part of a merge.
  • Jul 17, 11:19 AM UTC: Graphite rebased this pull request as part of a merge.
  • Jul 17, 11:19 AM UTC: @Pratham-Mishra04 merged this pull request with Graphite.

@Pratham-Mishra04
Pratham-Mishra04 changed the base branch from 07-16-feat_routing_rules_cel_expression_validation_front-end to graphite-base/5297 July 17, 2026 11:12
@Pratham-Mishra04
Pratham-Mishra04 changed the base branch from graphite-base/5297 to dev July 17, 2026 11:15
@Pratham-Mishra04
Pratham-Mishra04 dismissed coderabbitai[bot]’s stale review July 17, 2026 11:15

The base branch was changed.

@Pratham-Mishra04
Pratham-Mishra04 force-pushed the 07-16-fix_virtual_key_flickering_when_it_s_empty branch 2 times, most recently from 2f8d29f to 1dd563a Compare July 17, 2026 11:17
@Pratham-Mishra04
Pratham-Mishra04 force-pushed the 07-16-fix_virtual_key_flickering_when_it_s_empty branch from 1dd563a to 15dbc43 Compare July 17, 2026 11:18
@Pratham-Mishra04
Pratham-Mishra04 merged commit 75676c1 into dev Jul 17, 2026
13 of 14 checks passed
@Pratham-Mishra04
Pratham-Mishra04 deleted the 07-16-fix_virtual_key_flickering_when_it_s_empty branch July 17, 2026 11:19
akshaydeo pushed a commit that referenced this pull request Jul 17, 2026
…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
akshaydeo pushed a commit that referenced this pull request Jul 18, 2026
…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
akhsaul pushed a commit to akhsaul/bifrost that referenced this pull request Aug 27, 2026
…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
occcat pushed a commit to occcat/bifrost that referenced this pull request Sep 2, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants