fix(desktop): persist window size and position - #6978
Draft
ComputelessComputer wants to merge 1 commit into
Draft
Conversation
The default 910x600 size was applied after window creation, which overwrote the saved frame before restore. Showing an already-open window also reapplied that stale state, so opening Settings from a meeting jumped the frame. Restore size, position, and maximized on create, keep live geometry when showing an existing window, and stop shrinking the window just because the user left a meeting view. Co-authored-by: John Jeong <ComputelessComputer@users.noreply.github.com>
✅ Deploy Preview for anarlog canceled.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Joey reported that the app forgets window size and position on almost every launch, and also jumps when going from a meeting to Settings. 1.4.11 only stopped recentering after updates, so the frame still reset.
Cause
tauri-plugin-window-statekeeps the saved frame in an in-memory cache. The main window was created, then immediately forced to 910×600, and the plugin’s resize listener wrote that default over the saved frame before restore ran. Re-showing an already-open window (tray, floating bar, Settings) applied that stale frame again. Leaving a meeting also restored temporary chat-panel width expansions even when chat was still open.Fix
Testing
pnpm -F desktop test src/shared/main/chat-panels.test.tsxpnpm -F desktop typecheckpnpm exec oxlint --quiet --format=github apps/desktop/src/shared/main/chat-panels.tsx apps/desktop/src/shared/main/chat-panels.test.tsxcargo test -p tauri-plugin-windowscould not run here (GTKgdk-3.0.pcis not installed in this environment).