You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The project row menu in ProjectsView and the actions menu in ProjectDetailsView run CheckProjectDelete on click. The menu item shows a spinner while the check runs, then the menu closes and the confirmation or the blocked dialog opens.
A refused delete closes the confirmation and opens the blocked dialog.
Both menus use useDeleteCheck and the deleteBlockedDialog slot from feat(sdk): org delete blockers UI #2025, so a host app words the organization and project dialogs in one place. The slot gets entity: 'project' and the resource blockers.
Reviewing files that changed from the base of the PR and between 6cb48ef and 68379ca.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
Summary
Summary by CodeRabbit
New Features
Project deletion now checks for blocking resources before opening the confirmation flow. If deletion is blocked, a separate dialog explains that resources must be addressed first.
Deletion menus show a loading indicator and prevent starting another deletion check while one is in progress.
Bug Fixes
Errors encountered during project deletion checks are now passed to the deletion dialog for handling.
Project deletion checks now run from the projects list and project details views before the confirmation flow. Blocked deletions use a separate dialog, and the delete dialog forwards errors to a callback.
Changes: Project deletion flow
Layer / File(s)
Summary
Shared blocked-delete contract and error handling web/sdk/shared/types.ts, web/sdk/client/components/delete-blocked-dialog/delete-blocked-dialog.tsx, web/sdk/client/views/projects/components/delete-project-dialog.tsx
The blocked-delete payload accepts project, and the blocked dialog has project-specific copy. The delete dialog forwards caught errors to its onDeleteError callback instead of showing error-specific toasts.
Projects list deletion flow web/sdk/client/views/projects/projects-view.tsx
ProjectsView creates menu and dialog handles per mount and checks deletion before opening the confirmation or blocked-deletion dialog. The menu shows a spinner and disables deletion while the check runs, then closes after the check resolves.
ProjectDetailsView creates menu and dialog handles per mount and checks deletion before opening the confirmation or blocked-deletion dialog. The menu shows a spinner and disables deletion while the check runs, then closes after the check resolves.
Unverified finding
We couldn't verify this from the code. It is shown for review, not as a verified issue.
startDelete opens the confirmation or blocked dialog before the caller closes the still-open menu. If the menu's close/focus handling dismisses a newly opened dialog, the new flow loses its result.
The confirmation or blocker dialog may close immediately or fail to receive focus, preventing the intended deletion flow. The details view uses the same ordering.
This can occur when: A deletion check resolves while the project menu is open and opens a dialog, followed immediately by projectMenuHandle.close().
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Minor · Include the resource namespace in the default blocker line. · delete-blocked-dialog.tsx:26-29
web/sdk/client/components/delete-blocked-dialog/delete-blocked-dialog.tsx:26-29 Minor · Functional Correctness · Quick win
Include the resource namespace in the default blocker line.
CheckProjectDelete returns one RESOURCES_EXIST blocker per namespace, but the default formatter drops subject and renders only Existing resources: Delete the remaining resources, then try again. The new project deletion flow therefore does not identify the offending resources. Add the subject to the default fallback while preserving custom messages.
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.
Both project menus now run CheckProjectDelete on click. The menu item
shows a spinner while the check runs, then the menu closes and the
confirmation or the blocked dialog opens. A refused delete closes the
confirmation and shows the blocked dialog.
The project flow uses the same useDeleteFlow hook and deleteBlockedDialog
slot as the organization flow, so a host app words both in one place.
The same fix as the organization delete: a handle created at module
scope keeps its open state after the view unmounts, so a late delete
check or a dialog left open on browser Back showed the dialog again on
the next visit (mui/base-ui#4951).
The project menus are included. They stay open while the delete check
runs, and a menu handle's close() does nothing once the menu has
unmounted, so leaving during the check brought the menu back open.
Both project views call useDeleteCheck directly, the same as the
organization view. Each menu still stays open with the spinner while
the check runs and closes once the dialog opens.
The spinner used the neutral color. The menu leading icon slot sets a secondary color, so color="default" (currentColor) is grey there. color="danger" uses the same token as the Delete project label.
The Delete project and Remove items read as "Delete Delete project" and "Remove Remove" because the icon alt repeated the label. The icons now have an empty alt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ProjectsViewand the actions menu inProjectDetailsViewrunCheckProjectDeleteon click. The menu item shows a spinner while the check runs, then the menu closes and the confirmation or the blocked dialog opens.useDeleteCheckand thedeleteBlockedDialogslot from feat(sdk): org delete blockers UI #2025, so a host app words the organization and project dialogs in one place. The slot getsentity: 'project'and the resource blockers.Stacked on #2025.
Test plan
tsc --noEmitshows no new errors, eslint,pnpm build