Repository navigation
Make the library's trash visible, with Put back - #21
Merged
Merged
Conversation
Removed pulls already kept their files until "Empty trash", but nothing showed what was in the trash, and the button was the only way in. The Library now has a Trash button with a count that opens a list of removed pulls, each with Put back, and Empty trash asks first and says what goes and what stays. Putting a pull back makes it current again unless a newer pull of its section was saved since; then it comes back as an earlier version. Prune history no longer empties the user's trash: it deletes only the versions it drops. A new column records when a pull was removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T34mysav6y1nxUtCUc5Yrf
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 17efe16398
ℹ️ 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".
Emptying the trash read its list of pulls once, then deleted folders one by one. A pull put back while that ran was made current again and then lost its documents and file records. The pulls now leave the trash in one transaction before any folder is deleted: a pull put back meanwhile is either back already and kept, or refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T34mysav6y1nxUtCUc5Yrf
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 changed
The Library's Empty trash button gave no hint of what the trash was or what was in it. It now works like a trash you can see into:
Store.putBack).emptyTrash()for every removed pull, which permanently deleted pulls the user had removed by hand. It now deletes only the versions it drops (Library.emptyTrash(ids)).0010_trash.sqladdspulls.removed_atto order the trash. Pulls removed before this change have no time and are listed last.The trash is defined as removed pulls that still have
artifactsrows (Store.trash), the same set the oldemptyTrashdeleted. No new table, so "Delete all content" is unchanged.Tests
test/library.test.ts: remove, then put back as current; remove and put back an earlier version; put back after a newer pull was saved; prune leaves the trash alone; emptying deletes the files and blocks put back.test/ui-format.test.ts: the new remove and put-back notices.test/review-renderer.electron.cjs: the empty trash explains itself; a pull is moved to the trash and appears in Trash (1); the empty-trash confirmation is opened and cancelled; the pull is put back. New screenshot05a-trash.png.npm test(224) andnpm run test:app(all 9 checks) pass locally.format:checkpasses.Docs
README, user guide (new "The trash" section), architecture (step 7) and CLAUDE.md are updated.
Generated by Claude Code