Skip to content

fix(aurora): fix CreateBucketModal not rendering when bucket list is empty#1069

Merged
KirylSAP merged 3 commits into
mainfrom
kiryl-create-bucket-doesnt-open-bug
Jul 14, 2026
Merged

fix(aurora): fix CreateBucketModal not rendering when bucket list is empty#1069
KirylSAP merged 3 commits into
mainfrom
kiryl-create-bucket-doesnt-open-bug

Conversation

@KirylSAP

@KirylSAP KirylSAP commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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 createModalOpen was true.

Changes Made

  • BucketTableView Component: Restructured the component to conditionally render either the empty state or the table content, ensuring the CreateBucketModal is always rendered at the JSX fragment level regardless of bucket list state
  • Test Coverage: Added test case "renders CreateBucketModal even when bucket list is empty" to verify the modal can be displayed when there are no buckets

Related Issues

Issue

Testing Instructions

  1. pnpm i
  2. pnpm run test
  3. Manually test: Navigate to the buckets page with no buckets, click "Create Bucket" button, and verify the modal opens

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed the bucket view so the create-bucket modal can open even when no buckets exist.
    • Preserved bucket table, navigation, and selection actions when buckets are available.
  • Tests
    • Added coverage for displaying the create-bucket modal with an empty bucket list.

KirylSAP added 2 commits July 14, 2026 16:13
…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.
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@KirylSAP, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: bcbb2f15-3a98-4b57-9b63-cc957cacfda5

📥 Commits

Reviewing files that changed from the base of the PR and between 5440c66 and bdd9a7c.

📒 Files selected for processing (1)
  • .changeset/shaggy-cats-fry.md
📝 Walkthrough

Walkthrough

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

Changes

Bucket modal empty-state rendering

Layer / File(s) Summary
Preserve modal rendering in the empty state
packages/aurora/src/client/routes/_auth/projects/$projectId/storage/-components/Ceph/Buckets/BucketTableView.tsx, packages/aurora/src/client/routes/_auth/projects/$projectId/storage/-components/Ceph/Buckets/BucketTableView.test.tsx
BucketTableView conditionally renders the empty grid or bucket table without an early return, and tests that CreateBucketModal renders when buckets is empty.

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

Possibly related issues

  • cobaltcore-dev/aurora-dashboard issue 1070 — Directly covers ensuring CreateBucketModal renders when the bucket list is empty.

Possibly related PRs

Suggested labels: aurora-portal, Ceph, ux improvement, object storage

Suggested reviewers: andypf, tilmanhaupt, vlad-schur-external-sap

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main fix: CreateBucketModal failing to render when the bucket list is empty.
Description check ✅ Passed The description follows the template and includes summary, changes, related issue, testing steps, and checklist items.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kiryl-create-bucket-doesnt-open-bug

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.

❤️ Share

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

@KirylSAP KirylSAP marked this pull request as ready for review July 14, 2026 14:17
@KirylSAP KirylSAP requested a review from a team as a code owner July 14, 2026 14:17
@KirylSAP KirylSAP enabled auto-merge (squash) July 14, 2026 14:42
@KirylSAP KirylSAP disabled auto-merge July 14, 2026 14:43
@KirylSAP KirylSAP enabled auto-merge (squash) July 14, 2026 14:43
@taymoor89 taymoor89 requested a review from Copilot July 14, 2026 14:43

Copilot AI 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.

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 BucketTableView rendering to avoid an early return that prevented CreateBucketModal from mounting in the empty state.
  • Added a unit test to confirm CreateBucketModal renders when buckets is empty and createModalOpen is 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.

@KirylSAP KirylSAP merged commit 45e8c43 into main Jul 14, 2026
22 checks passed
@KirylSAP KirylSAP deleted the kiryl-create-bucket-doesnt-open-bug branch July 14, 2026 14:50
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.

4 participants