feat(tauri): persist unpack logs and clean sidecar output

Unpack logs lived only in memory, so closing the app dropped history.
Unrar progress also flooded stdout with carriage-return redraws, which
made the log viewer noisy and hard to search.

Persist the last twenty entries to unpack-logs.json under the app data
directory, load them on startup, and rewrite stdout/stderr through a
small terminal-sequence cleaner (CR/LF, backspace, control chars) before
storage and display. Sort the unpack-logs window newest-first by finish
or start time.

Test plan:
- cargo test -p lanspread-tauri-deno-ts -- terminal_log unpack_log
- Run an unpack, restart the app, open unpack logs: prior entries remain
- Confirm progress lines collapse to final text instead of spam

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-21 20:27:47 +02:00
parent 19ae1938f6
commit eedfc0105d
4 changed files with 204 additions and 10 deletions
Generated
+1
View File
@@ -2209,6 +2209,7 @@ dependencies = [
"log",
"mimalloc",
"serde",
"serde_json",
"tauri",
"tauri-build",
"tauri-plugin-dialog",