feat(cli): rename `workspaces delete` to `workspaces archive`

Merged
SU
2mo ago
+114-35

Summary

  • Moves superset workspaces delete to superset workspaces archive. delete stays as an alias, so ws delete and existing scripts still work. Leaf aliases were already supported by @superset/cli-framework (plugins uninstall uses remove), so no framework change was needed.
  • Help text now says what actually happens:
    • Cloud: cloudWorkspace.delete sets the row to archived; the sandbox stops after ~1 min and is deleted after 7 days. Unarchiving within 7 days resumes the disk; after that it gets a fresh sandbox.
    • Host: workspace.delete runs destroyWorkspace with force: true, so the worktree folder is removed even with uncommitted changes. The branch is kept, so a restore brings back committed work only.
  • The --json output key stays deleted for compatibility. Only the human messages say "Archived".
  • Updated AGENTS.md, docs/cloud-sandbox-mismatches.md, the CLI docs (reference, getting started, fleet recipe), the SDK doc comment (it said the sandbox is torn down) and the demo tape. No plugin skill or .agents/skills file named the command.

Testing

  • New workspaces/archive/command.test.ts: runs archive against a stub cloud API, and checks that workspaces delete and ws delete route to workspaces/archive. I removed the alias and confirmed the test then fails.
  • packages/cli tests: 373 pass, 1 fail. The failure is resolve-auth.test.ts; it fails the same way on main in this cloud workspace because stored credentials are present.
  • packages/cli-framework tests pass. tsc passes in packages/cli and packages/sdk. bun run lint and bun run check:plugins pass.

Summary by cubic

Renames superset workspaces delete to superset workspaces archive and clarifies the actual archiving behavior. delete stays as an alias, and the --json output key remains deleted, so existing scripts keep working.

  • Cloud sandboxes stop within a minute and are deleted after 7 days; restoring within 7 days keeps the disk.
  • Host worktree workspaces lose their folder (uncommitted changes included) but keep the branch, so a restore returns only committed work; workspaces sharing the project's own checkout keep that folder.
  • Updates docs, SDK doc comment, and demo tape; adds tests for routing and archiving.

Summary by CodeRabbit

  • Changes
    • Workspace cleanup is now presented as archiving; the delete command remains available as an alias.
    • You can archive multiple workspaces at once. Cloud sandboxes stop within a minute and are deleted after seven days. On the host, archiving removes the workspace folder and uncommitted changes, but keeps its branch and any shared project checkout.
    • Updated command examples and the CLI walkthrough to use archive terminology. The deleted result field is unchanged for script compatibility.