Repository navigation
fix(studio): sweep Studio's accessibility, 500px breakpoints, and phone overflow - #2256
Conversation
3ad5a10 to
fb8bd54
Compare
fb8bd54 to
e42767f
Compare
e42767f to
f02205d
Compare
f02205d to
91564e2
Compare
91564e2 to
394aeb5
Compare
394aeb5 to
a2fbe2f
Compare
a2fbe2f to
a21bf30
Compare
a21bf30 to
39965ac
Compare
0641b3c to
f138f34
Compare
010944e to
f790735
Compare
…ng filter Pins each control's choice, selected state, and actions before they move to the shadcn radio and toggle groups. A control's state is read from whichever ARIA attribute it exposes, so the pins hold on both trees. Refs #2208 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…width At 320 to 390px the draft chat's starter chips and the Continue chip made the transcript scroll sideways: the empty state shrank to its widest child, an untruncated chat title. The empty state now spans the column, the Continue chip truncates, and the empty column drops the minimap gutter so the greeting centres like the prototype's mobile empty state. The header's Activity and Canvas labels now follow the header's width instead of the viewport's. From 760px the chat list sits beside the chat, and the labels pushed a running chat's Stop button out of the header. A browser test checks for sideways scrolling at 320, 360, and 390px on the chat draft and transcript, settings, skills, schedules, memory, and shortcuts pages, and that Skills shows one list on each side of 500px. Refs #2208 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…adcn primitives The worktree picker's native radios become the shadcn radio group, and the Skills page's All / Learned switch and Settings → Learning's status filter become single toggle groups (#2201). Each keeps its look, its labels, and its 44px targets; choosing the selected pill again keeps it. The radio group is disabled while a successor is being created. Tests that read a native radio's `checked` or a pill's `aria-pressed` now read the primitives' `aria-checked` and `radio` role, with the same expectations. Refs #2208 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Breakpoints: the remaining sm: classes in the provider page, the chat headers and transcript column, and the search dialog move to the prototype's 500px pivot. A guard test fails on any new sm: or md: class in a feature or the shell; the five left match the prototype or a dialog's own width, and each is listed with its reason. The schedules workspace is left to #2194. Live regions: loading and empty states are polite statuses and failures are alerts on the skills inventory and skill detail, the memory fact page and Facts about you, the shortcuts page, the provider page, the session dialog's views, the worktree picker, the chat list, the side thread, the model menus, and the canvas. The search field's spinner gets a screen-reader label, the back links' arrows and the remaining icons are hidden from assistive technology. Refs #2208 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The guard matched a sm: or md: class only right after whitespace, a quote, or a bracket, so dark:sm:, hover:md:, an arbitrary variant's [&>svg]:sm:, and max-sm: / max-md: slipped past it, and it read only the features and the shell. It now splits each class into its variants, flags a viewport sm, md, max-sm, or max-md in any position (container queries such as @max-md: still pass), and reads all of src except the shared primitives in components/ui. Unit cases pin both the matcher and the scope; the scan finds no new classes. Refs #2208 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… chip The header's container-query journey covered only a default-mode chat with no delegation. A new journey runs a debug chat in Accept edits with a fleet of all three families, sweeps the viewport from 500px, and checks at every width that the header's content fits, Stop and both badges stay inside it, and the agents chip shows exactly when the header's content box reaches 52rem, crossing that threshold inside an 832-900px header. Swapping the chip's container query for a viewport query fails it. Refs #2208 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…over
The learned-skill list and its Recent changes showed absolute stamps
("Sep 24, 2026, 8:30 AM"), which truncated the skill names on a phone.
Like the prototype, both now read relative time ("1d ago") from the
shared formatter, and the exact time is the stamp's title.
Refs #2208
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ests #2232's review fix added two learning-queue tests that click the status filter by role "button". This PR turns that filter into a shadcn toggle group whose items are radios, as it already did for the other learning tests. Selector-only change; the assertions are unchanged. Refs #2208 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…40px again The labels moved from a viewport breakpoint (640px) to a container query on the header, meant to start where they did. But 38.5rem is the header's border box at 640px, and a container query reads the content box, which is 48px narrower. Without the chat list the labels only showed from 688px, so 640-687px lost them. The query is now 35.5rem, the content box at 640px. A new journey checks the labels hide at 639px and show at 640, 700, and 759px; the header fit journeys, including the 832-900px sweep with every chip, still pass. Refs #2208 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ils test The learning filter became a toggle group of radios in this branch, and its tests moved from button and aria-pressed to radio and aria-checked. The in-flight Details read test, added below this branch, now does the same; its assertions are unchanged. Refs #2208 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
f790735 to
6c1800d
Compare
kantord
left a comment
There was a problem hiding this comment.
Approving. I reviewed the diff with an independent reviewer and a skeptic pass. No blockers found: every sm: rewrite is a clean min-[500px]: with no inverted pair, roles and aria-hidden are on the right elements, nothing announces repeatedly, and CI is green. The guard and header tests are stronger than the description says.
Follow-up in #2303, section E: the guard test misses min-sm:, min-md: and min-[40rem]: (add min-sm and min-md to the set).
Small description nits, no code change needed: the toggle-group pills are described as the WAI-ARIA radio pattern, but arrow keys only move focus (Space or Enter selects); the guard scans all of src except components/ui and features/schedules, not just "features/ and shell"; the learned-skills dates are now relative, which isn't listed under visible changes.
Fully or partially written by an AI agent.
Summary
This is the last Studio alignment PR (#2208, part of #2210): the cross-cutting accessibility and 500px breakpoint sweep. It's stacked on #2255 (
feat/studio-chat-sessions-2207d), so review that first.sm:classes in features move to the prototype's 500px pivot. A guard test now fails on any newsm:ormd:class in a feature or the shell; the five left are listed with their reasons.Schedules (#2194) and the MCP inventory (#1851) are not touched. What the sweep would change in schedules is listed under For #2194 (schedules).
What changed
Breakpoints
grepfor responsive prefixes inapps/web/src(non-test files), before and after:sm:/md:beforelg:beforefeatures/(without schedules)features/schedules/(#2194)components/shell/components/ui/(shadcn primitives)Moved to
min-[500px]::settings/provider-detail.tsx: the facts card's padding and its two two-column grids.chat/chat-workspace.tsx: both chat headers' padding and the transcript column's left padding.search/global-search.tsx: the field's font size and the keyboard hint.Replaced by a shadcn primitive: the worktree picker's hand-copied footer (
flex-col-reverse … sm:flex-row sm:justify-end) is nowDialogFooter, the same classes the prototype gets from it.Replaced by a container query: the chat header's Activity and Canvas labels (
sm:inline→@min-[35.5rem]/chat-header:inline). From 760px the chat list sits beside the chat, so the viewport says nothing about the header's room. 35.5rem is the header's content box (568px) at 640px, the narrowest viewport that showed them before, so a header without the chat list shows them exactly where it did.Intentional exceptions (asserted, with their reasons, in
features/breakpoints.test.ts):components/shell/storage-health-banner.tsxsm:inlinesm:inlineon the same element.chat/session-inspection.tsxsm:max-w-lgDialogContent's pivot, and the prototype's session dialogs.knowledge/learned-skills.tsxsm:max-w-2xlshortcuts/shortcut-reference.tsxsm:grid-cols-2×2sm:grid-cols-2on the same elements.lg:stays where the prototype has it on the same element (message bubbles, file preview, code block, side thread, the Facts about you table, the skill detail layout, the models grid's third column).components/ui/keeps its upstream shadcn classes.Live regions and decorative glyphs
Roles:
statusfor loading and empty states,alertfor failures. Settings already had them from #2252.StateCard(loading, failure, unavailable, empty, no match); the skill detail'sDetailState(loading, failure, unavailable, not found); the learned-skill "Comparing versions…" line.alertfor the two failures).Hidden glyphs:
←on the shortcuts and provider pages (their names are now "Settings" and "Providers");aria-hidden; the attribute is now explicit, as everywhere else.Screen-reader label: the search field's loading spinner was an
svgwith anaria-labeland no role. It's nowaria-hidden, with ansr-only"Loading searchable items". The footer'saria-liveline still announces the loading.Phone overflow (
chat-workspace.tsx,continue-latest-chip.tsx)At 320 to 390px the draft's empty state shrank to its widest child, the Continue "…" chip with an untruncated title. The transcript column then scrolled sideways: 746px of content in a 320px column. Now:
w-full), so the chips wrap and the Continue chip truncates (max-w-full);#2201 leftovers
grepinfeatures/(non-test): 1 native<select>, 1 set of native radios (plus 2 checkboxes and 6 selects in schedules), 1<details>, and 11aria-pressed.worktree-picker-dialog.tsx, #2255)RadioGroup/RadioGroupItem. Each card stays a<label>for its item, the item takes its name from the card's text, and the group is disabled while a successor is being created. Tests change from.checkedtoaria-checked, selector only (see below).<select>, #2252)<option>list andoption[selected]and dispatches a nativechange. A Radix Select renders no options until it opens, so that test would need a different kind of interaction, not a new selector. The prototype has no picker here either; it drills down from a section index. Moving to that index is the real alignment and a follow-up.knowledge-workspace.tsx)ToggleGroup type="single", drawn over the toggle item's defaults so the pixels are identical. Choosing the selected pill again keeps it.learning-settings-page.tsx)aria-pressedreports the current value.Toggle(#2255).<details>inconsolidate-memory-card.tsxDifferences from the prototype
role="radio"and one tab stop with arrow-key movement (the WAI-ARIA radio group pattern). The prototype's buttons take a tab stop each.max-[N]meanswidth < N. So the prototype'smax-[499px]/min-[500px]pair, which Studio copies 52 times, applies neither side at exactly 499px, whileuseIsMobile(max-width: 499px) already says phone. The Skills inventory usesmax-[500px]:hidden, the exact complement, and a new browser test pins that one list shows at 499px and at 500px. Changing everymax-[499px]tomax-[500px](or adding named variants) in both repositories is a follow-up, not part of this sweep.Visible change
No regression
Pinning tests
851133005was committed first. The three pin files (9 tests) pass on the base (04e7f6f70) and on this branch. To check the base, the branch'sapps/web/srcwas swapped back to the base's with the pins kept (git checkout 04e7f6f70 -- apps/web/src), the pins ran, andHEADwas restored.chat/worktree-picker.pinning.test.tsx(3): one radio per worktree, named by its label, branch, and revision; only the selected one checked; the actions wait for a choice; a click on the radio or on its card chooses that worktree.knowledge/knowledge-view-switch.pinning.test.tsx(3): the current view's pill is selected; the other pill asks for its view; choosing the selected pill keeps the view; no Learned pill without a learned-skill inventory.learning/learning-filter.pinning.test.tsx(3): Pending first with the staged list; another pill selects alone and lists its status from the first page; choosing the selected pill again keeps it; 44px targets.Each pin reads
aria-pressed/checkedoraria-checked, whichever the control exposes. One fix after the pin commit: the worktree pin's helper returnedundefinedinstead offalsefor a Radix button. It now compareschecked === true, and still passes on both trees.New tests
features/live-regions.test.tsx(8): the roles above on skills, the skill detail, the memory fact page, Facts about you, the shortcuts and provider pages (and their back links' names), and the worktree picker; the picker's radios disabled while busy. All 8 fail on the base.features/breakpoints.test.ts(1): no unlistedsm:/md:infeatures/orcomponents/shell/, schedules excepted until feat(studio): complete schedule management workspace #2194. Fails on the base.e2e/phone-overflow.spec.ts(24, mobile project): no sideways scroll at 320, 360, and 390px on the chat draft, a chat with a transcript, settings, skills, schedules, memory, and shortcuts, plus the Skills list at 499 and 500px. The check covers the document and every scroll region that isn't an intentional horizontal scroller (classes withoverflow-autooroverflow-x-auto, such as code blocks and tables). The chat draft fails on the base at 320px (746px of content in a 320px column). Schedules at 320px istest.fixme, owned by feat(studio): complete schedule management workspace #2194.e2e/chat-header-stop.spec.ts, one new test (both projects): a running chat's header content fits, and Stop ends inside the header, at 500, 560, 639, 640, 760, 820, and 900px. Fails on the base at 760px. The file's three existing tests are unchanged.Modified tests (selector only, assertions unchanged)
chat/session-inspection.test.tsx(4 assertions) andchat/session-surfaces.pinning.test.tsx(1):toHaveProperty("checked", X)→getAttribute("aria-checked")is"X". A Radix radio is abuttonwitharia-checked; same element, same expected state.knowledge/knowledge-workspace.test.tsx(1): the pill querybutton[aria-pressed]→button[aria-checked]; it still expects exactly["All"].learning/learning-queue.test.tsx(4) andlearning/learning-settings-page.pinning.test.tsx(3):getByRole("button", { name: <filter> })→getByRole("radio", …), andaria-pressed→aria-checked. This includesqueryByRole(…, { name: "Pending" })beingnullwhen learning is off. Moving it toradiokeeps that assertion meaningful: left onbutton, it would pass vacuously.Gate counts
Both through the shared gate lock. Base is
04e7f6f70(#2255's head; its counts are that PR's own head run); this branch is3ad5a1093.04e7f6f70)3ad5a1093)task studio:browser)The 18 new web tests are the 9 pins, the 8 live-region tests, and the guard. The 24 new browser tests are 22 phone-width and pivot tests and the header test on both projects. The 24 skipped are the phone-width tests in the desktop project (they run in the mobile project) plus schedules at 320px (
fixme).No docs change: no user-docs page describes these controls' semantics or the breakpoints, and the chat and settings behaviour the docs describe is unchanged.
Screenshots
Captured with a throwaway Playwright journey (Chromium, not committed) and offline BFF routes: the prototype harness's flaky-scheduler chat, a running chat, four skills, two learning suggestions, three memory facts, and a three-worktree picker. The clock is fixed at 2026-09-25 12:30 UTC, the time zone is
Europe/Rome, and the locale is en-US. Shots are desktop 1280×800 and mobile 390×844, light and dark, plus the header at 760×800 and the phone sheets at 320 and 390px.Before is the base (
04e7f6f70) and after is this branch's head (3ad5a1093). Each tree was captured twice: the runs matched within at most 40 antialiased pixels (a channel difference of 1 or 2). Red boxes mark before and after differences. The Prototype column comes from the prototype harness (stack-08): the gallery, plus new captures of the 320px draft and a running chat at 760px. Desktop composites are downscaled to 1600px wide.Surfaces that changed
Chat draft
Intended change: the empty state spans the column, the Continue chip truncates its title, and the empty column drops the minimap gutter, so the greeting and chips centre. On a phone, before, the Continue chip pushed the column sideways (cut off on the right, and the greeting off-centre). Matches the prototype's mobile empty state; the Continue chip is Studio's own and has no prototype counterpart. On desktop the greeting moves 12px right, to the column's centre, as in the prototype.
Dark and mobile
Desktop, dark:
Mobile, light:
Mobile, dark:
Worktree picker
Intended change: the native radios become the shadcn radio group (the shadcn ring with a filled dot, instead of the browser's radio). The cards, the selected card's border, and the actions are unchanged. Deviation: the prototype still uses native radios here; Studio follows #2201.
Dark and mobile
Desktop, dark:
Mobile, light:
Mobile, dark:
Running chat header beside the chat list (760px)
Intended change: the header's Activity and Canvas labels follow the header's width. At 760px the chat list sits beside the chat and the header is 480px wide: before, the labels pushed Stop out of the header (clipped on the right); after, the buttons are icon-only and Stop fits. The chat title was already truncated to nothing at this width on both trees, and the "Esc to Stop" hint wraps to two lines; both are pre-existing and out of scope. Prototype: its header has no Activity or Canvas buttons and puts Stop in the composer, so it's a reference only.
Dark
No sideways scroll at 320 and 390px
The chat draft at 320px and 390px, Before | After | Prototype. Before scrolls sideways (the shot is scrolled fully right, so the overflow shows); after fits. Matches the prototype.
390px
After only: every surface the new browser test covers, at 320px and 390px, each scrolled fully right. Only Scheduled at 320px overflows (its title and Schedule task share one row); that page belongs to #2194, and the fix is listed below.
320px and 390px sheets
Surfaces with no visible change
These pixel-compare equal to the base (any difference is within the run-to-run noise of at most a few antialiased pixels). Each was touched by the sweep: roles, hidden glyphs, or a primitive drawn to the same look.
Skills
The All / Learned switch is now a toggle group: identical pixels. Matches the prototype's pills.
Settings → Learning
The status filter is now a toggle group: identical pixels. Matches the prototype's pills.
Skill detail
Its loading, failure, and missing states gain roles; the loaded page is unchanged. Matches the prototype's layout as before.
Memory
Facts about you's off and empty notes gain a status role; unchanged.
Memory fact
Loading and failure states gain roles; unchanged.
Keyboard shortcuts
The back link's arrow is hidden from screen readers (the link reads "Settings"); unchanged. The two
sm:grid-cols-2grids stay, as in the prototype. These screenshots predate the restack onto main, which adds main's Scheduled card after Chats.Provider page
The back link's arrow is hidden from screen readers; the page's
sm:pivots move to 500px, which changes nothing at 390 or 1280px; unchanged.Search
The search field's spinner gets a screen-reader label, and the hint and font pivots move to 500px; the dialog is unchanged. On desktop the backdrop is the chat draft, whose greeting moved (see above).
For #2194 (schedules)
This PR doesn't touch
apps/web/src/features/schedules/*. Against this stack's base, the sweep would change the following there; line numbers are from04e7f6f70. The new browser test already covers/workspace/schedules, and its 320px case istest.fixmeuntil the header fix lands. Once the files below are swept, dropfeatures/schedules/frompendinginfeatures/breakpoints.test.ts.schedules-workspace.tsx:118,flex items-center justify-between gap-4) keeps the title block and Schedule task on one row, and the button's right edge reaches 359px. Do what the prototype does: a short New label below 500px (create-schedule-dialog.tsx:38–39:max-[499px]:hidden/min-[500px]:hidden), or let the row wrap (flex-wrap, withmin-w-0on the title block). Then remove thependingentry for schedules ine2e/phone-overflow.spec.ts.schedules-workspace.tsx:250:sm:p-5×2 →min-[500px]:p-5.schedules-workspace.tsx:254:sm:flex-row sm:items-start→min-[500px]:flex-row min-[500px]:items-start.schedule-detail.tsx:111: the same pair →min-[500px]:.schedule-form.tsx:211:sm:grid-cols-2→min-[500px]:grid-cols-2.schedule-detail.tsx:161:sm:grid-cols-2can stay. The prototype's detail grid usessm:grid-cols-2(schedule-detail.tsx:272); list it inallowedin the guard test.EmptyState(schedules-workspace.tsx:374):role="status", orrole="alert"for the error case at line 140 (add anerrorprop).DetailState(schedule-detail.tsx:489): the same, withalertfor line 90.ScheduleHistory(schedules-workspace.tsx:340–345):role="status"on "Reading run history…" and "This task has not run yet.",role="alert"on the error line.HistoryState(schedule-detail.tsx):alertwhendestructive, otherwisestatus.schedules-workspace.tsx:134):role="alert".aria-hidden="true":schedules-workspace.tsx:Plus(127, 392),Play/Pause(292, 301),Trash2(314),History(323),ChevronDown(325), andCalendarClock(386; or hide its wrapping span, asknowledge/state-card.tsxnow does);schedule-detail.tsx:ArrowLeft(106),Play/Pause(130, 139),Trash2(152),Clock3(218), andChevronUp/ChevronDown(380, 382).schedules-workspace.tsx:155–164) is a hand-rolled segmented control with no selected state at all. UseToggleGroup type="single"like the Skills and Learning pills: copyPILL_CLASSfromknowledge/knowledge-workspace.tsx, and ignore the empty value a second click sends.schedule-form.tsx: the two native checkboxes (256, 280) →Checkbox; the six native<select>(285, 300, 417, 442, 460, 498) →Select; the native<label>s →Label.Anything for the coordinator
max-[499px]1px gap (see Differences), in Studio and in the prototype.Review fixes
Fixes from the final regression and security review of the stack (stack #2227). Each one comes with a test that fails without the fix.
radio(selector-only; the assertions are unchanged).e6c848f0fe2e/chat-header-stop.spec.ts: passes on both projects. Swapping the chip's@max-[52rem]/chat-header:for a viewportmax-[52rem]:fails it (the header overflows at 840px).sm,md,max-smormax-md(sodark:sm:,[&>svg]:md:andmax-sm:are caught; container queries such as@max-md:pass). The guard scans all ofsrcexceptcomponents/ui. The scan finds no new classes.51b955d98breakpoints.test.ts: new matcher and scope cases fail on the old regex and scope. A probedark:max-sm:hiddeninlib/fails the guard.formatRelativeTime("1d ago"), like the prototype. The exact time is the stamp'stitle.133033bf0knowledge-workspace.test.tsx"dates learned skills and their changes relatively…"Gates at
d01c03fe4:3ad5a1093)No assertion was removed. The guard's loop moved into
scanned()andbreakpointClasses()helpers so the new cases can test them; the allow-list is unchanged.Screenshots
Before
3ad5a1093| Afterd01c03fe4| Prototypestack-08. The header test and the guard change nothing visible.Learned skills. After matches the prototype's relative stamps. On a phone, the skill names are no longer truncated.
More screenshots
Re-verification (2026-10-11)
bc7a5849c) Test:e2e/chat-header-stop.spec.ts"the Activity and Canvas labels show from 640px without the chat list, as before" (fails without the fix at 640px); the fit journeys, including the 832–900px sweep, still pass.39965ac0c)At 660px, before and after the fix (the images are labelled with the pre-restack hashes):
Dark
Gates on the restacked head
39965ac0c:studio:checkpasses (web 1,404, server 210 tests). At the stack top (#2256):studio:browser118 passed, 30 skipped; themecated --mockintegration suite 8 passed. The browser suite takes 5.3 minutes on a CI runner.Commit hashes cited earlier in this body predate the restacks; the current commits keep the same subjects. Hashes in Review fixes are updated.
Closes #2208
🤖 Generated with Claude Code