Repository navigation
feat(studio): converge card, table, tooltip, and input with the prototype - #2226
Merged
Merged
Conversation
14 tasks
peppescg
force-pushed
the
feat/studio-foundation-2204b
branch
from
October 9, 2026 09:50
99c9b20 to
60af5fd
Compare
peppescg
added a commit
that referenced
this pull request
Oct 9, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This was referenced Oct 9, 2026
Port the prototype's card: every part carries a data-slot, CardAction joins the exports, and CardHeader becomes the @container/card-header grid that opens a right-hand action column when a CardAction is present. A bordered header or footer pads itself away from the body. Studio's card surface tokens are unchanged. No Studio surface renders Card today, so nothing on screen changes. Refs #2204 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Before the skills table moves onto the prototype's sortable head, pin what a user sees: name ascending by default with case-insensitive numeric collation, a header click flipping the active column and starting another column ascending, the direction-independent name tiebreak, Enter and Space on the header buttons, aria-sort on both columns, the phone list keeping plain name order, and sorting what the filter leaves. The test drives only the rendered table, so it runs unchanged against the current SortableHead and its replacement. Refs #2204 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Port the prototype's table: Table takes a containerClassName for its scroll wrapper, heads and cells use the prototype's px-4 / py-3 padding, and NestedTableRow, NestedTableRowTrigger, and CollapsibleTableRows add expandable sub-rows driven by ChevronIndicator. TableRow drops the stock has-aria-expanded highlight, as the prototype does. Retire components/ui/sortable-head.tsx for the prototype's components/sortable-head.tsx: useTableSort owns the column and direction, directed() applies the direction to a comparison, and SortableHead takes the sort state and its column key. Studio keeps aria-sort on the header cell, which the prototype lacks. The configured-skills table moves onto useTableSort and drops the padding overrides the new defaults now supply; skill-inventory sorts through directed(). Sorting behaves as before. The one visible change is the inactive sortable column: its label now reads in the foreground colour with a muted icon, instead of a muted label. Refs #2204 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Port the prototype's tooltip. Each Tooltip now carries its own TooltipProvider, so a tooltip works without an app-level provider and opens without delay (delayDuration 0, was 200 ms). The parts carry data-slot, TooltipContent sits flush to its trigger with a rounded square arrow, and Tooltip gains onlyWhenTruncated: backed by useIsTruncated, it opens only while the trigger's text overflows. Studio's workspace-level TooltipProvider stays and still type-checks, but the per-Tooltip provider now decides the delay. Replace the native title= on the three chat labels that ellipsise text with Tooltip onlyWhenTruncated: a diff's file path (Edit and Write blocks), the streaming reasoning preview, and an attached image's file name. The full text stays in the label, so screen readers read it as before; a sighted user now sees it in a styled tooltip, and only when it is cut off. Other title= attributes are disabled-reason hints, resize-handle hints, or labels that never truncate, and stay as they are. Refs #2204 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
#2211 replaced the input with the prototype's verbatim, which brought the prototype's aria-invalid, file:, and selection: states but also swapped Studio's border-control-border and solid ring-2 ring-ring focus ring for the prototype's border-input and translucent 3px ring. Those fall below 3:1 non-text contrast, which #1873 had fixed. Keep the prototype's states and restore Studio's border and focus ring. An invalid field focuses with a solid destructive ring rather than the prototype's translucent one, for the same reason. Inputs look as they did before #2211: a darker border at rest and a solid ring on focus. Refs #2204 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Declare the prototype's thinking-bounce keyframe in styles.css and move the streaming indicator's dots onto it through animate-[thinking-bounce_0.9s_infinite], replacing the identical keyframe the component declared in an inline <style>. The dots bounce exactly as before. Studio already paints html and body with --shell-gradient-end, which is the prototype's iOS standalone fix; it gains the prototype's comment explaining why. hide-scrollbar is not taken: its only prototype consumer is the composer's pill toolbar, which Studio does not have yet. Tokens, palettes, the appearance store, storage keys, the boot script, and the 16px root font size are unchanged. Refs #2204 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
#2222 added the memory Facts about you table on the retired ui/sortable-head. It now uses useTableSort and SortableHead from components/sortable-head, like the skills table. A new test pins the existing behaviour, and it passes on both the old and the new head: name ascending by default, a new column starts ascending, the active column flips, the name tie-break stays ascending, and aria-sort on each header. Refs #2204 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
kantord
force-pushed
the
feat/studio-foundation-2204b
branch
from
October 13, 2026 08:42
60af5fd to
780bba9
Compare
kantord
approved these changes
Oct 13, 2026
kantord
added a commit
that referenced
this pull request
Oct 13, 2026
#2226 replaced components/ui/sortable-head with the prototype's components/sortable-head (useTableSort, SortableHead). Move the inventory and run-history tables to it: the inventory uses useTableSort, the run history keeps its newest-first local state, and cells and heads drop their explicit padding now that it is the table default. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Merged
2 tasks
41 tasks done
Member
|
Post-merge review follow-ups for this PR. No blockers or regressions found. Items worth tracking were filed here:
Other candidate findings were checked and dropped as not worth tracking. Fully or partially written by an AI agent. |
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.
Summary
This is the second slice of the Studio alignment foundation (#2204, part of #2210). It is stacked on #2225 and should merge after it. It brings the
card,table,tooltip, andinputprimitives in line with the prototype. It also retires Studio's ownui/sortable-headin favour of the prototype's sort hook, and takes the onestyles.csscherry-pick that has a consumer. Behaviour stays the same. The visible changes are listed below and backed by before/after screenshots.What changed
carddata-slot, andCardActionis exported.CardHeaderis the prototype's@container/card-headergrid. It opens a right-hand action column when aCardActionis present.Cardyet, so nothing on screen changes.tableand the sortable headTabletakes acontainerClassNamefor its scroll wrapper.px-4/py-3padding.NestedTableRow,NestedTableRowTrigger, andCollapsibleTableRowsadd expandable sub-rows, driven byChevronIndicatorfrom feat(studio): add the @/ alias and port the prototype's foundation primitives and utilities #2225.TableRowdrops the stockhas-aria-expanded:bg-muted/50, as the prototype does.components/ui/sortable-head.tsxand its test are removed. The prototype'scomponents/sortable-head.tsxreplaces them:useTableSortowns the sorted column and its direction.directed()applies the direction to a comparison.SortableHeadtakes the sort state and its column key.useTableSort, andskill-inventorysorts throughdirected(). The table's explicitpx-4/py-3overrides are dropped because the new defaults supply the same padding.useTableSort/SortableHead(99c9b20cb).tooltipEach
Tooltipcarries its ownTooltipProvider, so it works without an app-level provider.delayDurationdefaults to0; it was 200 ms.The parts carry
data-slot.TooltipContentsits flush to its trigger (sideOffset0, was 4) and has the prototype's rounded-square arrow.Tooltip onlyWhenTruncated, backed byuse-is-truncatedfrom feat(studio): add the @/ alias and port the prototype's foundation primitives and utilities #2225, opens only while the trigger's text overflows.Studio's workspace-level
TooltipProviderstays and still type-checks, but the per-Tooltipprovider now sets the delay.Native
title=attributes are replaced withTooltip onlyWhenTruncatedon three chat labels that truncate text:features/chat/edit-diff.tsxfeatures/chat/reasoning-disclosure.tsxfeatures/chat/chat-composer.tsxThe full text stays in the label, so screen readers read it as before. The tooltip content is capped at
min(32rem, 100vw - 2rem)and wraps.The other
title=attributes infeatures/stay. They are disabled-action reasons (session sidebar, chat header, learning review, memory consolidation), resize-handle and button hints, the token-usage breakdown, the minimap marker label, and the model card'stitle={model.id}, whose ID is already shown in full. None of them is a truncated label.input#2211 replaced the input with the prototype's verbatim. That brought in the
aria-invalid:,file:, andselection:states, but it also replaced Studio's contrast-hardened edges (from #1873) with the prototype'sborder-inputand translucent 3px ring. Both fall below 3:1 non-text contrast.This PR keeps the prototype's states and restores
border-control-borderand the solidfocus-visible:ring-2 focus-visible:ring-ring. An invalid field focuses with a solid destructive ring instead of the prototype's translucent one.styles.csscherry-picksthinking-bouncekeyframe: taken. The streaming indicator's dots now useanimate-[thinking-bounce_0.9s_infinite]instead of the identical keyframe the component declared in an inline<style>.html, bodyare painted with--shell-gradient-end. The rule now carries the prototype's comment explaining why.hide-scrollbar: not taken. Its only consumer in the prototype is the composer's pill toolbar, which Studio does not have yet.Tokens, palettes, the appearance store, storage keys, the boot script, and the 16px root font size are unchanged. No dependencies changed.
Differences from the prototype
components/ui/card.tsx,table.tsx,tooltip.tsxcomponents/sortable-head.tsxSortableHeadalso setsaria-sort(ascending,descending, ornone) on its header cell. The prototype's has none. Studio's retired head had it, and its tests assert it.components/ui/input.tsxborder-control-borderinstead ofborder-input.focus-visible:ring-2 focus-visible:ring-ringinstead ofring-[3px] ring-ring/50.aria-invalid:ring-destructiveinstead of/20with a dark/40. Plus a comment saying why.styles.cssmargin: 0onhtml, body.features/chat/streaming-indicator.tsxphaseLabelprop. The prototype derives the phase and start time from the message, which belongs to the chat feature port.Visible changes
Inputgets a darker border and a solid focus ring. The border was--input(lighthsl(240 5.9% 90%), darkhsl(0 0% 20.4%)) and is now--control-border(#83838a/#8c8c8c). The focus ring was a translucent 3px ring and is now a solid 2px--ring. Inputs now matchTextareaand look as they did before feat(studio): add shadcn primitives from the prototype and upstream shadcn #2211. Affected surfaces: the Skills filter, Settings → Profile display name, Settings → Agent name, the schedule form's text, time, and number fields, and the chat rename field.text-muted-foreground/60. Desktop only, because the phone list has no headers.Nothing else changes on screen. The card and table padding changes have no rendered call site that differs, and the streaming dots compute the same animation (
0.9s infinite, delays0ms/160ms/320ms). Only the keyframe name changes, fromstreaming-indicator-bouncetothinking-bounce.For #2194 (schedules) once this lands
#2194 imports the retired
components/ui/sortable-head. It needs these changes:features/schedules/schedules-workspace.tsx:SortableHead,useTableSort, andtype TableSortfrom@/components/sortable-head.useState<{ direction; key }>({ direction: "asc", key: "status" })andchangeSortpair withconst sort = useTableSort<ScheduleInventoryOrder>("status"). The toggle semantics are identical: the active column flips, and a new column starts ascending.sort.keyandsort.dirtoderiveScheduleInventory.sort/onSortprops withsort: TableSort<ScheduleInventoryOrder>. Each<SortableHead direction label onSort>becomes<SortableHead label sort={sort} sortKey="…">.px-4/px-4 py-3overrides on heads and cells are now the defaults and can go.DropdownMenu.TableRowno longer highlights a row while its menu is open (has-aria-expanded:bg-muted/50is gone), so add that class to those rows to keep the highlight.features/schedules/schedule-detail.tsx: run history switches to the Ran column descending, and to other columns ascending.useTableSortalways starts a new column ascending. To keep the current behaviour exactly, keep the local state and passsort={{ dir: direction, key: sortKey, toggle: changeSort }}, becauseTableSortis a plain interface. RenameSortDirectiontoSortDir.features/schedules/schedule-inventory.ts: changeimport type { SortDirection } from "../../components/ui/sortable-head"toimport type { SortDir } from "@/components/sortable-head".directed()can replace the localsignif wanted.aria-sortand the header button names (the column labels) are unchanged, so tests that select by them keep working. The inactive header label colour change applies to the schedules tables too.No regression
Gates, compared with #2225's baseline
Both branches are on
origin/mainaa1979c1d, which includes #2222.db98c3768)task studio:check: Biometask studio:check: typechecktask studio:check: server teststask studio:check: web teststask studio:check: generated-artifact checktask studio:browserWeb tests gain 8 files and 35 tests, and lose 1 file and 2 tests: the retired
ui/sortable-head.test.tsx, whose assertions move with the component. TheError: socket hang upline in the web test output is pre-existing; it appears on the slice-a tip too.Pinned behaviour
features/knowledge/knowledge-workspace.sort.test.tsx(new, 5 tests). It was committed before the swap, in its own commit, and passes against both the oldui/sortable-headand the newuseTableSort. It drives only the rendered table and pins:aria-sorton both columns;localeComparename order whatever the table sort;The A/B run, with the old sort code checked out: 4 files / 18 tests passed. With HEAD: 4 files / 23 tests passed. Both runs cover the pinned test,
knowledge-workspace.test.tsx,skill-inventory.test.ts, and the sortable-head test.components/sortable-head.test.tsxcarries over the retiredui/sortable-head.test.tsx. Both of its assertions survive with only the props adapted to the new API:aria-sortisnone,ascending, ordescendingfor an inactive, ascending, or descending column;toggle("name")instead ofonSort().features/chat/truncated-text-tooltips.test.tsx(new, 4 tests). For each converted label (Edit diff, Write diff, reasoning preview, image name), it checks that:The composer's Preview and Remove buttons keep their accessible names.
components/ui/tooltip.test.tsxcovers a tooltip without a provider, a tooltip inside Studio's app-level provider, the controlledopenprop, andonlyWhenTruncatedopening and closing as the trigger overflows.features/chat/streaming-indicator.test.tsxpins three dots onthinking-bouncewith 0/160/320 ms delays, the keyframe's 5px hop instyles.css, the phase label, and the elapsed-time counter.No existing test was modified or weakened.
knowledge-workspace.test.tsxandskill-inventory.test.tsare unchanged and pass. The only removed test file isui/sortable-head.test.tsx, described above.Facts about you (memory), added after the rebase onto #2222
facts-about-you.test.tsxgains a test that pins the existing sort: name ascending by default; a new column starts ascending; the active column flips; equal descriptions fall back to name ascending in both directions;aria-sorton each header. It passed 7/7 on #2225's head (oldui/sortable-head) before the migration, and passes on this branch.The Facts about you screenshots below show row order and content pixel-identical in every sort state. The only difference is the inactive header label's colour (muted → foreground), the same intended change as the skills table. The mobile pairs, where the header is hidden, are pixel-identical.
Screenshots
Captured with a throwaway Playwright journey (Chromium, not committed) that reuses
e2e/fixtures.tswith offline BFF routes. Each surface was shot at desktop 1280×800 and mobile 390×844, in light and dark; hover and header states are desktop only, because the phone layouts have no table headers or hover. Before is #2225's head (db98c3768), after is this PR's head (60af5fd63). Every pair was pixel-compared; red boxes mark the regions that differ. Desktop composites are downscaled to 1600px wide. A browser's nativetitletooltip is not part of a page screenshot, so the before side of each truncated-label hover shows no tooltip. No Studio form setsaria-invalidon anInput, so that state has no rendered surface to capture.Skills table (
SortableHead,useTableSort)Skills, default sort
Intended change: the Filter input's border is darker, and on desktop the inactive Description header reads in the foreground colour with a lighter both-ways icon. Rows are identical.
Dark and mobile
Desktop, dark:
Mobile, light:
Mobile, dark:
Description clicked (ascending)
Intended change: the inactive Name header reads in the foreground colour, and the Filter border is darker. Row order is identical.
Dark
Desktop, dark:
Description clicked again (descending)
Intended change: as above. Row order is identical.
Dark
Desktop, dark:
Header hover (Description)
Intended change: while hovered, the inactive column's both-ways icon stays muted. The boxed line at the top is the Filter input's bottom edge, whose border is darker.
Dark
Desktop, dark:
Settings → Memory, Facts about you (
SortableHead)Default sort (Name ascending)
Intended change: the inactive Remembers header reads in the foreground colour. Rows are identical. Mobile has no header, so it is identical.
Dark and mobile
Desktop, dark:
Mobile, light:
Mobile, dark:
Remembers ascending
Intended change: the inactive Name header colour. Row order is identical.
Dark
Desktop, dark:
Remembers descending
Intended change: the inactive Name header colour. Row order is identical.
Dark
Desktop, dark:
Header hover (Name)
Intended change: while hovered, the inactive column's both-ways icon stays muted.
Dark
Desktop, dark:
Inputs (
border-control-border, solid focus ring)Skills Filter, focused
Intended change: a solid 2px ring replaces the translucent 3px ring.
Dark and mobile
Desktop, dark:
Mobile, light:
Mobile, dark:
Settings → Profile, display name
Intended change: the field border is darker.
Dark and mobile
Desktop, dark:
Mobile, light:
Mobile, dark:
Settings → Profile, display name focused
Intended change: the solid 2px focus ring.
Dark and mobile
Desktop, dark:
Mobile, light:
Mobile, dark:
Settings → Agent, agent name
Intended change: the field border is darker.
Dark and mobile
Desktop, dark:
Mobile, light:
Mobile, dark:
Schedule task form
Intended change: the text, time and number field borders are darker, and the focused Name field has the solid ring. The textarea and select are unchanged.
Dark and mobile
Desktop, dark:
Mobile, light:
Mobile, dark:
Chat rename field, focused
Intended change: the darker border and solid focus ring.
Dark
Desktop, dark:
Tooltips
Top-nav tooltip (Chats)
Intended change: the tooltip sits 4px closer to the icon and has the prototype's rounded-square arrow.
Dark
Desktop, dark:
Truncated diff path, hovered
Intended change: the styled tooltip shows the full path.
Dark
Desktop, dark:
Truncated reasoning preview, hovered
Intended change: the styled tooltip shows the full reasoning line.
Dark
Desktop, dark:
Truncated image name, hovered
Intended change: the styled tooltip shows the full file name.
Dark
Desktop, dark:
Unchanged chat surfaces and streaming dots (
thinking-bounce)Streaming run, thinking dots
Identical on desktop. The dots compute the same animation on both trees (
0.9s infinite), only the keyframe name changes. Mobile differs by 113–153 px of at most 2/255 per channel on the composer bar's rounded corners, which is invisible.Dark and mobile
Desktop, dark:
Mobile, light:
Mobile, dark:
Edit diff in the transcript
Identical on desktop. Mobile has the same invisible corner anti-aliasing as above.
Dark and mobile
Desktop, dark:
Mobile, light:
Mobile, dark:
Transcript and composer
Identical.
Dark and mobile
Desktop, dark:
Mobile, light:
Mobile, dark:
Composer with an attached image
Identical.
Dark and mobile
Desktop, dark:
Mobile, light:
Mobile, dark:
Together with #2225 this completes #2204. The items the issue lists as deferred to the feature port that needs them stay open in #2210.
Re-verification (2026-10-11)
Re-verified at this head: no change needed. The app-level
TooltipProvidernit stays open (optional).Closes #2204
🤖 Generated with Claude Code