Skip to content

fix(ui): build tab strips on gpui-base Tab and Tabs - #568

Merged
Tryanks merged 2 commits into
mainfrom
fix/tabs-on-base
Oct 1, 2026
Merged

Tryanks merged 2 commits into
mainfrom
fix/tabs-on-base

Conversation

@Tryanks

@Tryanks Tryanks commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Changed behaviour

Five tab strips — the settings navigation, the terminal drawer's tab strip, the right panel's Diff/Plan tabs and the model picker's provider rail (desktop and compact) — each hand-made their Role::Tab clickables with accessible_clickable and their Role::TabList containers. They are now gpui_base::Tab elements inside gpui_base::Tabs, which own the tab role, aria-selected, activation and press handling; material::tab adds the keyboard focus ring and pointer cursor, and each site keeps only its own layout and colours. The provider rail's Tabs sits inside the existing scroll area (base Tabs is not a scroll container).

Stacked on #567 (shares material::focus_ring); retarget to main once that merges.

Per Principle 7 as extended in #564.

Tests

Existing tests cover the strips' presence and switching (shell right-panel tests, settings and picker tests) and all pass. Tab activation and accessibility are gpui-base's own tested contract; no tcode-specific contract changed.

Checks run

  • cargo fmt --all --check, cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo nextest run -p tcode-ui --locked — 347 passed

Not verified visually (no Accessibility/Screen Recording permission for the computer-use tools here). Base Tab centres its content by default; the two left-aligned strips (settings nav, terminal tabs) set justify_start to keep their layout. Please glance at the settings page, the terminal drawer and the right-panel tabs before merging, or grant the permission and I will.

The settings nav, the terminal tab strip, the right-panel tabs and the
model picker's provider rail each hand-made their Role::Tab clickables
and TabList containers; they are now gpui-base Tab elements inside Tabs
lists, through material::tab for the focus ring, and keep only their own
styling.
@Tryanks

Tryanks commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Visual check done on the desktop binary (throwaway profile, seeded project) in light and dark, and on the phone example:

  • Settings navigation: left-aligned icon+label rows, active section highlighted — unchanged.
  • Terminal drawer tab strip with two tabs, active highlighted with its close button — unchanged.
  • Right panel Diff/任务 tabs — unchanged.
  • Model picker provider rail, desktop popover and compact sheet — unchanged; the rail is now exposed as a labelled tab group in the accessibility tree (it was not on main).

Base automatically changed from fix/segmented-toggle-group to main October 1, 2026 18:36
@Tryanks
Tryanks merged commit ecc378d into main Oct 1, 2026
7 checks passed
@Tryanks
Tryanks deleted the fix/tabs-on-base branch October 1, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant