Problem
gpui_base::Tab currently supports pointer activation and accessibility roles, but it does not participate in keyboard focus. Tabs receives erased child elements, so it cannot currently coordinate focus between its tabs.
Before Tabs is treated as a complete desktop tab-list primitive, it needs compound keyboard behavior rather than making every tab an unrelated tab stop.
Required behavior
- Roving focus: one tab stop for the active/selected tab.
- Left/Right navigation for horizontal tab lists.
- Up/Down navigation for vertical tab lists.
- Home/End navigation.
- Enter/Space activation.
- Disabled tabs are skipped.
- Focus remains stable across controlled selection updates and rerenders.
- Accessibility selection, position and orientation remain correct.
Design constraint
The behavior belongs in gpui-base, not in gpui-shell. The current Tabs API stores AnyElement children, so the implementation needs an explicit typed item/registration contract or another Base-owned mechanism that lets the group coordinate child focus handles without moving selection state out of the application.
Verification
Add real GPUI keyboard tests covering forward/backward movement, wrapping policy, disabled tabs, Home/End, activation, focus retention, and horizontal/vertical orientation.
A TODO referencing this missing behavior is present beside gpui_base::Tab.
Problem
gpui_base::Tabcurrently supports pointer activation and accessibility roles, but it does not participate in keyboard focus.Tabsreceives erased child elements, so it cannot currently coordinate focus between its tabs.Before Tabs is treated as a complete desktop tab-list primitive, it needs compound keyboard behavior rather than making every tab an unrelated tab stop.
Required behavior
Design constraint
The behavior belongs in
gpui-base, not in gpui-shell. The currentTabsAPI storesAnyElementchildren, so the implementation needs an explicit typed item/registration contract or another Base-owned mechanism that lets the group coordinate child focus handles without moving selection state out of the application.Verification
Add real GPUI keyboard tests covering forward/backward movement, wrapping policy, disabled tabs, Home/End, activation, focus retention, and horizontal/vertical orientation.
A TODO referencing this missing behavior is present beside
gpui_base::Tab.