Add permanent deletion for archived panes#335
Conversation
|
@codex please review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d66ea4bdb6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 193a353670
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| await cleanupPermanentDeleteFiles(session as unknown as DatabaseSession); | ||
| } | ||
|
|
||
| const deletedCount = databaseService.deleteArchivedSessionsPermanently(); |
There was a problem hiding this comment.
Delete only the archived snapshot that was cleaned
In sessions:permanent-delete-archived, the loop above snapshots archived panes and cleans files/worktrees for those IDs, but this call re-queries the database and deletes every pane that is archived at that later moment. If another pane is archived while the async cleanup is running, it can be removed from history without cleanupPermanentDeleteFiles ever running for it, leaving its worktree/artifacts behind and deleting something outside the confirmed set. Reuse the archivedSessions IDs for the final database delete instead of deleting a fresh archived set.
Useful? React with 👍 / 👎.
Summary
Closes #333
Testing