Allow host apps to extend tab context menus - #240
lawrencecchen wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesTab context-menu extension
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant BonsplitController
participant TabItemView
participant TabContextMenuBuilder
participant NSMenu
BonsplitController->>TabItemView: provide tab-specific menu items
TabItemView->>TabContextMenuBuilder: pass additionalMenuItemsProvider
TabContextMenuBuilder->>BonsplitController: request items when menu opens
BonsplitController-->>TabContextMenuBuilder: return NSMenuItem list
TabContextMenuBuilder->>NSMenu: append items after browser actions
Merge Risk: ⚪ Minimal · up to The tab context-menu extension preserves deferred provider evaluation and correctly supports fresh host-supplied native items. No actionable merge risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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 |
Host apps can add native items to the menu for a clicked tab. The provider runs when the menu opens, so it uses the current tab state.
This supports the cmux Focus in Cloud Sidebar action. The API keeps Cloud behavior and translated text in the host app.
Validation: added a test for deferred provider calls and native item state. The focused test passed on a leased Mac (1 test).