From 6a69e392294393e779390479f012e52bf42389d2 Mon Sep 17 00:00:00 2001 From: Wynne Pirini Date: Tue, 3 Nov 2026 12:58:20 +1300 Subject: [PATCH] ci: run the visual smoke tests The suite in frontend (vitest browser mode, Chromium via Playwright) asserts computed styles for the shadcn components, which is what catches a bits-ui data-state that lost its @custom-variant remap: the logic works, the component renders unstyled, and neither svelte-check nor a build can see it. CLAUDE.md already requires running it after touching ui/**, app.css or the theme, but nothing enforced that, so it was a manual step that could be forgotten. It was in fact skipped for the recent dependency bumps. Runs after the frontend build so a broken build reports first, and installs the Chromium binary the config needs (the pnpm store does not carry it). --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d6bfc1e..1305c115 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,6 +92,19 @@ jobs: working-directory: frontend run: pnpm build + # The unit tests above the browser do not exist: this suite mounts components in + # a real Chromium and asserts COMPUTED STYLES, which is the only thing that + # catches a bits-ui data-state that lost its @custom-variant remap. Logic stays + # green while the component renders unstyled, so a type check and a build cannot + # see it. It needs the browser binary, which is not in the pnpm store. + - name: Install the browser for visual tests + working-directory: frontend + run: pnpm exec playwright install --with-deps chromium + + - name: Visual smoke tests (computed styles in a real browser) + working-directory: frontend + run: pnpm test:visual + - uses: actions/setup-go@v7 with: go-version-file: go.mod