Mark tabs and split action buttons for host hint modes
cmux's hint mode (Cmd-J) labels every clickable control in the window so typing a label clicks it. It walks the window in process, and there SwiftUI shows the tab bar only as unknown accessibility elements, so the pane tab bar's tabs and split action buttons got no labels.
- New public
BonsplitHintTargetView: a transparent, click-through, non-accessibility view at a control's frame, with atitle. - Each tab carries one named by its title. Each split action button carries one, applied once in
splitButtonRowso it covers all three button styles, named by its tooltip.
Nothing changes for clicks or VoiceOver: the view returns nil from hitTest and is not an accessibility element.
Tests: Tests/BonsplitTests/BonsplitHintTargetTests.swift hosts a two-tab BonsplitView and expects targets named after both tabs and the default New Terminal and Split Right tooltips.
Used by manaflow-ai/cmux cx-zjtn.7 (hint mode labels for the pane tab bar). The cmux pin bump that adopts this also brings #272, #273 and #275; #272's fields are opt-in, so cmux's buttons keep their current behavior.
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by cubic
Marks pane tab bar tabs and split action buttons with a new BonsplitHintTargetView so a host's keyboard hint mode (like cmux's Cmd-J) can label them. SwiftUI shows the tab bar only as unknown accessibility elements in process, so hosts couldn't name these controls before.
The target view is transparent and click-through—it returns nil from hitTest and isn't an accessibility element—so clicks and VoiceOver behavior are unchanged. Each tab carries a target named by its title; each split action button carries one named by its tooltip. Tests cover a two-tab BonsplitView and expect targets for both tabs and the default New Terminal and Split Right tooltips.
Summary by CodeRabbit
- New Features
- Keyboard hint mode can now identify tabs by their titles and split actions by their existing tooltip text.
- Hint targets do not intercept mouse interactions or appear as separate accessibility elements.