fix(desktop): launch at sane default window size#1489
Conversation
… 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>
| "maximized": true, | ||
| "width": 1280, | ||
| "height": 800, | ||
| "center": true, |
There was a problem hiding this comment.
I think this might have been maximized by @klopez4212 maybe for onboarding?
There was a problem hiding this comment.
@klopez4212 ah yep, sent your way last night kenny. any thoughts before I swap our window sizing back to more typical behavior?
There was a problem hiding this comment.
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 👍
Pull request was closed
|
Closing this in favor of #1554. #1554 restored the window-state plugin's saved geometry behavior, which addresses the main issue: Buzz no longer forces a maximized window on every launch once state exists. After revisiting the remaining first-launch/default-size changes here, they feel heavier than the problem warrants and the proposed non-full-size default does not feel settled enough to ship. If we revisit developer launch ergonomics later, we should handle that as a smaller, explicit follow-up rather than continuing this PR. |
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
Validation
pnpm biomecleanpnpm tsccleancargo fmt --checkcleancargo checkcleanCoordination: buzz://message?channel=d63b9dbc-f4b0-4770-8da0-a5baedac4edc&thread=860b6f23c85089d3ca3a12a79f0973f747e62828302bc65c5e8ccf6bb1dbcb0d