story-kit: merge 243_bug_replace_pnpm_with_npm

This commit is contained in:
Dave
2026-03-14 18:09:58 +00:00
parent 3a430dfaa2
commit 3abea68f9e
12 changed files with 72 additions and 6658 deletions

View File

@@ -1,7 +1,7 @@
[[component]]
name = "frontend"
path = "frontend"
setup = ["pnpm install", "pnpm run build"]
setup = ["npm install", "npm run build"]
teardown = []
[[component]]
@@ -87,12 +87,12 @@ Read CLAUDE.md first, then .story_kit/README.md to understand the dev process.
- Run `git diff master...HEAD` to review the actual changes for obvious coding mistakes (unused imports, dead code, unhandled errors, hardcoded values)
- Run `cargo clippy --all-targets --all-features` and note any warnings
- If a `frontend/` directory exists:
- Run `pnpm run build` and note any TypeScript errors
- Run `npm run build` and note any TypeScript errors
- Run `npx @biomejs/biome check src/` and note any linting issues
### 2. Test Verification
- Run `cargo test` and verify all tests pass
- If `frontend/` exists: run `pnpm test --run` and verify all frontend tests pass
- If `frontend/` exists: run `npm test` and verify all frontend tests pass
- Review test quality: look for tests that are trivial or don't assert meaningful behavior
### 3. Manual Testing Support
@@ -118,7 +118,7 @@ Print your QA report to stdout before your process exits. The server will automa
### Test Verification
- cargo test: PASS/FAIL (N tests)
- pnpm test: PASS/FAIL/SKIP (N tests)
- npm test: PASS/FAIL/SKIP (N tests)
- Test quality issues: (list any trivial/weak tests, or "None")
### Manual Testing Plan
@@ -164,12 +164,12 @@ Read CLAUDE.md first, then .story_kit/README.md to understand the dev process.
- Run `git diff master...HEAD` to review the actual changes for obvious coding mistakes (unused imports, dead code, unhandled errors, hardcoded values)
- Run `cargo clippy --all-targets --all-features` and note any warnings
- If a `frontend/` directory exists:
- Run `pnpm run build` and note any TypeScript errors
- Run `npm run build` and note any TypeScript errors
- Run `npx @biomejs/biome check src/` and note any linting issues
### 2. Test Verification
- Run `cargo test` and verify all tests pass
- If `frontend/` exists: run `pnpm test --run` and verify all frontend tests pass
- If `frontend/` exists: run `npm test` and verify all frontend tests pass
- Review test quality: look for tests that are trivial or don't assert meaningful behavior
### 3. Manual Testing Support
@@ -195,7 +195,7 @@ Print your QA report to stdout before your process exits. The server will automa
### Test Verification
- cargo test: PASS/FAIL (N tests)
- pnpm test: PASS/FAIL/SKIP (N tests)
- npm test: PASS/FAIL/SKIP (N tests)
- Test quality issues: (list any trivial/weak tests, or "None")
### Manual Testing Plan
@@ -237,7 +237,7 @@ Read CLAUDE.md first, then .story_kit/README.md to understand the dev process.
The merge pipeline uses a temporary merge-queue branch and worktree to isolate merges from master. Simple additive conflicts (both branches adding code at the same location) are resolved automatically by keeping both additions. Complex conflicts (modifying the same lines differently) are reported without touching master.
## Fixing Minor Gate Failures
If quality gates fail (cargo clippy, cargo test, pnpm build, pnpm test), attempt to fix minor issues yourself before reporting to the human.
If quality gates fail (cargo clippy, cargo test, npm run build, npm test), attempt to fix minor issues yourself before reporting to the human.
**Fix yourself (up to 2 attempts total):**
- Syntax errors (missing semicolons, brackets, commas)

View File

@@ -9,7 +9,7 @@ This project is a standalone Rust **web server binary** that serves a Vite/React
* **Framework:** Poem HTTP server with WebSocket support for streaming; HTTP APIs should use Poem OpenAPI (Swagger) for non-streaming endpoints.
* **Frontend:** TypeScript + React
* **Build Tool:** Vite
* **Package Manager:** pnpm (required)
* **Package Manager:** npm
* **Styling:** CSS Modules or Tailwind (TBD - Defaulting to CSS Modules)
* **State Management:** React Context / Hooks
* **Chat UI:** Rendered Markdown with syntax highlighting.
@@ -91,8 +91,8 @@ To support both Remote and Local models, the system implements a `ModelProvider`
* **Quality Gates:**
* `npx @biomejs/biome check src/` must show 0 errors, 0 warnings
* `npm run build` must succeed
* `npx vitest run` must pass
* `npx playwright test` must pass
* `npm test` must pass
* `npm run test:e2e` must pass
* No `any` types allowed (use proper types or `unknown`)
* React keys must use stable IDs, not array indices
* All buttons must have explicit `type` attribute
@@ -119,7 +119,7 @@ To support both Remote and Local models, the system implements a `ModelProvider`
Multiple instances can run simultaneously in different worktrees. To avoid port conflicts:
- **Backend:** Set `STORYKIT_PORT` to a unique port (default is 3001). Example: `STORYKIT_PORT=3002 cargo run`
- **Frontend:** Run `pnpm dev` from `frontend/`. It auto-selects the next unused port. It reads `STORYKIT_PORT` to know which backend to talk to, so export it before running: `export STORYKIT_PORT=3002 && cd frontend && pnpm dev`
- **Frontend:** Run `npm run dev` from `frontend/`. It auto-selects the next unused port. It reads `STORYKIT_PORT` to know which backend to talk to, so export it before running: `export STORYKIT_PORT=3002 && cd frontend && npm run dev`
When running in a worktree, use a port that won't conflict with the main instance (3001). Ports 3002+ are good choices.