feat: persist and restore TUI state across restarts

The main TUI now loads state on startup — search history restored as
inert entries, saved chat rooms rejoined on the server, and incomplete
downloads (including failed/timed-out ones) automatically re-enqueued —
and saves a diffed snapshot each loop tick and on exit, so only changed
files are rewritten.
This commit is contained in:
michel
2026-07-20 20:17:44 +02:00
parent d410f9e834
commit c945bd5d5e
4 changed files with 297 additions and 1 deletions
+4
View File
@@ -243,12 +243,16 @@ fn run_default_tui(
persist_credentials(&outcome, config_path, file_config, &secret_store);
let store = persist::paths::state_dir()
.map(persist::state::StateStore::new);
launch_main_tui(
terminal,
Arc::new(outcome.client),
resolved.download_dir.clone(),
resolved.max_concurrent_downloads,
Duration::from_secs(resolved.search_timeout),
store,
)
}