Skip to content

fix: restore custom window position/size persistence across restarts#689

Merged
abose merged 1 commit intomainfrom
st
Mar 2, 2026
Merged

fix: restore custom window position/size persistence across restarts#689
abose merged 1 commit intomainfrom
st

Conversation

@abose
Copy link
Member

@abose abose commented Mar 2, 2026

Replace non-functional tauri-plugin-window-state with a custom implementation that saves window x, y, width, height, and maximized state to boot_config.json on close and restores on launch.

  • Add window state fields to BootConfig struct
  • Add restore_window_state() with multi-monitor awareness: validates saved position against connected monitors, maximizes if saved size exceeds current screen, falls back to 1366x900 on first launch
  • Save outer_size (not inner_size) to avoid progressive shrinking from title bar/border mismatch
  • Remove tauri-plugin-window-state dependency and plugin registration

fixes: phcode-dev/phoenix#1796

Replace non-functional tauri-plugin-window-state with a custom
implementation that saves window x, y, width, height, and maximized
state to boot_config.json on close and restores on launch.

- Add window state fields to BootConfig struct
- Add restore_window_state() with multi-monitor awareness: validates
  saved position against connected monitors, maximizes if saved size
  exceeds current screen, falls back to 1366x900 on first launch
- Save outer_size (not inner_size) to avoid progressive shrinking
  from title bar/border mismatch
- Remove tauri-plugin-window-state dependency and plugin registration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 2, 2026

@abose abose merged commit aab53fa into main Mar 2, 2026
5 of 6 checks passed
@abose abose deleted the st branch March 2, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[regression] remember window positions on restart app

1 participant