Coatcheck
Coatcheck is a component workbench contract and semantic browser-test runner for Topcoat.
The library models stories, typed props, controls, scenes, manifests, and
isolated frames. The installable coatcheck binary turns a host manifest into
explicit Playwright and Axe tests. It produces screenshots for review, but it
does not store or compare pixel baselines.
Install
After the 0.2 release is available from crates.io:
From a local checkout:
The crate package includes Cargo.lock and every runtime scaffold template,
so the locked install does not depend on repository-only files.
Start a project
From the project that hosts the Topcoat workbench:
init writes:
Coatcheck.toml;- a private
package.jsonwhen the project does not already have one; coatcheck/example.spec.ts;- a
.coatcheck/ignore entry; - exact project-local
@playwright/testand@axe-core/playwrightdevelopment dependencies; - Playwright Chromium.
It does not replace an existing JavaScript package manifest. Use
--skip-install when scaffolding offline.
Configure the host
= 1
= "Cold Front"
[]
= ["topcoat", "dev"]
= "http://127.0.0.1:3000"
= "/health"
= "/__coatcheck/manifest.json"
= 30
[]
= ["coatcheck/**/*.spec.ts"]
= ".coatcheck/artifacts"
= 30000
= ["serious", "critical"]
host.command is an argument array and is executed directly, without a shell.
The generated configuration uses topcoat dev so asset bundles and live reload
behave exactly as they do during application development.
This keeps quoting deterministic and makes the process boundary explicit.
Commands
doctorvalidates configuration, Bun, project-local Playwright and Axe, Chromium, and reports whether the host is reachable.doctor --fixinstalls or repairs the JavaScript dependencies and Chromium.devrunshost.commandin the foreground.teststarts the host, waits for health, fetches the manifest, generates explicit tests under.coatcheck/generated, runs generated and custom specs, and stops the host.test --no-hostuses an already-running host.
The generated semantic gate checks navigation, frame root/readiness/error markers, uncaught page and console errors, and the configured Axe impacts. Each case writes a PNG, DOM, Axe JSON, and console JSON. Playwright also writes HTML, JSON, and failure traces. See the runner contract.
Host API
Versioned JSON and frame types are additive to the 0.1 static catalog:
use ;
The default host endpoints are:
GET /__coatcheck/manifest.json
GET /__coatcheck/frame?story=<story-id>&scene=<scene-id>
The manifest owns the actual frame path, query names, and DOM selectors. Detailed producer/consumer requirements are in the host contract.
Static catalog API
The allocation-free 0.1 API remains available:
use ;
const LABEL: ArgType = ArgType ;
const STORIES: & = &;
const CATALOG: Catalog = new;
assert!;
Repository navigation
Every tracked, human-maintained folder is linked here:
.github/— automation documentation..github/workflows/— CI and locked-install smoke checks.docs/— host and runner coordination contracts.src/— library contracts, config, generation, and CLI.templates/— files embedded in the installable binary.tests/— process-level CLI integration tests.
Status
Coatcheck is experimental and tracks Topcoat’s early-stage development. Manifest and frame versions are explicit so future schemas can be added without changing the 0.1 static story model.
License
MIT