feat: add system tray resident mode support#120
Conversation
- Implemented system tray integration for background execution - Added 'ResidentMode' setting to toggle background behavior - Main window now hides on close when resident mode is enabled - Added 'Keep running in system tray' toggle in Preferences UI - Added basic tray icon for macOS
Ensures the app will properly exit when the last window is closed if resident mode is disabled.
Added an atomic isQuitting flag that bypasses the WindowClosing cancel hook, allowing the application to gracefully close windows and terminate when Quit is triggered from the menu or system tray.
Ensures that the quitting flag is set on all application quit routes (including Cmd+Q, Dock quit, and OS shutdown) so that the WindowClosing hook can properly allow windows to close and the app to terminate.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
Walkthrough
Changes常駐モードの設定とアプリ動作
frontend/dist の保持設定
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@main.go`:
- Line 16: The go:embed directive in main.go is failing type checks when
frontend/dist is missing, so ensure the embedded path always exists before build
or lint. Update the build flow around the main package so frontend/dist is
generated or restored prior to compiling, and confirm the embed target used by
go:embed all:frontend/dist is present in CI and local checks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: c37cbd3c-39a8-432e-a79f-332f7fe0499c
⛔ Files ignored due to path filters (1)
build/trayicon.pngis excluded by!**/*.png
📒 Files selected for processing (3)
frontend/src/SettingsWindow.tsxmain.gosettings.go
| //go:embed build/trayicon.png | ||
| var trayIcon []byte | ||
|
|
||
| //go:embed all:frontend/dist |
There was a problem hiding this comment.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
frontend/dist がない状態で Go の型チェックが失敗しています。
Line 16 の //go:embed all:frontend/dist は対象ファイルが存在しないとコンパイル不能です。lint/CI の前に frontend build を実行するか、embed 対象が常に存在するようにしてください。
🧰 Tools
🪛 golangci-lint (2.12.2)
[error] 16-16: pattern all:frontend/dist: no matching files found
(typecheck)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@main.go` at line 16, The go:embed directive in main.go is failing type checks
when frontend/dist is missing, so ensure the embedded path always exists before
build or lint. Update the build flow around the main package so frontend/dist is
generated or restored prior to compiling, and confirm the embed target used by
go:embed all:frontend/dist is present in CI and local checks.
Source: Linters/SAST tools
|
@coderabbitai review |
✅ Action performedReview finished.
|
resolved #67