mirror of
https://github.com/got-feedBack/feedBack-desktop.git
synced 2026-07-22 21:02:05 +00:00
* feat(window): persist main window size/position across launches The main window always opened at a fixed 1400x900, forcing a manual resize every session. Save the window geometry (normal bounds + maximized flag) to the existing desktop prefs store on close, and restore it in createWindow. Saved bounds are validated by a pure sanitizer against the current display layout before use, so stale state degrades safely instead of producing an off-screen or absurd window: - garbage/partial config -> 1400x900 centered defaults - size clamped between the 800x600 window minimums and the largest display's workArea - position kept only when the window overlaps a display by at least 100x50 px (unplugged monitor / resolution change -> re-center); negative multi-monitor coordinates remain valid - maximized sessions save getNormalBounds() and re-maximize on restore; fullscreen deliberately restores windowed No new dependency; reuses get/setDesktopConfig (atomic write, fail-soft) in soundfont-manager.ts. The store file is already in the reset-app-settings delete-set, so a config reset also resets bounds. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: gionnibgud <gionnibgud@gmail.com> * fix(window): don't crash shutdown if bounds persistence write fails The close listener called setDesktopConfig synchronously with no error handling; a disk-full or permissions failure during the write would throw unhandled inside the close handler, risking a shutdown crash. Wrap the write in try/catch and log a warning instead. Flagged by CodeRabbit on PR #97. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: gionnibgud <gionnibgud@gmail.com> --------- Signed-off-by: gionnibgud <gionnibgud@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| audio_sanitize | ||
| chordscorer | ||
| mlnotedetector | ||
| sandbox | ||
| spike | ||
| _load-ts.js | ||
| audio-chain-persistence.test.js | ||
| audio-effects-executor.test.js | ||
| CMakeLists.txt | ||
| config-bootstrap.test.js | ||
| config-migrations.test.js | ||
| config-paths.test.js | ||
| config-reset.test.js | ||
| juce-exclusive-type-name.test.js | ||
| ml-note-detection.test.js | ||
| multi-source.test.js | ||
| renderer-capability-migration.test.js | ||
| window-bounds.test.js | ||