Skip to content

fix: archive workspace without delete dialog or dropping DB rows - #394

Open
Ziinc wants to merge 4 commits into
mainfrom
cursor/archive-workspace-keeps-records-9c66
Open

fix: archive workspace without delete dialog or dropping DB rows#394
Ziinc wants to merge 4 commits into
mainfrom
cursor/archive-workspace-keeps-records-9c66

Conversation

@Ziinc

@Ziinc Ziinc commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Sidebar Archive Workspace (and bulk archive) previously reused the delete-workspace confirmation and delete_workspace command, which removed the SQLite row.
Archive now:

  • forgets the jj workspace and deletes .treq/workspaces/…
  • keeps the workspaces row with archived = 1
  • hides archived rows from get_workspaces / sidebar
  • skips the delete dialog (ask is not called)
  • leaves sync_workspaces from pruning archived records (they are excluded from the active list)
    True Delete Workspace (command palette / header menu) is unchanged.

Test plan

  • cargo test --manifest-path src-tauri/Cargo.toml --test core_workspaces_archive_workspace_test
  • cargo test --manifest-path src-tauri/Cargo.toml test_archive_workspace_keeps_db_entry --lib
  • Integration: test/integration/sidebar.test.tsx archives via context menu, asserts no delete dialog, directory gone, archived=1 in sqlite
  • Screenshot spec: scripts/screenshot/specs/workspace-archive-no-delete-dialog.spec.tsx (toast “Workspace Archived”, workspace row gone, no delete dialog)
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 30, 2026 17:12
Archiving now forgets the jj workspace and removes the directory while
keeping the local.db record marked archived. Sidebar archive actions no
longer reuse the delete confirmation flow.

Co-authored-by: ty <ty@tzeyiing.com>
Use jj-lib to assert forgotten workspaces, cargo-fmt local_db helpers,
and add a screenshot spec for the archive success toast.

Co-authored-by: ty <ty@tzeyiing.com>
@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Co-authored-by: ty <ty@tzeyiing.com>
@Ziinc
Ziinc marked this pull request as ready for review August 30, 2026 18:41
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.

2 participants