agent: code-atomiser-fix — Tauri commands for trash list + restore
Adds two `#[tauri::command]` wrappers around the soft-delete pair that
landed with migration v16 in commit 15b74db:
- `list_trashed_transcripts(limit, offset)` mirrors the existing
`list_transcripts` shape (default 50, clamp 1..=500, offset >= 0)
so the Trash view can paginate the `deleted_at IS NOT NULL`
partition with the same UX as the live history list.
- `restore_transcript(id)` clears `deleted_at`. Idempotent on a live
row, per the storage-layer contract. Audio at `audio_path` may
already have been removed by `delete_transcript`'s best-effort
filesystem cleanup; the text + metadata recovery is what
restoration actually buys you.
Both are registered in the `tauri::generate_handler!` block in
`src-tauri/src/lib.rs`, alongside the existing transcripts surface.
Mirrors the signature shape of `delete_transcript` — no
`ensure_main_window` because the rest of the transcripts command
surface does not gate on it; introducing that here would be
inconsistent and out of scope for this fix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -719,6 +719,8 @@ pub fn run() {
|
||||
commands::transcripts::update_transcript,
|
||||
commands::transcripts::update_transcript_meta_cmd,
|
||||
commands::transcripts::delete_transcript,
|
||||
commands::transcripts::list_trashed_transcripts,
|
||||
commands::transcripts::restore_transcript,
|
||||
commands::transcripts::search_transcripts,
|
||||
// Diagnostics (panic + error capture, manual report bundle)
|
||||
commands::diagnostics::log_frontend_error,
|
||||
|
||||
Reference in New Issue
Block a user