Repository navigation
Description
Context
The Settings/Storage stories (packages/ui-kit/stories/conversation/StorageTheme.stories.tsx:46-66) take a width arg: 320 for Phone, 1280 for Desktop. Only the Vitest runner applies it. consumerViewport returns early outside the runner (stories/conversation/_consumer-parity.tsx:48). In the interactive Storybook, and in a static build, Phone therefore renders at whatever width the canvas has, which on a desktop browser is the desktop layout. Phone and Desktop look identical, and the phone version cannot be checked at phone width.
In the same interactive context, painted() (_consumer-parity.tsx:80-92) asserts the runner's viewport and reduced-motion media. So every Settings/Storage play function reports a failure ("expected false to be true") when the story is opened by hand.
The other consumer-parity stories that use the same width arg share the defect: AccountTheme, AnswerTheme, ApifyRunApproval, ApifySettings, ApifySpend, ArtifactTheme and JournalTheme.
Scope
- Make each consumer-parity story's declared width drive the Storybook viewport, through Storybook's built-in
viewportglobal with phone and desktop options matching the declared widths. A story's phone variant then opens at phone width in the interactive UI. - Keep
consumerViewport's exact runner resize authoritative in Vitest. - Make
painted()assert only what holds in the context it runs in, so opening a story by hand does not report a failure, while the runner keeps its exact checks.
Out of scope
- Changing the Storage tab's own responsive layout in
ui-react. - Adding new stories or widths.
Acceptance criteria
- Opening
Settings/Storage→Phonein Storybook renders a 320px-wide viewport with the phone layout.Desktoprenders at 1280px. - Every consumer-parity story with a
widtharg selects the matching viewport. A unit or story test fails if a story'swidthand its viewport global disagree. - Interactive Storybook reports no play failure for
Settings/Storagestories. The Vitest runner still asserts the exact viewport, media queries and consumer stylesheet.
Verification
Storybook Vitest project, plus a static build opened at a desktop viewport showing the phone story at 320px.
Contract impact
None.
Activity
schlessera commentedon Nov 8, 2026
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.schlessera commentedon Nov 9, 2026
Delivered in #3754 (squash
8aa5c6c). Consumer stories select a Storybook viewport that matches theirwidth(stories/_viewports.ts). The runner refuses a story whose width and viewport disagree, andpainted()no longer reports runner-only failures when a story is opened by hand. Verified in the manager UI: Storage Phone opens at 320 and Desktop at 1280.