Skip to content

Cover recent additions (cite stripping, dark mode) + add v5/AGENTS.md#29

Merged
philosophercode merged 1 commit into
mainfrom
philosophercode/v5-test-followups
Jun 2, 2026
Merged

Cover recent additions (cite stripping, dark mode) + add v5/AGENTS.md#29
philosophercode merged 1 commit into
mainfrom
philosophercode/v5-test-followups

Conversation

@philosophercode

Copy link
Copy Markdown
Owner

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)ChatFab now 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.
  • Pending tool-call status — labels for in-flight get_unit_details / report_issue / generic tool calls.
  • Photo-upload flow — upload → removable preview → the [Attached photos: file_upload_id=… name=…] hint appended on send, plus the upload-error path.
  • Dark mode (Fix v5 tool-detail dark mode #23) — new E2E: the tool-detail page resolves the dark design tokens when dark is active, and the choice persists across reload.

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 root CLAUDE.md is v4/AirTable and does not apply to v5 (it would otherwise mislead agents about the data layer).

Fix

  • Install @vitest/coverage-v8 — the config referenced the v8 coverage provider but the dep was never added, so npm run test:coverage errored.

Verification

npm run test:all
Lint:       clean
tsc:        clean
Vitest:     232 passed
Playwright: 17 passed

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings June 2, 2026 04:05
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
makerlab-tools Ready Ready Preview, Comment Jun 2, 2026 4:06am
makerlab-tools-v5 Ready Ready Preview, Comment Jun 2, 2026 4:06am

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ChatFab component 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.md documentation and installed @vitest/coverage-v8 to 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");
});
Comment thread v5/package.json
"@types/react": "^19",
"@types/react-dom": "^19",
"@vitejs/plugin-react": "^6.0.2",
"@vitest/coverage-v8": "^4.1.8",
Comment thread v5/AGENTS.md
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.
@philosophercode philosophercode merged commit 607b2ae into main Jun 2, 2026
4 checks passed
@philosophercode philosophercode deleted the philosophercode/v5-test-followups branch June 2, 2026 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants