feat(web): post-delete Undo + honest 30-day recovery copy on settings#831
Merged
Conversation
After deleting a workspace, the settings page now shows the success toast with an inline Undo action. Undo calls api.workspaces.restore on the deleted slug (captured before the redirect so it works post- navigation) and navigates back into the restored workspace. The toast uses a longer duration and the global toast store survives the post-delete redirect to /console. The Danger Zone delete copy now states the workspace stays recoverable for the full 30-day window (with the Undo prompt right after deleting), making the soft-delete window honest. Copy intentionally avoids naming the persistent recovery surfaces (switcher restore = TASK-1974, console Deleted-workspaces page = TASK-1975) since those land in sibling tasks; those PRs can add the "restore from the switcher" pointer once merged. Typed-slug confirm + owner-only gating (TASK-1967) unchanged. Closes TASK-1976 Claude-Session: https://claude.ai/code/session_01HxBkAMiFBtCRJ2tKSCt3ST
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
Workspace Settings → Danger Zone delete flow (
web/src/routes/[username]/[workspace]/settings/+page.svelte):handleDeleteWorkspacenow captures the workspace slug/name/owner before the redirect, then shows the success toast with an inline Undo action (ToastActionon the global toast store). Undo callsapi.workspaces.restore(slug), toasts confirmation, and navigates back into the restored workspace. The toast uses a longer duration (12s) and the store is global, so the affordance survives the post-delete redirect to/console.Why
Deleting a workspace is a soft-delete with a 30-day purge window, but the UI gave no way back and the copy didn't communicate recoverability. This adds an immediate Undo and makes the copy honest.
Notes
npm run check→ 0 errors. Codex review: CLEAN.Closes TASK-1976
https://claude.ai/code/session_01HxBkAMiFBtCRJ2tKSCt3ST