Repository navigation
Add New Window to Dock menu - #2340
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a dock menu to the application with a "New Window" option. When users right-click the app icon in the dock, they can select this menu item to create a new main window via the existing window-creation mechanism. Includes test coverage validating the dock menu item creation and functionality. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Greptile SummaryThis PR adds a "New Window" item to the macOS Dock context menu by implementing Key changes:
Confidence Score: 5/5Safe to merge — small, well-scoped change with a passing regression test and no modifications to existing behavior. No P0 or P1 issues found. The implementation correctly reuses the existing window-creation path and localization key, sets an explicit action target, and is covered by a behavioral test that follows the repo's established patterns and two-commit policy. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Dock
participant AppKit
participant AppDelegate
participant createMainWindow
User->>Dock: Right-click / long-press Dock icon
Dock->>AppKit: Request Dock menu
AppKit->>AppDelegate: applicationDockMenu(_ sender:)
AppDelegate-->>AppKit: NSMenu { "New Window" → openNewMainWindow(_:) }
AppKit-->>Dock: Display menu
User->>Dock: Click "New Window"
Dock->>AppDelegate: openNewMainWindow(_ sender:)
AppDelegate->>createMainWindow: createMainWindow()
createMainWindow-->>AppDelegate: UUID (new window ID)
AppDelegate-->>User: New main window appears
Reviews (1): Last reviewed commit: "Add New Window to Dock menu" | Re-trigger Greptile |
* Add Dock menu new-window regression test * Add New Window to Dock menu
Summary
New Windowitem viaapplicationDockMenu(_:)inAppDelegateopenNewMainWindow(_:)path so it matches the app's normal window creation flowFixes #2240.
Testing
./scripts/reload.sh --tag dock-new-window --launch./scripts/reload.sh --tag dock-new-windowSummary by cubic
Adds a "New Window" item to the macOS Dock menu that opens a new main window using the same flow as the app’s normal window creation. Fixes #2240.
applicationDockMenuinAppDelegatewith a localized “New Window” item that callsopenNewMainWindow(_:).Written for commit ea551e0. Summary will update on new commits.
Summary by CodeRabbit