Skip to content

feat(studio): show the prototype's settings section index on phones - #2330

Merged
kantord merged 2 commits into
mainfrom
feat/studio-settings-phone-index-2261
Oct 15, 2026
Merged

kantord merged 2 commits into
mainfrom
feat/studio-settings-phone-index-2261

Conversation

@peppescg

@peppescg peppescg commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Part of a 4-PR stack: #2329 → #2330 → #2331 → #2332. Review in any order; merge bottom-up.

Summary

On a phone (below 500px), Settings now opens on the prototype's section index instead of a native <select>: the sections in the prototype's groups, each row with its icon and a chevron. Each section page gets the prototype's back bar, which names the section and returns to the index.

From 500px up nothing changes. /workspace/settings still redirects to /workspace/settings/profile before it renders, and the title and the section nav stay. Every slug and legacy redirect is unchanged. The "No regression" section has the proof.

What changed

Phone index (settings-index.tsx, routes/workspace.settings.tsx)

  • On a phone, /workspace/settings renders SettingsIndex: the Settings title, then the four groups (Preferences, Agent runtime, Experimental, Support) in the prototype's inset-grouped look:
    • filled cards (rounded-2xl bg-muted/50) with no border;
    • each row has the section's 18px glyph, its 15px label, and a chevron, and is 46px tall;
    • hairline dividers are inset to the text edge;
    • group labels, group spacing, and the touch highlight are the prototype's.
  • The index is a nav named "Settings sections". Each group's list is named by its visible title, and each row is a link to /workspace/settings/<slug>.
  • The route's beforeLoad still redirects to profile, with replace, from 500px up and outside a browser. It decides with (min-width: 500px), the same media query as min-[500px]:, through a new isDesktopViewport() in lib/use-mobile.ts.
  • If the window is widened past 500px while the index is open, it follows to You, also with replace.

Back bar (settings-header.tsx)

  • On a phone, each section page shows the prototype's full-bleed h-14 back bar: a bottom border, a back arrow, and the section's name as the page's h1. The arrow is a link to /workspace/settings named "Back to Settings".
  • On a phone section page, the big Settings title isn't rendered, as in the prototype. Each page has exactly one h1, which is also the element global search focuses after it navigates.
  • A new useIsDesktop() (same media query) switches the bar and the title. The frame keeps the same element structure on both sides of the pivot, so crossing it keeps a section's state, such as the model filter text.

Removed

  • The native <select id="settings-section"> and its "Settings section" label.
  • In settings-workspace.tsx (+6/−45), only the navigation chrome changes: the frame and title replace PageShell and the h1, and the picker block is gone. Section content and the Providers section are untouched.
  • lib/use-mobile.ts gains isDesktopViewport() and useIsDesktop(). useIsMobile() behaves as before; its subscription now comes from the same helper.

Difference from the prototype

  • Section order: Studio keeps its route-contract order, which the route tests pin, as in feat(studio): align Settings sections and About with the prototype #2252. So the Agent runtime group also holds Models (Studio's own section) and Diagnostics, and Support holds only About. The prototype puts Diagnostics under Support and has no Models row.
  • Desktop: no visible difference. Both land on You at /workspace/settings. The prototype's index redirects a desktop window from an effect after it paints; Studio keeps today's route redirect before render. It adds the prototype's effect only for a window widened while the index is open.
  • Back control: a size-11 target (Studio's 44px minimum) instead of the prototype's size-7 button. It's pulled into the gutter, so the arrow and the title sit exactly where the prototype puts them. It's named "Back to Settings" instead of "Back".
  • Title: Studio's shared 34px page title instead of the prototype's text-3xl, as in feat(studio): align Settings sections and About with the prototype #2252.
  • Focus ring: index rows carry Studio's inset outline-brand focus ring. The prototype's rows rely on the browser's default.
  • Switching: the media query switches the bar and the title in script, so the DOM holds one h1. The prototype renders both and hides one with CSS. The pixels are the same.
  • Section pages: their content is Studio's and isn't part of this change.

No regression

Pins first

1b7ce38ca was committed alone, before any change. It passes on the old code: the unit pins in three runs, the browser pins in one. It passes unchanged on the new code: the unit pin file has no diff between the pin commit and head, and the two browser pins are untouched.

  • settings-reachability.pinning.test.tsx (4):

    • the 13 slugs in order, with their labels, each loading /workspace/settings_/$section;
    • the legacy redirects: unknown slugs and the prototype's own slugs to profile, memory?item= to the fact page, /workspace/memory and /workspace/provider back to their sections;
    • a desktop window opening /workspace/settings on You, as a replacement;
    • every section reachable from the desktop nav, with aria-current on it;
    • every section reachable on a phone from Settings, with the current section announced.

    The phone check runs the production route tree in the real workspace shell. It opens each section with whichever control the phone page offers (the old picker's option, or a link), and reads the announcement as the picker's value or the page's heading. The same assertions therefore hold across the change.

  • e2e/settings-navigation.spec.ts, its first two tests, with real CSS and media queries:

    • desktop: Settings opens on You, every section opens from the nav, and the top nav's Settings returns to You;
    • phone: every section is reachable from the top nav's Settings, and its page names it.

Modified tests

The native-picker assertions are replaced by the equivalent assertion on the index or the back bar. Nothing else changes.

  • settings-accessibility.test.tsx, "identifies the current section in both navigation modes…" (Studio settings: replace the phone section select with the prototype's section index #2261 asks for this rewrite). The option[selected], min-h-11, and focus-ring checks on the select become:

    • the index links all 13 sections in order, each row 46px with a focus ring;
    • the phone section page's only h1 is the current section;
    • the back link is named, size-11, focusable, and points at the index;
    • no select in either mode.

    The desktop nav checks are unchanged.

  • settings-alignment.pinning.test.tsx:

    • "keeps both navigation modes…": the picker's 13 values, its selected option, its label, and its change to onSectionChange("about") become the labelled index's 13 hrefs in order, the phone page's heading "Storage" with the back link, and an index row that navigates to About. The desktop nav checks are unchanged.
    • "stays read-only…": the allowed selects go from ["settings-section"] to [].
  • settings-alignment.test.tsx, "groups the sections with an icon each…": the picker's current-section icon check becomes:

    • the index shows below 500px only, in the same four groups;
    • every row's glyph and chevron are decorative;
    • Personalise's glyph is still the palette.
  • settings-routes.test.tsx, "opens each settings section directly…": the 13 value= attributes and the selected option become the index's 13 hrefs, a nav button per section label, and no <select. The phone's current-section announcement is asserted in settings-accessibility.test.tsx, because the bar renders only in a phone window, which this node test can't create.

  • e2e/settings-layout.spec.ts: "the phone section picker reads as a control" becomes "the phone back control reads as a control", in light and dark. It's the same WCAG 1.4.11 check (3:1), applied to the back arrow, the only icon-only control in Settings' phone navigation.

  • e2e/phone-overflow.spec.ts: the settings surface's ready step waits for the phone heading "Models" instead of "Settings". This changes the selector only.

New tests

  • settings-index.test.tsx (8):
    • the prototype's groups, labels, glyphs, chevrons, and hrefs;
    • a row opens its section, and Back or the back bar returns to the index;
    • a section opened directly returns to the index;
    • desktop is unchanged: the redirect is a replacement, and the title and nav are there, with no bar and no index;
    • a widened window follows to You, with replace;
    • a section keeps its state across the pivot;
    • no select, and one h1, on every page at both widths.
  • e2e/settings-navigation.spec.ts (+3):
    • the phone index's groups, with rows at least 44px tall and no select;
    • the back bar names the section, has a target of at least 44px, and returns to the index;
    • at 499 and 500px, the index and bar swap with the section nav and back.
  • e2e/phone-overflow.spec.ts (+3): the index has no sideways scroll at 320, 360, and 390px.

Mutation proof

Each mutation was applied to the head, the settings unit suite was run, and the file was restored from HEAD.

Mutation Failing tests
Phones redirect too (unconditional guard) 5: four in settings-index, plus the phone reachability pin
No back bar 7: accessibility, alignment pin, four in settings-index, phone reachability pin
A native select back in the frame 6: accessibility, alignment pin (read-only), both no-select tests, phone reachability pin, routes
Desktop no longer redirects 3: alignment pin redirects, desktop reachability pin, routes redirect
Index ignores a widened window 1: settings-index resize
Frame remounts across the pivot 1: settings-index keeps state
Index drops the Models row 7: accessibility, alignment pin, alignment, two in settings-index, phone reachability pin, routes
Settings title also on phones 7: accessibility, alignment pin, four in settings-index, phone reachability pin

Screenshots

Before is 42b933fb4 (main), After is 8a42093a2 (this PR's change before the stack rebase; the rebased fef78bdba carries the identical patch, and #2259 below it touches no Settings file), and Prototype is stack-08. Phone frames are 390×844 and desktop frames 1280×800, from the offline Playwright fixtures. Each tree was captured twice. On a desktop, every frame has a before/after pair that differs by 0 pixels. The only run-to-run differences, about 100 pixels on both trees, come from the "Checking sign-in details…" spinner (a known harness gap from #2252) and one avatar transient.

Settings on a phone, light. After matches the prototype's index: groups, glyphs, chevrons, 46px rows, and card look. Studio's section order is the deliberate deviation: Models and Diagnostics sit in Agent runtime. Before, the page landed on You with the native picker.

Settings index on a phone, light

Settings at 1280px, light. Unchanged, pixel for pixel. It lands on You beside the section nav, as the prototype does.

Settings on a desktop, light

Phone: the index, dark

Matches the prototype, with the same section-order deviation.

Settings index on a phone, dark

Phone: the end of the index, light and dark

Experimental holds Labs, as in the prototype. Support holds only About, because Studio keeps Diagnostics in Agent runtime (the section-order deviation). Before doesn't scroll, so its column is the You page again.

End of the Settings index on a phone, light

End of the Settings index on a phone, dark

Phone: a section page with the back bar, light and dark

The back bar matches the prototype: the arrow and the title sit at the same positions, and the Settings title is gone. The deviation is the back control's 44px target, which looks the same. The Agent section's content is Studio's, unchanged.

Agent section on a phone, light

Agent section on a phone, dark

Desktop: Settings in dark, and a section page in light and dark

Unchanged, pixel for pixel, with no back bar.

Settings on a desktop, dark

Agent section on a desktop, light

Agent section on a desktop, dark

Gates

All gates ran through the shared gate lock. This PR's base is #2329 (ca850bc9a), and this branch is fef78bdba.

Gate Base (#2329, ca850bc9a) This branch (fef78bdba)
Biome 511 files 516 files
Typecheck and generated-artifact check clean clean
Server 26 files, 210 tests 26 files, 210 tests
Web 171 files, 1,488 tests 173 files, 1,500 tests
Browser (task studio:browser) 124 passed, 30 skipped 132 passed, 38 skipped (run at the top of the stack, #2332, which adds no journey above this PR)

The 12 new web tests are the 4 pins and the 8 index tests. The 16 new browser tests are the 5 in settings-navigation.spec.ts and the 3 index overflow widths, each in both projects; 8 of them are skipped in the project they don't target.

No docs change: user-docs/operating/studio.md doesn't describe the phone section picker, and the index is routine navigation (user-docs/AGENTS.md).

Closes #2261
Part of #2210

🤖 Generated with Claude Code

peppescg and others added 2 commits October 15, 2026 10:29
Pins what #2261 must keep while the phone section picker becomes the
prototype's section index: the 13 section slugs in route order, the
legacy redirects, a desktop window opening Settings on You (replacing
the bare URL), and every section reachable at phone and desktop widths
with the current section announced. The checks open a section with
whichever control the page offers, so they pass on the native picker
today and must pass on the index unchanged.

Refs #2261

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
On a phone, the bare /workspace/settings now opens the prototype's
section index instead of redirecting to You: the sections in the
prototype's groups, each row with its icon and a chevron, in the
inset-grouped list look. Each section page gets the prototype's back
bar, which names the section as the page heading and returns to the
index. The native <select> section picker is gone.

From the 500px pivot up nothing changes: the route still redirects to
/workspace/settings/profile before it renders, the title and the
section nav stay, and a window widened past the pivot while the index
is open follows to You. The decision reads the same media query as
min-[500px]:, through a new isDesktopViewport/useIsDesktop pair in
lib/use-mobile.ts. Slugs and legacy redirects are unchanged.

Tests that asserted the native picker now assert the same
reachability and announcement through the index and the back bar;
the reachability pins pass unchanged.

Closes #2261

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@peppescg
peppescg force-pushed the feat/studio-settings-phone-index-2261 branch from fef78bd to d0c76b9 Compare October 15, 2026 08:29
@kantord
kantord merged commit 2a48f79 into main Oct 15, 2026
31 checks passed
@kantord
kantord deleted the feat/studio-settings-phone-index-2261 branch October 15, 2026 08:56
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 20, 2026
2 tasks
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.

Studio settings: replace the phone section select with the prototype's section index

2 participants