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
DeleteUserDialog runs the whole account delete. A click runs CheckCurrentUserDelete first, then opens the matching dialog. The trigger slot gets { onClick, loading }, so the trigger button is disabled and shows a spinner, with its label unchanged, while the check runs. This matches the org and project delete buttons.
A host can also start the delete with handle.open(), using a handle from DeleteUserDialog.createHandle(). It runs the same check, so a menu item that has already closed can still start the delete. onDeleted is required: the SDK does not navigate.
When the user is the only owner of an organization with other members, the dialog asks for an ownership transfer. When an organization that would be deleted with the account is blocked, it lists the blockers for each one. Both go through the deleteBlockedDialog slot with entity: 'user'.
Otherwise it shows the Delete Account confirmation. Delete stays disabled until the user types their email and ticks the acknowledgement.
A refused delete checks again, because the refusal has no grouping by organization.
ProfileView takes enableUserDelete (off by default) and onAccountDeleted. With the flag on, the view shows a Delete Account section. A host app turns it on when it handles the delete.
Added an optional account-deletion section to the profile, disabled by default. Deletion requires confirming the account email and acknowledging the prompt.
Added guidance tailored to account, organization, and project deletion blockers, including ownership requirements and organization-specific details.
Added success and error notifications during deletion, with an eligibility recheck when deletion is blocked.
Redirects to the login page after successful account deletion.
Style
Preserved line breaks in deletion-blocker descriptions.
The SDK adds a user account-deletion dialog with eligibility checks, confirmation requirements, and user-specific blocker details. The profile view can optionally expose the dialog and receive a callback after deletion.
Changes: User deletion
Layer / File(s)
Summary
User deletion blocker content web/sdk/shared/types.ts, web/sdk/client/utils/delete-blockers.ts, web/sdk/client/hooks/useDeleteCheck.ts, web/sdk/client/components/delete-blocked-dialog/*
The blocked payload supports user outcomes. Conversion creates entries for organizations to delete and organizations where the user must transfer ownership. The dialog renders organization blockers and ownership-transfer guidance.
Deletion dialog and confirmation web/sdk/client/components/delete-user-dialog/*, web/sdk/client/index.ts
The dialog checks eligibility before opening, renders blocker details or a confirmation form, and submits deletion when the normalized email matches and acknowledgment is checked. It exposes a trigger and external handle.
The profile view accepts optional deletion enablement and a completion callback. When enabled, it displays loading content or an account-deletion section with a dialog trigger. The demo enables deletion and redirects to /login after success.
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
DeleteUserDialog runs the whole account delete. It opens first and runs
CheckCurrentUserDelete inside, so it works from any trigger, including a
menu item that has already closed. Open it with a trigger slot, or with a
handle from DeleteUserDialog.createHandle().
When the user is the only owner of an organization with other members,
it asks for an ownership transfer. When an organization that would be
deleted with the account is blocked, it lists the blockers for each
organization. Both go through the deleteBlockedDialog slot. Otherwise it
shows the Delete Account confirmation, which needs the user's email and
an acknowledgement. A refused delete checks again to show what blocks it.
ProfileView takes onAccountDeleted. When it is set, the view shows a
Delete account section. The SDK does not navigate after the delete.
ProfileView shows the Delete Account section only when enableUserDelete
is set. It is off by default, so a host app turns it on when it is ready
to handle the delete with onAccountDeleted.
The account delete dialogs follow the design: the ownership dialog has
two paragraphs and no list, and the confirmation has the new field label
and acknowledgement text.
A click on Delete Account now runs CheckCurrentUserDelete first. The
trigger slot gets loading, so the button is disabled and shows a spinner
with its label while the check runs. Then the ownership, blocked or
confirmation dialog opens. A failed check shows a toast.
The handle from DeleteUserDialog.createHandle() is now { open() }. It runs
the same check, so a menu item that has already closed can still start
the delete.
DeleteBlockedDialog now renders its own AlertDialog.Content, so the
blocked step renders it directly and only the confirmation form is
wrapped in AlertDialog.Content.
The blockers prop draws one list with no heading. An account delete can be blocked in more than one workspace, so a host that words its own lines needs a heading for each workspace. The groups prop takes a title and blockers for each group.
The account dialog no longer groups blockers by workspace. It shows one list, the same as the workspace dialog, and the description says the issues are in your workspaces. The ownership transfer dialog does not change. Removes the groups prop, which nothing uses now.
The account dialog now lists workspace blockers before asking for an ownership transfer, so the transfer is the last step. When the account delete is blocked in more than one workspace, the default lines say "your workspaces" instead of "this workspace". The workspace and project dialogs are unchanged.
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
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
DeleteUserDialogruns the whole account delete. A click runsCheckCurrentUserDeletefirst, then opens the matching dialog. Thetriggerslot gets{ onClick, loading }, so the trigger button is disabled and shows a spinner, with its label unchanged, while the check runs. This matches the org and project delete buttons.handle.open(), using a handle fromDeleteUserDialog.createHandle(). It runs the same check, so a menu item that has already closed can still start the delete.onDeletedis required: the SDK does not navigate.deleteBlockedDialogslot withentity: 'user'.ProfileViewtakesenableUserDelete(off by default) andonAccountDeleted. With the flag on, the view shows a Delete Account section. A host app turns it on when it handles the delete.Stacked on #2041.
Test plan
tsc --noEmitshows no new errors, eslint,pnpm buildonDeletedrunsProfileViewwithoutenableUserDeleteshows no Delete Account section