Skip to content

feat(web): post-delete Undo + honest 30-day recovery copy on settings#831

Merged
xarmian merged 1 commit into
mainfrom
feat/workspace-delete-undo
Jul 6, 2026
Merged

feat(web): post-delete Undo + honest 30-day recovery copy on settings#831
xarmian merged 1 commit into
mainfrom
feat/workspace-delete-undo

Conversation

@xarmian

@xarmian xarmian commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

What

Workspace Settings → Danger Zone delete flow (web/src/routes/[username]/[workspace]/settings/+page.svelte):

  • Post-delete Undo. handleDeleteWorkspace now captures the workspace slug/name/owner before the redirect, then shows the success toast with an inline Undo action (ToastAction on the global toast store). Undo calls api.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.
  • Honest copy. The Danger Zone delete description now states the workspace stays recoverable for the full 30-day window, with the Undo prompt right after deleting.

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

  • Copy intentionally does not name the persistent recovery surfaces (workspace-switcher restore = TASK-1974, console Deleted-workspaces page = TASK-1975) because those land in sibling in-flight tasks and don't exist in this branch. Once they merge, their PRs can add the "restore from the switcher" pointer. This keeps the copy honest about what currently exists.
  • Typed-slug confirm + owner-only gating (TASK-1967) unchanged.
  • Gate: npm run check → 0 errors. Codex review: CLEAN.

Closes TASK-1976

https://claude.ai/code/session_01HxBkAMiFBtCRJ2tKSCt3ST

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
@xarmian xarmian merged commit ef5e5d7 into main Jul 6, 2026
4 checks passed
@xarmian xarmian deleted the feat/workspace-delete-undo branch July 6, 2026 14:27
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.

1 participant