Repository navigation
UI Consistency: 1 issue found
1 finding
apps/web/src/components/chat/MessagesTimeline.tsx(lines 1053-1059): the new queued-message "Cancel" action is a raw<button>styled asfont-medium text-destructive hover:underline, reconstructing theButtonprimitive's existinglinkvariant while losing the behavior the primitive owns —cursor-pointer(no global button cursor rule exists inindex.css), thefocus-visiblering, and thepointer-coarseminimum hit target. The row'sfocus-within:opacity-100reveal implies keyboard use, but the focused control has no visible focus indicator. Suggested fix posted inline: render viaButton variant="link" size="xs"and keep only contextual color/padding at the call site.
Details
Note
Your check run agent prompt is: .macroscope/check-run-agents/ui-consistency.md
More information about how Check Run Agents work can be found in our Help Center.
Scope reviewed (include patterns apps/web/src/**/*.{ts,tsx,css}):
apps/web/src/components/chat/MessagesTimeline.tsx— newonCancelQueuedMessageshared-state prop, queued-state badge, and conditionalopacity-100on the action row.apps/web/src/components/ChatView.tsx— newcancelQueuedTurnatom command andonCancelQueuedMessagecallback wiring.apps/web/src/components/chat/MessagesTimeline.test.tsx— new queued-state render test.
Checks performed:
- Compared the new control against
apps/web/src/components/ui/button.tsx: thelinkvariant (border-transparent underline-offset-4 [:hover,[data-pressed]]:underline) plus base classes already providecursor-pointer,focus-visible:ring-2 focus-visible:ring-ring, andpointer-coarse:after:min-h-11/min-w-11. - Confirmed no global
button { cursor: pointer }rule exists inapps/web/src/index.css, so the omission is a real interaction regression rather than a stylistic preference. - Confirmed sibling actions in the same row (
RevertUserMessageButton,MessageCopyButton) composeButton, so the raw element is inconsistent with the immediate call site, not just repository-wide convention.
Not flagged:
- Conditional
opacity-100merged throughcncorrectly supersedes the baseopacity-0and preserves the hover/focus reveal transition for non-queued rows. text-destructiveandtext-muted-foregroundtoken usage matches existing chat surfaces.- Mobile (
apps/mobile/**), server, and contracts changes were used only as context; they are outside this check's include patterns.
🔍 Agent activity — 1 tool call
💭 I'm noticing that MessagesTimeline.tsx is using a raw
<button>element for the Cancel action, but I should check if other buttons in that same row are using the Button primitive instead—if so, I'd want to keep the styling consistent. Checking whether a raw<button>element violates the component conventions here, since it's being used as a text link-style action in a message row—I should look at the Button primitive in the UI components to see if there's a link variant available. I'm checking the variant names in that section of the file to see what options are available, like ghost and link styles. I'm noticing a raw<button>element that mimics thelinkvariant styling with destructive text color and medium font weight, which matches the existing Button component's link variant exactly. This is a concrete finding since it recreates Button functionality without using the component, and it's missing the focus ring and other accessibility features that the variant provides. The button does have text content ("Cancel"), though an aria-label matching the mobile version's "Cancel queued message" would be clearer. More importantly, it's missing the cursor-pointer style and focus-visible ring that other raw buttons in the file explicitly add, and the parent container's focus-within opacity change suggests keyboard navigation is important here. The fix is straightforward: replace the raw button with the Button component using the link variant, destructive text color, and compact size, which automatically includes all the necessary accessibility and styling features. For the destructive text color, I need to verify thattext-destructiveis actually defined as a valid class in this codebase since I seetext-destructive-foregroundused elsewhere. Let me search for existing usage to confirm it's available. I'm noticing thatvariant="link"isn't actually used anywhere in the codebase, but there are similar text-link buttons in other files that include cursor-pointer and hover styling. The new button here follows that general pattern of raw text links, though it's missing the explicit cursor-pointer class that those other examples include, which is a bit inconsistent with the repo's standard for interactive elements. The raw Cancel button is missing the cursor pointer styling, focus-visible ring, and adequate hit target for coarse pointers that the Button component normally provides—this is a legitimate accessibility issue. The container's focus-within opacity change also suggests keyboard navigation should be considered here. I'm thinking the fix would be to useButtonwith a link variant and destructive text color, keeping it minimal to match the surrounding icon buttons in size. Let me check what size MessageCopyButton uses to ensure consistency. I should add an inline comment suggesting the Button component with a link variant and extra small size, and include an aria-label attribute with "Cancel queued message" for better accessibility — that covers both the styling and the missing accessible name that the mobile version has.
1. modify_pr — One consistency finding in the new web queued-message affordance in apps/web/src/components/chat/MessagesTimeline.tsx. See the inline comment.
Agent Credits: 90 credits