Repository navigation
feat(studio): show the prototype's settings section index on phones - #2330
Merged
Merged
Conversation
This was referenced Oct 14, 2026
Base automatically changed from
fix/studio-approval-command-view-2259
to
main
October 15, 2026 08: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
force-pushed
the
feat/studio-settings-phone-index-2261
branch
from
October 15, 2026 08:29
fef78bd to
d0c76b9
Compare
kantord
approved these changes
Oct 15, 2026
Merged
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/settingsstill redirects to/workspace/settings/profilebefore 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)/workspace/settingsrendersSettingsIndex: the Settings title, then the four groups (Preferences, Agent runtime, Experimental, Support) in the prototype's inset-grouped look:rounded-2xl bg-muted/50) with no border;navnamed "Settings sections". Each group's list is named by its visible title, and each row is a link to/workspace/settings/<slug>.beforeLoadstill redirects toprofile, withreplace, from 500px up and outside a browser. It decides with(min-width: 500px), the same media query asmin-[500px]:, through a newisDesktopViewport()inlib/use-mobile.ts.replace.Back bar (
settings-header.tsx)h-14back bar: a bottom border, a back arrow, and the section's name as the page'sh1. The arrow is a link to/workspace/settingsnamed "Back to Settings".h1, which is also the element global search focuses after it navigates.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
<select id="settings-section">and its "Settings section" label.settings-workspace.tsx(+6/−45), only the navigation chrome changes: the frame and title replacePageShelland theh1, and the picker block is gone. Section content and the Providers section are untouched.lib/use-mobile.tsgainsisDesktopViewport()anduseIsDesktop().useIsMobile()behaves as before; its subscription now comes from the same helper.Difference from the prototype
/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.size-11target (Studio's 44px minimum) instead of the prototype'ssize-7button. 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".text-3xl, as in feat(studio): align Settings sections and About with the prototype #2252.outline-brandfocus ring. The prototype's rows rely on the browser's default.h1. The prototype renders both and hides one with CSS. The pixels are the same.No regression
Pins first
1b7ce38cawas 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):/workspace/settings_/$section;profile,memory?item=to the fact page,/workspace/memoryand/workspace/providerback to their sections;/workspace/settingson You, as a replacement;aria-currenton it;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: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). Theoption[selected],min-h-11, and focus-ring checks on the select become:h1is the current section;size-11, focusable, and points at the index;selectin either mode.The desktop nav checks are unchanged.
settings-alignment.pinning.test.tsx:changetoonSectionChange("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.["settings-section"]to[].settings-alignment.test.tsx, "groups the sections with an icon each…": the picker's current-section icon check becomes:settings-routes.test.tsx, "opens each settings section directly…": the 13value=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 insettings-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):replace;select, and oneh1, on every page at both widths.e2e/settings-navigation.spec.ts(+3):select;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.settings-index, plus the phone reachability pinsettings-index, phone reachability pinsettings-indexresizesettings-indexkeeps statesettings-index, phone reachability pin, routessettings-index, phone reachability pinScreenshots
Before is
42b933fb4(main), After is8a42093a2(this PR's change before the stack rebase; the rebasedfef78bdbacarries the identical patch, and #2259 below it touches no Settings file), and Prototype isstack-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 at 1280px, light. Unchanged, pixel for pixel. It lands on You beside the section nav, as the prototype does.
Phone: the index, dark
Matches the prototype, with the same section-order deviation.
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.
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.
Desktop: Settings in dark, and a section page in light and dark
Unchanged, pixel for pixel, with no back bar.
Gates
All gates ran through the shared gate lock. This PR's base is #2329 (
ca850bc9a), and this branch isfef78bdba.ca850bc9a)fef78bdba)task studio:browser)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.tsand 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.mddoesn'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