Skip to content

Visual testing 6/8: publish the report as a Storybook concern #716

Description

@nathanacurtis

Parent: #588 — step 6 of 8.

Problem

The visual report has a Storybook status page, and it is currently unmounted and unmountable.

It is mounted by three hand edits to a library's Storybook host config: a story glob, a static-directory entry, and a filesystem-allow addition. specs storybook init now scaffolds that file and --force rewrites it, so those three edits are edits waiting to be destroyed — and in practice the page has been unmounted ever since the host became generated. Reading results means opening a markdown file on disk.

Potential solution(s)

  • Publish the report as a generated page through the existing concern mechanism: a visualtesting concern registered alongside the others, detecting on whether the library has a report on disk and building the page when it does.
  • Separate sections for components and compositions, because their pass criteria differ — compositions are advisory, and one combined table hides that.
  • The page reads the report JSON over HTTP, so a re-diff updates it on reload with no republish.
  • The scaffolded host already reserves the mount point, serving a visual-testing baselines directory when one exists. That line is currently the only mention of visual testing anywhere in the CLI; this is what makes it mean something. It points at the previously reserved path and needs repointing at where the rest of this work writes.

Acceptance criteria

  • A library with a report gets the page with no edits to its Storybook host directory at all.
  • specs storybook init --force followed by a publish leaves the page working — the regression this step exists to prevent.
  • A library with no report does not get the page, and publish says nothing about it.
  • Re-running the diff and reloading shows new numbers without a republish.
  • Component and composition totals appear separately, with the composition section stating that its results are advisory.

Case data

  • Territory: cli
  • Size: m

Notes

Depends on step 5. Replaces the hand-wired page that lived in the test repo.

Activity

  1. self-assigned this
    on Oct 8, 2026
  2. added
    clispecs-cli commands
    testingspecs-testing parity validation
    docsDocumentation that appears on specsplugin.com
    on Oct 8, 2026
  3. nathanacurtis commented on Oct 8, 2026

    @nathanacurtis
    MemberAuthor

    Built and verified on feature/testing-visual in specs (commit 0198a8e), on top of feature/compositions-cli. Validation evidence is in the commit message; #718 carries the remaining fixture sweep and docs.

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

Metadata

Metadata

Assignees

Labels

clispecs-cli commandsdocsDocumentation that appears on specsplugin.comtestingspecs-testing parity validation

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions