Skip to content

feat: the Pine app's interface pieces have stories, checked by Chromatic on every pull request - #16

Merged
abernier merged 4 commits into
nextfrom
claude/chromatic-ui-setup-bc8b3f
Nov 18, 2026
Merged

abernier merged 4 commits into
nextfrom
claude/chromatic-ui-setup-bc8b3f

Conversation

@abernier

Copy link
Copy Markdown
Contributor

Why: #3 starts changing the desktop renderer's primitives (desktop/src/ui.tsx). Visual diffs per component make each such PR reviewable.

What changes

  • Storybook (@storybook/react-vite, devDependencies of desktop/ only; nothing goes into the npm package). npm run storybook / npm run build-storybook in desktop/.
  • desktop/src/ui.stories.tsx: Icons, LogoMark, Working, Buttons, Switches, SegmentedControl, Fields, EmptyState, ConfirmButton, Dialogs (open).
  • Theme toolbar (System / Light / Dark): the app follows prefers-color-scheme, so the preview rewrites those media rules to force a theme.
  • .github/workflows/chromatic.yml: on pull requests and pushes to next, chromaui/action with onlyChanged and exitZeroOnChanges. Without the CHROMATIC_PROJECT_TOKEN secret it logs that it skipped and passes.
  • Docs: "Stories and Chromatic" in docs/references/desktop.md, a Commands row in AGENTS.md.

Checked: npm run build-storybook, npm run check in desktop/ and at the root.
Not checked: stories not yet viewed in a browser (theme toggle untested); the secret is not set yet.

🤖 Generated with Claude Code

abernier and others added 2 commits November 17, 2026 22:30
…tic on every pull request

Storybook in desktop/ with stories for the primitives of src/ui.tsx, in light and dark,
and a workflow that sends them to Chromatic on pull requests and pushes to next. Without
the CHROMATIC_PROJECT_TOKEN secret the job says so and passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rs were missing from the lock file

@napi-rs/wasm-runtime (pulled in by Storybook's tooling) has @emnapi/core and @emnapi/runtime
as peers; npm on macOS left them out of the lock file and npm ci on Linux refused it. They are
now named as devDependencies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@abernier
abernier added this pull request to stack #20 November 17, 2026 21:44
…s and docs pages

desktop/src/ui/<Component>.stories.tsx for each primitive of ui.tsx, with `component` set and
no `title`, so Storybook names them by path and derives controls and an autodocs page.
Stories are named by state (On, Off, Disabled...).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@abernier
abernier merged commit d9b5329 into next Nov 18, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant