Skip to content

Conversation

@ethanndickson
Copy link
Member

Summary

Improves workspace deletion UX in the archived workspaces list:

  1. Spinner feedback: Replace trash icon with spinning loader while deletion is in progress
  2. Persist state across navigation: Expose isRemoving via the workspace list API so the spinner shows even after navigating away and back
  3. Idempotent deletion: Backend returns success (not error) if deletion is already in progress, preventing race conditions from double-clicks or concurrent tabs

Motivation

This PR is necessary for the Coder workspace integration, where workspace deletion can take 30+ seconds to several minutes due to remote API calls and cleanup operations. Without this change, users would see a briefly disabled button with no visual feedback, potentially leading to confusion or repeated delete attempts.

Changes

File Change
src/node/services/workspaceService.ts Add isRemoving() method, return Ok when already deleting, enrich list() with isRemoving
src/common/orpc/schemas/workspace.ts Add optional isRemoving field to FrontendWorkspaceMetadataSchema
src/browser/components/ArchivedWorkspaces.tsx Show Loader2 spinner when deleting, combine local + API state for isProcessing

Generated with mux • Model: anthropic:claude-opus-4-5 • Thinking: high • Cost: $6.28

- Show spinner instead of trash icon while deletion is in progress
- Expose isRemoving state via API so spinner persists across navigation
- Make deletion idempotent: return Ok if already deleting (prevents races)
- Add isRemoving field to FrontendWorkspaceMetadata schema
@ethanndickson ethanndickson added this pull request to the merge queue Jan 14, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 14, 2026
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