TEN-30: Implement trash management service and Tauri commands#5
Open
nicolas-agentzero wants to merge 2 commits intomainfrom
Open
TEN-30: Implement trash management service and Tauri commands#5nicolas-agentzero wants to merge 2 commits intomainfrom
nicolas-agentzero wants to merge 2 commits intomainfrom
Conversation
- Add core TrashService with list/recover/delete/clear/auto-cleanup APIs - Add recovery strategies (original location or suffix-on-conflict) - Add trash stats payloads for UI badge/count integration - Expose trash commands via Tauri invoke handler - Add unit tests for listing + recovery behavior
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.
Summary
Implements TEN-30 trash management in the codebase with a new core TrashService and Tauri commands for desktop integration.
What was implemented
Core (
tentacle-core)core/src/trash.rspub mod trash;incore/src/lib.rsTrashServiceAPIs:list_trash(documents_folder)recover_item(documents_folder, trash_path, strategy)delete_permanently(documents_folder, trash_path)clear_trash(documents_folder)run_auto_cleanup(documents_folder)(30-day retention)get_trash_stats(documents_folder)trash_path(relative-only, no traversal)original_location(fails if destination exists)with_suffix(restores asname (1).md, etc)TrashedItemTrashListResultTrashStatsRecoveryResultDesktop/Tauri bridge (
frontend/src-tauri)Added commands in
frontend/src-tauri/src/lib.rs:list_trash_itemsrecover_trash_itemdelete_trash_item_permanentlyclear_trash_itemsrun_trash_auto_cleanupget_trash_statsAnd registered all of them in the Tauri invoke handler.
Tests
Added unit tests in
core/src/trash.rsfor:Notes