Skip to content

bug(desktop): bare-Composer stories render collapsed — storybook preview misses --maka-reading-measure #5909

Open

Description

@me2seeks

Problem

Bare-Composer stories (e.g. composer-paste.stories.tsx, composer-slash-menu.stories.tsx, composer-skill-draft.stories.tsx, and the new composer-resume.stories.tsx) render the composer card collapsed to its minimum width in Storybook. The card's width derives from --maka-reading-measure, which is defined in apps/desktop/src/renderer/maka-tokens.css at the app root — but the Storybook preview (.storybook/preview.tsx) only loads src/renderer/styles.css, so the token is missing in the iframe and width: min(var(--maka-reading-measure), 100%) computes invalid and falls back to content width.

The stories' play functions pass because they assert on roles, not layout, so this is only a visual/fidelity gap: anyone opening one of these stories in Storybook (or screenshotting it for review evidence) sees a sliver of a card instead of the real composer.

Desired outcome

The Storybook preview loads the same token sheet the app loads, so bare-composer stories render the card at the app's reading measure. If loading all of maka-tokens.css into the preview has wider visual churn on existing stories, the preview can at least define --maka-reading-measure for the composer stories.

Alternatives or workarounds

  • Individual stories can inline the token on their wrapper (['--maka-reading-measure' as string]: '720px'). feat(desktop): offer turn resume from the composer send slot #5904's resume-offer story did exactly this and it was called out as a local patch — the fix belongs in the shared preview, not per story.
  • Do nothing: the stories are interaction harnesses, and the collapsed card still satisfies their play functions. The cost is misleading visuals for reviewers.

Activity

  1. added
    bug
    on Oct 1, 2026
  2. ggbdpq commented on Oct 1, 2026

    @ggbdpq
    Contributor

    take

  3. ggbdpq commented on Oct 1, 2026

    @ggbdpq
    Contributor

    Following up on the take: I dug into this against current main (57964425a) and the premise doesn't hold, so I'm not proceeding with a code change.

    • preview.tsx indeed only imports ../src/renderer/styles.css — but that sheet is the single bundled style entry, and line 33 of it is @import "./maka-tokens.css";. The renderer README documents styles.css as importing "Astryx, fonts, maka-tokens.css, and every styles/*.css".
    • The timeline is decisive: the ./maka-tokens.css import has been in styles.css since the initial scaffold (8fd91a43c, 2026-05-19), while --maka-reading-measure entered the token sheet in fix(desktop): give the chat surface one reading measure #3997 (d64923d1a, 2026-08-27). Every build made after the token existed has therefore shipped it into the Storybook iframe — a 2026-09-10 build of the same pipeline on my machine contained maka-reading-measure in the iframe CSS bundle.
    • The width rule itself is at styles/composer.css (.maka-composer-astryx, width: min(var(--maka-reading-measure), 100%)), and the token resolves to 800px at :root (maka-tokens.css:939), which is the preview iframe's documentElement.
    • The story anchors have drifted: composer-resume / the feat(desktop): offer turn resume from the composer send slot #5904 resume-offer story and its inline 720px wrapper are not in the current tree (feat(desktop): offer turn resume from the composer send slot #5904 is still open). composer-paste / composer-slash-menu / composer-skill-draft do exist, but their token supply is covered as above.

    My best guess for the collapsed rendering: a stale local storybook-static built before 2026-08-27 would produce exactly this. If it still reproduces on current main after a fresh build-storybook, could you share the base commit and a screenshot? Happy to dig further.

  4. ggbdpq commented on Oct 20, 2026

    @ggbdpq
    Contributor

    untake

  5. added a commit that references this issue on Oct 26, 2026
    fd57c3d
  6. github-actions commented on Nov 20, 2026

    @github-actions

    This issue has had no human activity for 30 days and has been marked stale. It will be closed in 30 days unless someone comments.

    If the issue is still current, please confirm it against the latest main and add any information that would help move it forward. Assigned issues and issues labelled pinned are exempt from this policy.

  7. added
    stale
    on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions