The desktop window always reset to its default size (1024x768) after restart because no WindowState was persisted.
Root Cause
Main.kt created Window without WindowState or any persistence mechanism. Each launch used the default size.
Fix
WindowStateStorage (commonMain) — persists width/height/position via multiplatform-settings (java.util.prefs on desktop)
Main.kt (desktopMain) — loads saved state at startup via rememberWindowState(), uses snapshotFlow inside Window composition to persist changes continuously, explicit Preferences.flush() ensures values reach disk
Tests — 3 tests cover save/load/overwrite
Makefile — new desktop-install target to rebuild and copy app to /Applications/myicek.app
## Problem
The desktop window always reset to its default size (1024x768) after restart because no WindowState was persisted.
## Root Cause
Main.kt created Window without WindowState or any persistence mechanism. Each launch used the default size.
## Fix
- WindowStateStorage (commonMain) — persists width/height/position via multiplatform-settings (java.util.prefs on desktop)
- Main.kt (desktopMain) — loads saved state at startup via rememberWindowState(), uses snapshotFlow inside Window composition to persist changes continuously, explicit Preferences.flush() ensures values reach disk
- Tests — 3 tests cover save/load/overwrite
- Makefile — new desktop-install target to rebuild and copy app to /Applications/myicek.app
The desktop window always reset to its default size after restart
because no WindowState was persisted. Add WindowStateStorage backed
by multiplatform-settings (java.util.prefs on desktop) to save and
restore width, height, and position. Use snapshotFlow inside the
Window composition to persist changes continuously, with an explicit
Preferences.flush() to ensure values reach disk before exit.
Also add 'desktop-install' Makefile target to rebuild and copy the
app to /Applications/myicek.app.
herel
merged commit 22c0a61e32 into main2026-08-11 15:13:46 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
The desktop window always reset to its default size (1024x768) after restart because no WindowState was persisted.
Root Cause
Main.kt created Window without WindowState or any persistence mechanism. Each launch used the default size.
Fix