mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
Windows users reported that the desktop window lost its size and position after restarting, and hidden windows could behave inconsistently when restored from taskbar/tray interactions. The Tauri shell now records the main window bounds in the app config directory, restores them on startup, and skips stale off-screen states when monitor layouts change. Constraint: Avoid new dependencies for window state persistence Constraint: Preserve existing hide-to-tray behavior for the main window Rejected: Add tauri-plugin-window-state | larger dependency surface for one small main-window state file Confidence: medium Scope-risk: moderate Directive: Keep monitor visibility checks when changing restore behavior so external-display removal does not strand the window off-screen Tested: cargo test Tested: cd desktop && bun run lint Tested: cd desktop && bun run build Not-tested: Windows taskbar manual reproduction; current machine is macOS Not-tested: cd desktop && bun run test fails in existing frontend locale assertions unrelated to this Tauri change