feedBack-desktop/tests
gionnibgud 6349ed4c5f
Some checks are pending
Addon CI / addon (arm64, macos-14, mac) (push) Waiting to run
Addon CI / addon (x64, ubuntu-22.04, linux) (push) Waiting to run
Addon CI / addon (x64, windows-latest, win) (push) Waiting to run
Ship CI / CI (push) Waiting to run
feat(window): persist main window size/position across launches (#97)
* 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>
2026-07-11 15:41:47 +02:00
..
audio_sanitize Clean release snapshot 2026-06-16 18:48:12 +02:00
chordscorer Clean release snapshot 2026-06-16 18:48:12 +02:00
mlnotedetector perf(audio): gate ML note-detection pipeline (default OFF, arm on demand) (#51) 2026-06-29 23:12:31 +02:00
sandbox audio: per-slot postGain for parallel-branch loudness leveling (#58) 2026-07-02 12:50:47 +02:00
spike Clean release snapshot 2026-06-16 18:48:12 +02:00
_load-ts.js feat(config): real config reset/repair + migration framework (drop manual-delete) (#38) 2026-06-26 22:13:24 +02:00
audio-chain-persistence.test.js fix(renderer): keep Rig Builder's tone out of the user's manual VST chain (#73) 2026-07-03 15:59:34 +02:00
audio-effects-executor.test.js Clean release snapshot 2026-06-16 18:48:12 +02:00
CMakeLists.txt Clean release snapshot 2026-06-16 18:48:12 +02:00
config-bootstrap.test.js feat(config): real config reset/repair + migration framework (drop manual-delete) (#38) 2026-06-26 22:13:24 +02:00
config-migrations.test.js feat(config): real config reset/repair + migration framework (drop manual-delete) (#38) 2026-06-26 22:13:24 +02:00
config-paths.test.js feat(config): real config reset/repair + migration framework (drop manual-delete) (#38) 2026-06-26 22:13:24 +02:00
config-reset.test.js feat(config): real config reset/repair + migration framework (drop manual-delete) (#38) 2026-06-26 22:13:24 +02:00
juce-exclusive-type-name.test.js test: pin JUCE WASAPI exclusive device-type name (#90) 2026-07-09 22:18:04 +02:00
ml-note-detection.test.js Clean release snapshot 2026-06-16 18:48:12 +02:00
multi-source.test.js Clean release snapshot 2026-06-16 18:48:12 +02:00
renderer-capability-migration.test.js Clean release snapshot 2026-06-16 18:48:12 +02:00
window-bounds.test.js feat(window): persist main window size/position across launches (#97) 2026-07-11 15:41:47 +02:00