Repository navigation
Description
Problem
The action row under user and assistant messages (copy / edit on the user side; regenerate / branch / copy / info on the assistant side) uses Astryx for the container and the button shell, but everything inside and around them is product-owned and drifts from the Astryx component contract and from DESIGN.md §7 ("no second icon system or parallel component path").
Verified against main (8b3655a17), all in packages/ui/src:
- Icons come from
lucide-react, not AstryxIcon.chat-turn.tsxrenders<RefreshCcw size={14}>,<GitBranch size={14}>,<Copy size={14}>,<Info size={14}>,<Pencil size={14}>,<Check size={14}>directly insideIconButton(chat-turn.tsx:976-981, chat-turn.tsx:197). Astryx'sIconalready has semantic names forcopy,check,infoandclock, sizes viasize="sm", and colour viacolor="secondary"; the remaining glyphs (regenerate, branch, edit) can be passed toIconas SVG components instead of bypassing it. The hand-picked 14px comes from a product-sideICON_SIZE.controlrung (icons.tsx) that exists because the lucide glyphs are not going throughIcon. - Product CSS overrides Astryx
IconButtongeometry and state colours. styles.css:885-898 resetsborder,border-radiusandcoloron.maka-turn-footer-action, then paints pending / copied / failed via customdata-pending,data-copy-feedbackattributes.DESIGN.md§10 says busy controls use the AstryxisLoadingprop, "no hand-swapped labels, icons, or disable-plus-spinner recreations"; the copy button does exactly that (swapsCopyforCheck, drives colour fromdata-copy-feedback). - User and assistant rows follow different reveal rules. User-side actions fade in per button on
.maka-user-message:hover(styles.css:212-219); the assistant side fades the whole.maka-turn-footeron.maka-assistant-answer:hover(styles.css:875-883). The user side also removes AstryxChatMessageMetadata's own separator positionally (.maka-message-meta > span + span { display: none }), which depends on Astryx's internal DOM order. infois a fake button. It is anIconButtonwhose click handler is a no-op and whose only content is a tooltip carrying "model · duration · cost" (chat-turn.tsx:920). A pressable control that does nothing is the wrong primitive for read-only metadata;ChatMessageMetadataalready hastimestampandfootertext slots for that.- Disabled is expressed as
aria-disabled+ opacity, notisDisabled. Footer actions keeparia-disabledand swallow the click in JS so the tooltip can still explain why; Astryx's disabled state and focus/hover treatment are therefore not applied.
Desired outcome
- Every glyph in the message action rows goes through Astryx
Icon(semantic name where one exists, SVG component otherwise), sized and coloured byIconprops, with no product-side pixel constant on these call sites. IconButtonkeeps its own border, radius, colour, hover, focus, disabled andisLoadingtreatment;styles.cssstops restyling.maka-turn-footer-action. Copy feedback uses the same mechanism as other Astryx buttons in the app.- User and assistant action rows share one reveal rule and one layout, and do not reach into Astryx DOM order to remove separators.
- Turn metadata is rendered as metadata text, not as a button with a tooltip.
- Light/dark before/after captures from the same Storybook stories in the PR, per the repo's visual-PR convention.
Non-goals: which actions exist and when they are enabled. That is a product-model question tracked separately (#5132).
Alternatives or workarounds
Keep lucide as the glyph source but route it through <Icon icon={RefreshCcw} size="sm" />. This is the smallest change that removes the pixel constant and the IconButton overrides; it still leaves two icon families visible side by side where an Astryx semantic name already exists (copy, check, info), so it should be a step, not the end state.
Activity
refactor(ui): derive the footer meta text inside TurnView
docs(astryx): refresh surface inventory for chat-turn Icon usage
fix(ui): render message action rows with Astryx Icon and IconButton (a…