Skip to content

Conversation

@yujonglee
Copy link
Contributor

No description provided.

@netlify
Copy link

netlify bot commented Dec 16, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 29dcca8
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/69413ae350b57c000824ee62
😎 Deploy Preview https://deploy-preview-2334--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 16, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 29dcca8
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/69413ae344b60b00080681b0
😎 Deploy Preview https://deploy-preview-2334--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@yujonglee yujonglee merged commit 52bc01c into main Dec 16, 2025
9 of 15 checks passed
@yujonglee yujonglee deleted the dynamic-and-persisted-window branch December 16, 2025 10:56
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 16, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR integrates the tauri-plugin-window-state plugin to persist window state across app sessions. The plugin is added as a workspace dependency, initialized in the Tauri builder chain, and configured to restore window state on startup and save window state on app exit. Window variant management is refactored to remove legacy Auth and Chat variants while adopting ratio-based sizing for remaining windows.

Changes

Cohort / File(s) Summary
Workspace and app dependencies
Cargo.toml, apps/desktop/src-tauri/Cargo.toml, plugins/windows/Cargo.toml
Added tauri-plugin-window-state version 2.4 as a workspace dependency across root and desktop app configurations.
Plugin initialization
apps/desktop/src-tauri/src/lib.rs, plugins/windows/src/lib.rs
Initialized window state plugin in Tauri builder. Added on_event handler to save window size state on ExitRequested event.
Window state restoration
plugins/windows/src/ext.rs
Refactored main window detection to use pattern matching (Self::Main). Added window state restoration for main window prior to display. Replaced task-spawning analytics with fire-and-forget API call.
Window variant refactoring
plugins/windows/src/window/v1.rs
Removed Auth and Chat enum variants from AppWindow. Implemented ratio-based window sizing via new window_size_with_ratio helper. Updated display and parsing logic to reflect remaining variants (Onboarding, Main, Control). Added macOS-specific initial window hiding.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Attention required: Verify that Auth and Chat window variants are not referenced elsewhere in the codebase
  • Attention required: Review the new window_size_with_ratio calculation logic for correctness, particularly monitor bounds handling and aspect ratio application
  • Attention required: Ensure window state restoration occurs at the correct initialization point and doesn't interfere with UI layout or focus logic
  • Attention required: Confirm that the on_event handler for ExitRequested completes without blocking the application shutdown process

Possibly related PRs

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dynamic-and-persisted-window

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9089845 and 29dcca8.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • apps/desktop/src/routeTree.gen.ts is excluded by !**/*.gen.ts
📒 Files selected for processing (7)
  • Cargo.toml (1 hunks)
  • apps/desktop/src-tauri/Cargo.toml (1 hunks)
  • apps/desktop/src-tauri/src/lib.rs (1 hunks)
  • plugins/windows/Cargo.toml (1 hunks)
  • plugins/windows/src/ext.rs (2 hunks)
  • plugins/windows/src/lib.rs (1 hunks)
  • plugins/windows/src/window/v1.rs (3 hunks)

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 and usage tips.

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.

2 participants