feat(web): "Recently deleted" section in workspace switcher#829
Merged
Conversation
Adds a collapsible "Recently deleted" section below the active-workspaces list in WorkspaceSwitcher, populated from api.workspaces.listDeleted() and loaded each time the switcher opens. Each row shows the workspace name, a subtle "N days left", and an inline Restore button that calls api.workspaces.restore() then refreshes both the deleted list and the active workspaces list so the restored workspace reappears; a success toast confirms. The whole section is hidden when there are no deleted workspaces, and fetch failures are swallowed quietly so the switcher never breaks. Renders in both the desktop dropdown and the mobile BottomSheet. Closes TASK-1974 Claude-Session: https://claude.ai/code/session_01HxBkAMiFBtCRJ2tKSCt3ST
A failing workspaceStore.loadAll() after a successful restore no longer shows a misleading "Couldn't restore" toast. The restore API call now has its own catch; the post-restore refresh is guarded separately so a reload failure stays silent (the restore already succeeded). Addresses Codex P2. Claude-Session: https://claude.ai/code/session_01HxBkAMiFBtCRJ2tKSCt3ST
Adds a monotonic request token to loadDeleted() (mirroring workspaceStore's membershipSeq) so an older open-triggered listDeleted() response can no longer clobber the fresher post-restore refresh and re-surface a just-restored workspace with a live Restore button. Addresses Codex P2. 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:
Adds a collapsible "Recently deleted" section below the active-workspaces list in
WorkspaceSwitcher.svelte, populated fromapi.workspaces.listDeleted()and (re)loaded each time the switcher opens. Each row shows the workspace name, a subtle "N days left" (fromdays_left), and an inline Restore button. Restore callsapi.workspaces.restore(slug), then refreshes both the deleted list and the active workspaces list (viaworkspaceStore.loadAll()) so the restored workspace reappears, and shows a success toast. The section is hidden entirely when there are no deleted workspaces, and fetch failures are swallowed quietly so the switcher never breaks. Renders in both the desktop dropdown and the mobile BottomSheet.Why:
Gives users a discoverable, low-friction way to recover a soft-deleted workspace still inside the restore window, right where they switch between workspaces. Scope is this component only (the console page + post-delete Undo are TASK-1975/1976).
Notes:
$state,$derived,$effect,$props); matches the components existing conventions and styling tokens.npm run check: 0 errors.Closes TASK-1974
https://claude.ai/code/session_01HxBkAMiFBtCRJ2tKSCt3ST