Skip to content

Apply the new style guide to the Gateway config UI and move the nav to a left sidebar - #159

Closed
julioest wants to merge 4 commits into
cppalliance:masterfrom
julioest:143-gateway-style-sidebar
Closed

julioest wants to merge 4 commits into
cppalliance:masterfrom
julioest:143-gateway-style-sidebar

Conversation

@julioest

@julioest julioest commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Applies the style guide to the Gateway config UI and moves the top nav into a collapsible left sidebar.

Best reviewed commit by commit:

  1. Move the gateway UI to the style guide palette: most of the diff, but it's mostly token renames and new values. Start with crates/shared-ui/tokens.css, then skim the rest.
  2. Turn the gateway nav into a collapsible sidebar: full-height rail under a sticky header, collapses to icons from a toggle, always icons-only below 710px.
  3. Color Local and Remote lists green and blue: the selected row and active filter follow the scope's color.
  4. Keep the split list off its divider: 16px gap between the list toolbar and the divider on Local, Remote and Discover (also on master).

Changes

  • Swap the Cursor Dark tokens for the style guide palette: orange for primary actions and selection, green for success and Local, blue for links and Remote, amber for warnings, red for destructive
  • Bump type, radius and control sizes to the style guide's scale
  • Restyle buttons, fields, cards, tables and banners on the new surfaces
  • Add the sidebar collapse toggle (lasts for the session, labels stay as the links' accessible names)
  • Grey out disabled primary and danger buttons so they don't look clickable
  • Keep the list toolbar 16px off the divider beside the detail pane

Preview

Click through it here: https://runvil-gateway-143.ngrok.app (fake data, nothing real behind it; temporary, so it may be offline)

Before After
1-before-local 1-after-local
2-before-settings 2-after-settings
3-after-expanded 3-after-collapsed
4-before-narrow 4-after-narrow

Testing

  • npm test (214 pass, and each commit passes on its own) and tsc --noEmit in crates/gateway/config-ui/ui
  • cargo clippy -p gateway-config-ui
  • Went through every page and settings section in headless Chromium from 390px to 1920px wide, plus hover, keyboard focus, menus and dialogs

Not in this PR

These are already on master, so I'll file them separately:

  • At 390px the model list squeezes long names and the Settings cache directory row gets clipped
  • The Profiles page shows its heading twice
  • Save stays disabled after editing a model's description
  • The profile switcher shows two chevrons

The sidebar's collapsed state resets on reload. Happy to persist it if we want that, it would need a new ui-storage key.

Fixes #143

The Gateway config UI and the shared-ui sheets now take every value
from the Gateway UI style guide instead of Cursor's dark theme, and
no stylesheet references a --cursor- token. Each hue carries one
meaning: orange for the primary action and the selection, green for
success, blue for links, amber for warnings, and red for destructive
actions. The nav keeps its current layout under the new names.

- tokens.css defines the palette directly: a chrome surface and
  three panel steps, three line weights, three text tiers, and each
  color family with a lighter text tint. The Cursor primitives,
  aliases, syntax colors, and unused spacing steps are gone.
- The type scale starts from a 14.5px root, radii run 8, 9, 10, 12,
  and 14px, and controls are 24, 28, and 32px tall.
- Buttons are 28px: the primary is an orange wash, secondary and
  outline share one raised neutral style, and danger is a red tint.
  A disabled primary or danger button drops its family color, since
  half opacity alone still reads as ready to press.
- Fields are bordered on the page surface and light their border on
  focus. Cards, tables, banners, and model rows sit on the raised
  panel with a line border.
- The About page's license link stays link blue.
The nav moves from a sticky column beside the content into a
full-height rail on the chrome surface, pinned under a sticky 56px
header strip. A toggle at the top of the rail collapses it from
150px to a 56px icon column and expands it again; the state lasts
for the session. Below 710px the rail always shows only its icons
and the toggle is hidden.

- Collapsed labels are hidden with clip-path, so each stays the
  link's accessible name, and every cell keeps its tooltip.
- The toggle carries aria-controls and aria-expanded, swaps its
  chevron with the state, and hugs the chevron so its focus ring
  frames only the chevron.
- Cells grow to 13.5px text with 14px icons; a hover raises the
  surface one step and the current page two.
The Local and Remote splits carry a family class, so a selected
model row's left rule and the pressed filter chip take green on
Local and blue on Remote, the style guide's hue for each scope.
Other selections keep the orange accent.
The model and Discover lists sat flush against the divider beside
the detail pane, so the sort control and filter chips touched the
line. In the side-by-side layout the list now keeps 16px of padding
on that side, the same gap the detail pane keeps on its own side.
@julioest
julioest marked this pull request as ready for review October 20, 2026 17:13
@cprevatte

Copy link
Copy Markdown

@julioest please revert the nav bar change and put it back to the top.

@julioest

Copy link
Copy Markdown
Contributor Author

@cprevatte Moved the nav back to the top in #165, no CSS changes. Closing this one and holding the CSS until the new mock is ready.

@julioest julioest closed this Oct 21, 2026
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.

Apply the new style guide to the Gateway config UI and move the nav to a left sidebar

2 participants