2 months ago
687da3aClose the 1.0 observability gap so a user bug report carries actionable information. File logging - Install a tracing-subscriber that writes a daily-rolling file (7-day retention) under Tauri's appLogDir() and mirrors to stderr. Chosen over a log-facade plugin because the crate already depends on tracing and ORT emits its diagnostics through tracing, so both are captured with no new capability surface. Default level info (overridable via OPENKARA_LOG); errors always recorded. Blocking writes so a crash still leaves the last lines on disk. - Migrate the diagnostic eprintln! calls in app_runtime, separator::model, and cache::stems to tracing macros (stderr output preserved via the stderr layer). Version visibility + debug export (all platforms) - New get_debug_info command assembles one DebugInfo snapshot: app version, build SHA, OS/arch, catalog generation + release id, model status/version, runtime state + artifact id, execution provider, and the log-file path. - New Settings -> About section renders it and offers "Copy debug info". The macOS Help menu's "Copy Debug Info" now shares the exact same data path and plain-text format (src/lib/debug-info.ts) — one implementation, two surfaces. - Remove the dead non-macOS About branch in app_menu (the menu mounts on macOS only); About/version now lives in Settings cross-platform. Docs + i18n - README, README_CN, and the EN/zh FAQ gain a "reporting a bug" section with the per-platform log paths and the Settings -> About -> Copy debug info flow. - settings.about.* keys added to en and zh-CN (structural i18n guard passes). Deps + packaging - Add tracing-subscriber + tracing-appender (MIT; pass cargo-deny). Regenerate packaging/flatpak/generated/cargo-sources.json for the new transitive crates. Tests: Rust debug-info assembly + serialization + log-path helper; TS formatter, copy helper, About component, menu copy-debug-info branch, IPC wrapper, and an About i18n completeness guard. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Parent7a1d9df