Cover recent additions (cite stripping, dark mode) + add v5/AGENTS.md#29
Merged
Merged
Conversation
Fills test gaps from PRs that merged before the suite branch was cut, and documents v5 for agents: - ChatFab tests for <cite> tag stripping (#22): tags removed, cited prose kept, multi-tag and no-tag cases. Plus pending tool-call status labels (get_unit_details / report_issue / generic) and the photo-upload flow (upload → removable preview → [Attached photos: …] hint on send, and the upload-error path). ChatFab statement coverage 54% → 81%; overall 87.5% → 92%. - Dark-mode E2E (#23): tool-detail page resolves the dark design tokens when the dark theme is active, and the choice persists across reload. - v5/AGENTS.md: scoped agent guide (stack, Notion data layer, key files, conventions, how to run the test suite) with an explicit note that the root CLAUDE.md is v4/AirTable and does not apply to v5. - Install @vitest/coverage-v8 so `npm run test:coverage` works (the config referenced the provider but it was never added). test:all green: 232 Vitest + 17 Playwright, lint + tsc clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR closes test coverage gaps for recently merged v5 features (citation stripping in chat output, pending tool-call statuses, photo-upload flow, and dark mode token resolution/persistence), adds a v5-specific agent guide, and fixes the Vitest coverage dependency needed for --coverage runs.
Changes:
- Expanded
ChatFabcomponent tests to cover<cite>tag stripping, pending tool-call status labels, and photo upload + attachment hint behavior (including error path). - Added a Playwright E2E spec to guard dark-mode design token resolution on tool-detail pages and persistence across reload.
- Added
v5/AGENTS.mddocumentation and installed@vitest/coverage-v8to match the Vitest v8 coverage provider configuration.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
v5/src/components/ChatFab.test.tsx |
Adds missing test coverage for citation stripping, tool-call status UI, and photo upload flow in the chat FAB. |
v5/package.json |
Adds the missing Vitest v8 coverage provider dependency. |
v5/package-lock.json |
Locks dependency graph updates for the new coverage provider (and related Vitest patch bumps). |
v5/e2e/dark-mode.spec.ts |
Introduces E2E coverage to prevent regressions in tool-detail dark-mode token wiring and persistence. |
v5/AGENTS.md |
Adds v5-scoped agent/human guidance, focusing on Notion-backed data layer and test harness usage. |
Files not reviewed (1)
- v5/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+342
to
+345
| const dialog = screen.getByRole("dialog"); | ||
| expect(dialog).toHaveTextContent("First and second point."); | ||
| expect(dialog.textContent).not.toContain("cite"); | ||
| }); |
| "@types/react": "^19", | ||
| "@types/react-dom": "^19", | ||
| "@vitejs/plugin-react": "^6.0.2", | ||
| "@vitest/coverage-v8": "^4.1.8", |
Comment on lines
+93
to
+95
| - Because `cacheComponents` is enabled, API routes **cannot set `runtime`** — they use the default Node runtime. | ||
| - The in-memory rate limiter is a per-process singleton; it resets on cold start (fine for abuse prevention). Upstash backs it only when **both** `UPSTASH_REDIS_REST_*` vars are set. | ||
| - Python scripts under `scripts/` use Node with `--experimental-strip-types`; they are migration/maintenance tools, not part of the app build. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes test gaps from PRs that merged before the test-suite branch was cut (so the suite never saw them), and adds an agent guide for v5.
Tests
<cite>stripping (Strip leaked <cite> tags from chat output #22) —ChatFabnow has tests proving the inline<cite index="…">…</cite>source markup is stripped while the cited prose is kept (single tag w/ attributes, multiple tags, and a no-citation passthrough). This logic shipped untested.get_unit_details/report_issue/ generic tool calls.[Attached photos: file_upload_id=… name=…]hint appended on send, plus the upload-error path.ChatFab statement coverage 54% → 81%; overall 87.5% → 92%.
Docs
v5/AGENTS.md— scoped agent guide: stack, the Notion data layer, key files, conventions, and how to run the suite (npm run test:all). Includes an explicit warning that the rootCLAUDE.mdis v4/AirTable and does not apply to v5 (it would otherwise mislead agents about the data layer).Fix
@vitest/coverage-v8— the config referenced the v8 coverage provider but the dep was never added, sonpm run test:coverageerrored.Verification
🤖 Generated with Claude Code