Add "+" menu button to horizontal tab bar for new terminal/browser tabs (#48)

Adds a "+" button to the tab bar (next to split buttons) that shows a
dropdown menu with "New Terminal ⌘T" and "New Browser ⌘⇧L" options.

- Uses native NSButton + NSMenu so the icon matches the split buttons
- Menu appears below the button
- Routes tab creation through new didRequestNewTab delegate method

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Austin Wang 2026-02-17 14:59:24 -08:00 committed by GitHub
parent c2fdd48290
commit addb99ed50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View file

@ -1443,6 +1443,17 @@ extension Workspace: BonsplitDelegate {
}
}
func splitTabBar(_ controller: BonsplitController, didRequestNewTab kind: String, inPane pane: PaneID) {
switch kind {
case "terminal":
_ = newTerminalSurface(inPane: pane)
case "browser":
_ = newBrowserSurface(inPane: pane)
default:
_ = newTerminalSurface(inPane: pane)
}
}
func splitTabBar(_ controller: BonsplitController, didChangeGeometry snapshot: LayoutSnapshot) {
_ = snapshot
scheduleTerminalGeometryReconcile()

2
vendor/bonsplit vendored

@ -1 +1 @@
Subproject commit 1d41e7b9ecfd310e6d780c2d93e74a34d759edc8
Subproject commit 2ff740da4aa150202afac7e224001807c321ed7c