Skip to content

ui-kit: TurnErrorReview story renders ui-react without its stylesheet #3748

Closed

Description

@schlessera

Context

Conversation/TurnErrorReview (packages/ui-kit/stories/conversation/TurnErrorReview.stories.tsx:15-18) renders ui-react's TurnError and its copy/report dialog, but not inside ConsumerDocument (stories/conversation/_consumer-parity.tsx). That means ui-react's compiled stylesheet is never loaded, and none of the component's Tailwind utilities exist in the kit's Storybook. The kit's Tailwind build only scans ui-kit/src (packages/ui-kit/src/styles.css:5-6).

Result on main (57abb7b), at a 1024px viewport:

  • The dialog paints dimmed behind its own backdrop.
  • The "Exact outgoing text" textarea is a small, unstyled browser box.
  • The Copy button is clipped at the dialog's right edge.
  • The page runs to about 3700px tall, with a stray vertical rule.

The story's play function still passes, because it only checks roles.

Conversation/GroupedQuestionExchange (stories/conversation/GroupedQuestionExchange.stories.tsx) has the same defect. It renders ui-react's MessageBubble without the consumer stylesheet, so the turn header reads "BRAIN11:32 PM" with no spacing or type styling.

The other stories that render ui-react either use ConsumerDocument or inline ui-react/dist/styles.css, as SessionTheme and GraphUnavailable do.

Scope

  • Render TurnErrorReview with ui-react's consumer stylesheet, following the existing ConsumerDocument pattern.
  • Have their play functions assert that the consumer stylesheet owns the document, using painted() or an equivalent probe, so the defect cannot return silently.

Out of scope

Acceptance criteria

  • TurnErrorReview → Copy and Report render the dialog fully inside the viewport, with the textarea and Copy button styled as in the app. A bounds assertion on the dialog passes.
  • Each story's play function fails when the consumer stylesheet is removed. Proven by mutation.

Verification

Storybook Vitest project in both themes, plus screenshots before and after in the PR.

Contract impact

None.


2026-11-09: GroupedQuestionExchange moved to #3753. With the consumer stylesheet applied, its a11y gate fails on the turn time stamp's 2:1 contrast, which is #3730's defect. That gate cannot be silenced without a design-feedback entry. Its harness button is still restyled under #3752.

Activity

  1. added this to the 0.45.0 milestone on Nov 8, 2026
  2. added
    type: fix
    area: ui-kit
    priority: p2
    agent-ready
    on Nov 8, 2026
  3. self-assigned this
    on Nov 8, 2026
  4. schlessera commented on Nov 8, 2026

    @schlessera
    OwnerAuthor

    Claimed (claim-180872) together with #3748 and #3749, on branch fix/3748-consumer-story-styles. Both fix the consumer-parity story harness. No open PR references these issues.

  5. changed the title [-]ui-kit: TurnErrorReview and GroupedQuestionExchange stories render ui-react without its stylesheet[/-] [+]ui-kit: TurnErrorReview story renders ui-react without its stylesheet[/+] on Nov 9, 2026
  6. schlessera commented on Nov 9, 2026

    @schlessera
    OwnerAuthor

    Scope correction: GroupedQuestionExchange moved to #3753, blocked by #3730. Once the consumer stylesheet is applied, the story's unchanged a11y gate fails on the turn time stamp (2:1, #3730), and knownContrastGap needs a design-feedback entry. This issue now covers TurnErrorReview only.

  7. schlessera commented on Nov 9, 2026

    @schlessera
    OwnerAuthor

    Delivered in #3754 (squash 8aa5c6c). The squash tree a0c3d14 equals the candidate checkout tree from confirmation run 42539450106. TurnErrorReview now renders in ConsumerDocument at a stated chat-column width, and its plays assert consumerStyled() and the card and dialog bounds. GroupedQuestionExchange continues in #3753.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyarea: ui-kitpriority: p2type: fix

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions