Repository navigation
Mark tabs and split action buttons for host hint modes - #281
teamleaderleo wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A host's keyboard hint mode walks its window in process, where SwiftUI shows the tab bar only as unknown accessibility elements. Each tab and split action button now carries a click-through BonsplitHintTargetView at its frame, named by the tab title or the button tooltip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to This change adds a transparent, click-through view that marks tabs and split-action buttons for hint modes. Existing click and VoiceOver behavior is not expected to change, and no merge-blocking risk was found. Pre-merge checks |
|
|
Parking this: Leo decided hint mode in cmux stays opt-in (manaflow-ai/cmux#19538 closed), so the tab-bar labels are on hold. Tests passed here (Hint targets suite). The branch |
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.
BonsplitHintTargetView: a transparent, click-through, non-accessibility view at a control's frame, with atitle.splitButtonRowso it covers all three button styles, named by its tooltip.Nothing changes for clicks or VoiceOver: the view returns nil from
hitTestand is not an accessibility element.Tests:
Tests/BonsplitTests/BonsplitHintTargetTests.swifthosts a two-tabBonsplitViewand 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-botwith what you need. Autofix is disabled.Summary by cubic
Marks pane tab bar tabs and split action buttons with a new
BonsplitHintTargetViewso 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
hitTestand 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-tabBonsplitViewand expect targets for both tabs and the default New Terminal and Split Right tooltips.Written for commit 9a48db6. Summary will update on new commits.
Summary by CodeRabbit