Skip to content

Persist detached settings window geometry - #397

Merged
btsouth merged 6 commits into
mainfrom
fix/issue-275
Aug 23, 2026
Merged

btsouth merged 6 commits into
mainfrom
fix/issue-275

Conversation

@btsouth

@btsouth btsouth commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Fixes #275.

Restores and clamps the saved detached Settings size and position, persists user move and resize events, and removes the mount-time frontend override. Adds focused native and frontend regression tests.


Note

Low Risk
Window placement only. No auth, credentials, or data-handling changes. First open with no stored geometry still uses the default size and centered position.

Overview
The detached Settings window now reopens at its last size and position instead of being recentered and resized on every open.

Native open now loads stored geometry, applies it at create time, and clamps the position on-screen. Move and resize events persist through handle_window_event. The frontend no longer calls setSize/setPosition on mount, which had been overwriting the restored layout.

Reviewed by Cursor Bugbot for commit dc4bb9a. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Persist detached Settings window geometry across sessions

  • The detached Settings window now saves its size and position to geometry_store on move/resize via shell::settings_window::handle_window_event, skipping minimized/maximized states.
  • open_or_focus loads stored geometry for SurfaceMode::Settings when creating the window, falling back to defaults, and uses position::default_surface_position for initial placement.
  • Removes the frontend applySettingsWindowSize util and its mount useEffect from Settings.tsx, so the frontend no longer overwrites backend-restored geometry on open.
  • Adds tests in tests.rs for position clamping and stored-size retrieval, and a source-level guard test in Settings.test.ts that setSize/setPosition are not called.
  • Behavioral Change: window events for the Settings window are now handled by shell::settings_window::handle_window_event before main-window-only logic in the tauri Builder on_window_event closure in main.rs; if that handler returns early, main-window handlers are skipped.

Macroscope summarized dc4bb9a.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ceiling dc4bb9a Commit Preview URL

Branch Preview URL
Aug 23 2026, 06:53 PM

@cursor

cursor Bot commented Aug 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_0ef577ed-1fa1-4c35-a5f0-d7b3a5a92b9c)

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@tsouth89, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 45f2d449-e0c8-48e7-abb2-115f763a03c5

📥 Commits

Reviewing files that changed from the base of the PR and between fc8bca1 and dc4bb9a.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • apps/desktop-tauri/src-tauri/src/main.rs
  • apps/desktop-tauri/src-tauri/src/shell/settings_window.rs
  • apps/desktop-tauri/src-tauri/src/shell/tests.rs
  • apps/desktop-tauri/src/surfaces/Settings.test.ts
  • apps/desktop-tauri/src/surfaces/Settings.tsx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Aug 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_6f116e6e-f5c9-4010-bb82-c79e0e9962cd)

@cursor

cursor Bot commented Aug 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_978aa559-27c2-4a74-a72d-3565180dbfcd)

@btsouth
btsouth merged commit 67be4b9 into main Aug 23, 2026
13 of 14 checks passed
@btsouth
btsouth deleted the fix/issue-275 branch August 23, 2026 18:57
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.

Persist detached Settings window size and position

1 participant