feat: root validate chains CLI/TUI/launcher build + test (#1485) (#1495)

Root `npm run validate` previously delegated only to `clients/web`
(`format:check` + `lint` + `build` + `test:coverage`), so a contributor
running it before pushing could miss CLI/TUI/launcher breakage that CI
would later catch. There was no single local command mirroring CI.

Extend root `validate` to mirror the CI job end to end:
- `validate:web` — web format:check + lint + build + test:coverage
- `test:cli` / `test:tui` — CLI and TUI suites
- `validate:launcher` — build CLI + TUI + launcher, then the launcher
  `--help` smoke (`smoke:launcher`: --help, --cli --help, --tui --help)

The new sub-scripts can be run individually when iterating on one
client. Storybook stays out of `validate` (Playwright-dependent, slow),
consistent with the existing convention. Documented in AGENTS.md.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cliff Hall 2026-06-15 19:48:11 -04:00 • committed by GitHub
commit 12b8eb11fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -134,7 +134,7 @@ All work should be driven by items on the project board.
### Lint-fixed, Formatted code
- ALWAYS do `npm run format` before committing — it auto-fixes any Prettier issues. `validate` runs `format:check` (the non-fixing variant) and will fail in CI on any unformatted file, so always run the auto-fixer first rather than letting `format:check` catch it.
- ALWAYS do `npm run validate` before pushing any changes, this runs the various lint, build, format checks, etc.
- ALWAYS do `npm run validate` before pushing any changes — from the repo root it mirrors what CI enforces across every client: web `format:check` + `lint` + `build` + `test:coverage` (`validate:web`), then the CLI and TUI test suites (`test:cli` / `test:tui`), then a build of CLI + TUI + launcher and the launcher `--help` smoke (`validate:launcher`). The sub-scripts (`validate:web`, `validate:launcher`, `smoke:launcher`) can be run individually when iterating on one client. Storybook is the only CI step left out (see below).
- Also run `npm run test:storybook` before pushing — it executes every story's `play` function in headless Chromium via `@vitest/browser-playwright` (~10s). CI runs this as a separate step after the unit/lint/build checks; failures block merge. It is kept out of `validate` because it needs the Playwright browser binary and is much slower than the unit suite.
### Typescript instructions

View file

@ -37,7 +37,10 @@
"prepack": "npm run build",
"test:cli": "cd clients/cli && npm run test",
"test:tui": "cd clients/tui && npm run test",
"validate": "cd ./clients/web/ && npm run validate",
"validate": "npm run validate:web && npm run test:cli && npm run test:tui && npm run validate:launcher",
"validate:web": "cd clients/web && npm run validate",
"validate:launcher": "npm run build:cli && npm run build:tui && npm run build:launcher && npm run smoke:launcher",
"smoke:launcher": "node clients/launcher/build/index.js --help && node clients/launcher/build/index.js --cli --help && node clients/launcher/build/index.js --tui --help",
"test": "cd ./clients/web/ && npm run test && cd ../cli && npm run test && cd ../tui && npm run test",
"test:coverage": "cd ./clients/web/ && npm run test:coverage",
"test:storybook": "cd ./clients/web/ && npm run test:storybook",