From 12b8eb11fda7ea056eedfcc5f2955f529a1958d0 Mon Sep 17 00:00:00 2001 From: Cliff Hall Date: Mon, 15 Jun 2026 19:48:11 -0400 Subject: [PATCH] feat: root validate chains CLI/TUI/launcher build + test (#1485) (#1495) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- AGENTS.md | 2 +- package.json | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 13a72797..d09dcc5f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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 diff --git a/package.json b/package.json index f2114a5c..b973fafa 100644 --- a/package.json +++ b/package.json @@ -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",