fix(aurora): fix CreateBucketModal not rendering when bucket list is empty#1069
Conversation
…empty Restructured BucketTableView to conditionally render empty state or table content, ensuring CreateBucketModal can be displayed regardless of bucket list state. Added test coverage for modal rendering with empty bucket list.
…oard into kiryl-create-bucket-doesnt-open-bug
|
Warning Review limit reached
Next review available in: 51 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: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughBucketTableView now renders its empty state inline instead of returning early, allowing CreateBucketModal to remain mounted when no buckets exist. A test covers modal visibility with an empty bucket list. ChangesBucket modal empty-state rendering
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Fixes a UI rendering bug in the Ceph buckets table view where CreateBucketModal could not appear when the bucket list was empty, by ensuring the modal is always rendered regardless of empty-state/table-state.
Changes:
- Refactored
BucketTableViewrendering to avoid an early return that preventedCreateBucketModalfrom mounting in the empty state. - Added a unit test to confirm
CreateBucketModalrenders whenbucketsis empty andcreateModalOpenis true. - Added a changeset for the patch release.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/aurora/src/client/routes/_auth/projects/$projectId/storage/-components/Ceph/Buckets/BucketTableView.tsx | Removes early return and conditionally renders empty state vs table while always rendering modals. |
| packages/aurora/src/client/routes/_auth/projects/$projectId/storage/-components/Ceph/Buckets/BucketTableView.test.tsx | Adds regression test for modal rendering when bucket list is empty. |
| .changeset/shaggy-cats-fry.md | Declares a patch changeset documenting the bugfix and test addition. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Fixes a bug where the CreateBucketModal would not render when the bucket list was empty. The component was returning early with the empty state view, preventing the modal from being displayed even when
createModalOpenwas true.Changes Made
"renders CreateBucketModal even when bucket list is empty"to verify the modal can be displayed when there are no bucketsRelated Issues
Issue
Testing Instructions
pnpm ipnpm run testChecklist
Summary by CodeRabbit