feat(settings): add delete organization in danger zone#3246
Open
feat(settings): add delete organization in danger zone#3246
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
🧪 BenchmarkShould we run the Virtual MCP strategy benchmark for this PR? React with 👍 to run the benchmark.
Benchmark will run on the next push after you react. |
Contributor
Release OptionsSuggested: Minor ( React with an emoji to override the release type:
Current version:
|
…here Replaces hard delete with an archive flag in org metadata. Archived orgs are filtered from ORGANIZATION_LIST, blocked at the auth/routing layer in context-factory and the UI router, and the onboarding redirect skips them. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e redirect - Add ArchivedOrgScreen so any URL under an archived org shows "Organization unavailable" instead of a broken shell - shell-layout: detect archived orgs, render the screen, and clear the cached slug so /home doesn't bounce back - shell-layout: skip persisting lastOrgSlug for archived orgs on setActive - delete-organization-section: route through ORGANIZATION_DELETE MCP tool (the actual archive flow) instead of authClient.organization.delete (which would hard-delete and bypass the soft-delete logic) - delete-organization-section: require typing the org name to confirm; on success, clear lastOrgSlug, drop the activeOrganization cache, and navigate to / so homeRoute redirects to the next active org or onboarding Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…lete ORGANIZATION_DELETE was changed to soft-delete via metadata.archived, but the test still asserted the old deleteOrganization call path. Update the test to assert updateOrganization is called with the archive metadata payload, and that deleteOrganization is never called. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What is this contribution about?
Adds a Danger Zone section to the Organization General settings page with a button to permanently delete the current organization. Uses the existing
authClient.organization.delete()Better Auth method, shows a confirmation dialog before proceeding, and redirects to/on success.Screenshots/Demonstration
How to Test
/Migration Notes
No migrations required.
Review Checklist