Skip to content

fix(desktop): launch at sane default window size#1489

Open
tellaho wants to merge 1 commit into
mainfrom
tho/window-size-on-load
Open

fix(desktop): launch at sane default window size#1489
tellaho wants to merge 1 commit into
mainfrom
tho/window-size-on-load

Conversation

@tellaho

@tellaho tellaho commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Category: fix
User Impact: Buzz Desktop now opens at a comfortable centered size and returns to the user's last chosen window size on future launches.
Problem: The desktop app launched maximized on every start, which made fresh dev builds and large displays feel unnecessarily full-screen. Because saved geometry was skipped, user resizing did not survive relaunches, and the hidden-until-ready startup flow could reveal the window behind other apps.
Solution: Start from a centered 1280×800 default, restore saved window geometry across launches, and explicitly focus the window after it is shown.

File changes

desktop/src-tauri/tauri.conf.json
Updates the main window default from maximized to a centered 1280×800 launch size while keeping the existing minimum size.

desktop/src-tauri/src/lib.rs
Lets the window-state plugin restore size, position, and maximized state so a user's chosen geometry sticks between launches. Visibility and fullscreen remain excluded to preserve the app-managed reveal and avoid relaunching into fullscreen.

desktop/src/app/App.tsx
Focuses the Tauri window after the React-mounted reveal so the app does not appear underneath other windows at startup.

Reproduction Steps

  1. Launch Buzz Desktop with no saved window state.
  2. Confirm the app opens centered around 1280×800 instead of maximized/full-screen-ish.
  3. Resize and/or move the window, quit the app, then launch it again.
  4. Confirm the previous size and position are restored.
  5. Launch while other windows are present and confirm Buzz comes to the front after the hidden startup window is shown.

Validation

  • pnpm biome clean
  • pnpm tsc clean
  • 1549/1549 desktop tests pass
  • cargo fmt --check clean
  • cargo check clean

Coordination: buzz://message?channel=d63b9dbc-f4b0-4770-8da0-a5baedac4edc&thread=860b6f23c85089d3ca3a12a79f0973f747e62828302bc65c5e8ccf6bb1dbcb0d

… show

The main window launched maximized on every start: tauri.conf.json set
maximized: true and the window-state plugin was configured to skip
restoring size/position/maximized, so user resizes never survived a
relaunch and large displays always got an edge-to-edge window.

- Default to a centered 1280x800 window instead of maximized.
- Restore saved size/position/maximized across launches (only VISIBLE
  and FULLSCREEN stay excluded: visibility is app-managed via the
  hidden-until-React-mounts flow, and relaunching into fullscreen is
  jarring).
- Chain setFocus() after show() on mount so the window no longer
  reveals itself underneath other windows on launch.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho tellaho enabled auto-merge (squash) July 3, 2026 07:11
"maximized": true,
"width": 1280,
"height": 800,
"center": true,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might have been maximized by @klopez4212 maybe for onboarding?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@klopez4212 ah yep, sent your way last night kenny. any thoughts before I swap our window sizing back to more typical behavior?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah go for it..I was just going for a bigger window in general. If possible to remember the last setting would be good but otherwise fixed is 👍

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.

3 participants