Skip to content

fix: window state persistence and login-item toggle desync (v0.5.4)#59

Merged
VariableThe merged 3 commits into
mainfrom
fix/window-state-persistence
Jun 25, 2026
Merged

fix: window state persistence and login-item toggle desync (v0.5.4)#59
VariableThe merged 3 commits into
mainfrom
fix/window-state-persistence

Conversation

@VariableThe

Copy link
Copy Markdown
Owner

Summary

  • Fixes window position/size not persisting across restarts on macOS (plugin's on_window_ready fires before display server is ready)
  • Fixes launch-at-startup toggle desyncing when user removes PaperCache from macOS System Settings

Details

  1. Window state persistence: Deferred window-state restoration via background thread + 300ms delay to ensure display server is ready. Added direct file read fallback in restore_window_state command that bypasses the plugin's monitor-intersection check. Both tray and Settings "Quit" now explicitly save state before exit.

  2. Login-item toggle sync: New get_launch_at_startup Tauri command queries OS state via app.autolaunch().is_enabled(). Settings page now syncs toggle with real OS state on mount instead of relying solely on localStorage.

Files changed

AUDIT_LOG.md, CHANGELOG.md, src-tauri/src/commands/system.rs, src-tauri/src/lib.rs, src-tauri/src/tray.rs, src/App.tsx, src/Settings.tsx, src/Settings.test.tsx, src/api.ts, src/types.d.ts

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@VariableThe, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 55 minutes and 43 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e065156a-00fa-4bfb-8fd3-672ebe90760b

📥 Commits

Reviewing files that changed from the base of the PR and between 381983a and 51e2e50.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (10)
  • AUDIT_LOG.md
  • CHANGELOG.md
  • src-tauri/src/commands/system.rs
  • src-tauri/src/lib.rs
  • src-tauri/src/tray.rs
  • src/App.tsx
  • src/Settings.test.tsx
  • src/Settings.tsx
  • src/api.ts
  • src/types.d.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/window-state-persistence

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.

@VariableThe VariableThe merged commit d08289e into main Jun 25, 2026
4 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