Skip to content

fix(desktop): preserve main window geometry across toolbar mode - #1789

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/fix-main-window-startup-size
Jul 27, 2026
Merged

fix(desktop): preserve main window geometry across toolbar mode#1789
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/fix-main-window-startup-size

Conversation

@bobleer

@bobleer bobleer commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep temporary toolbar/floating-window bounds out of persisted main-window state
  • repair legacy undersized startup geometry to the standard 1200×800 client size and reapply an 800×600 minimum
  • persist restored normal geometry across close, quit, restart, tray, and process-exit paths
  • use matching inner-size metrics during toolbar round trips to avoid decorated-window growth
  • keep the new native geometry command local in remote/peer-device modes

Root cause

Toolbar mode morphs the existing main window into a compact floating surface. The window-state plugin cached those resize and move events, then wrote the floating bounds during shutdown. The next launch restored that transient geometry as if it were the normal client window.

Verification

  • pnpm run type-check:web
  • focused Web UI tests: 3 files, 71 tests passed
  • cargo check -p bitfun-desktop
  • cargo test -p bitfun-desktop main_window_geometry_tests --lib
  • cargo test -p bitfun-desktop every_registered_command_declares_a_remote_workspace_policy --lib
  • cargo test -p bitfun-cli peer_host::dispatch::tests::local_only_commands_are_denied
  • cargo build -p bitfun-desktop
  • git diff --check

Visuals

Not applicable: this corrects native startup/restoration geometry without changing the rendered UI.

AI-assisted. Testing level: fully tested for the touched paths.

Keep transient floating-window bounds out of the persisted main-window state, repair legacy undersized startup geometry, and restore the standard client minimum after leaving toolbar mode.
@bobleer
bobleer merged commit a1d582a into GCWing:main Jul 27, 2026
5 checks passed
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.

1 participant