convoy: render-test regression-lock for ScanDisambiguationDialog (PR #144) #147

Merged
varutasu merged 1 commit from convoy/scanner-disambiguation-render-test into main 2026-06-13 10:22:12 -04:00
varutasu commented 2026-06-13 02:20:37 -04:00 (Migrated from github.com)

Summary

PR #144 (31da384, 2026-06-13) shipped a runtime ReferenceError: useFocusTrap is not defined to production. The sibling enable-no-undef-eslint-rule closes that bug class at lint time. This PR locks the same regression at render time so the bug would still fail CI even if the lint rule were dropped or disabled.

  • Adds test/components/ScanDisambiguationDialog.test.js — 8 tests, the first of which (renders without crashing (PR #144 regression-lock)) is the direct lock-in.
  • Mutation-tested locally: commenting out the useFocusTrap import causes all 8 tests to fail with the same ReferenceError shape that hit prod; restoring it passes.
  • Test count: 25 files / 123 tests → 26 files / 131 tests.

Why vitest + jsdom and not Playwright smoke

Re-scoped the queued scanner-disambiguation-smoke-test task to a vitest render test because:

Path Catches PR #144 Setup Runtime
Playwright smoke ✓ if disambiguation mounts during the smoke run High (auth bypass, stable multi-candidate fixture image) ~10s + browser
Vitest render ✓ directly — render-throw → test fail Low <100ms

The render test catches the exact same bug class at 1/100th the cost and matches the existing test/components/*.test.js pattern. A Playwright disambiguation smoke remains useful as integration-layer coverage and is queued as scanner-disambiguation-playwright-smoke (see § Follow-ups in .convoys/scanner-disambiguation-render-test.md).

Test plan

  • CI green
  • Squash + merge
  • Post-merge smoke: trigger a disambiguation in prod and confirm no console errors

Convoy doc

.convoys/scanner-disambiguation-render-test.md documents:

  • D1: cover the early-return branch explicitly
  • D2: fireEvent not userEvent (matches existing pattern)
  • D3: do NOT mock useFocusTrap — the missing-hook is exactly what we're locking
  • Queued follow-ups: add-component-render-smoke-pattern, scanner-disambiguation-playwright-smoke

Made with Cursor

## Summary PR #144 (`31da384`, 2026-06-13) shipped a runtime `ReferenceError: useFocusTrap is not defined` to production. The sibling [`enable-no-undef-eslint-rule`](https://github.com/stwl-labs/tcg-vault/commit/2e68574) closes that bug class at **lint** time. This PR locks the same regression at **render** time so the bug would still fail CI even if the lint rule were dropped or disabled. - Adds `test/components/ScanDisambiguationDialog.test.js` — 8 tests, the first of which (`renders without crashing (PR #144 regression-lock)`) is the direct lock-in. - **Mutation-tested locally**: commenting out the `useFocusTrap` import causes all 8 tests to fail with the same `ReferenceError` shape that hit prod; restoring it passes. - Test count: 25 files / 123 tests → 26 files / 131 tests. ## Why vitest + jsdom and not Playwright smoke Re-scoped the queued `scanner-disambiguation-smoke-test` task to a vitest render test because: | Path | Catches PR #144 | Setup | Runtime | |------|-----------------|-------|---------| | Playwright smoke | ✓ if disambiguation mounts during the smoke run | High (auth bypass, stable multi-candidate fixture image) | ~10s + browser | | Vitest render | ✓ directly — render-throw → test fail | Low | <100ms | The render test catches the exact same bug class at 1/100th the cost and matches the existing `test/components/*.test.js` pattern. A Playwright disambiguation smoke remains useful as integration-layer coverage and is queued as `scanner-disambiguation-playwright-smoke` (see § Follow-ups in `.convoys/scanner-disambiguation-render-test.md`). ## Test plan - [ ] CI green - [ ] Squash + merge - [ ] Post-merge smoke: trigger a disambiguation in prod and confirm no console errors ## Convoy doc `.convoys/scanner-disambiguation-render-test.md` documents: - D1: cover the early-return branch explicitly - D2: `fireEvent` not `userEvent` (matches existing pattern) - D3: do NOT mock `useFocusTrap` — the missing-hook is exactly what we're locking - Queued follow-ups: `add-component-render-smoke-pattern`, `scanner-disambiguation-playwright-smoke` Made with [Cursor](https://cursor.com)
vercel[bot] commented 2026-06-13 02:20:43 -04:00 (Migrated from github.com)

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

Project Deployment Actions Updated (UTC)
tcg-vault Ready Ready Preview, Comment Jun 13, 2026 6:20am

Request Review

[vc]: #mngP99i1fo1UYmxdUWO9L94Ps67GRIApOn/w5qOriB8=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ0Y2ctdmF1bHQiLCJwcm9qZWN0SWQiOiJwcmpfRjZXOEVvRkd3Y0g3aWVGcnRvRlNlOXdVVkFhNSIsImxpdmVGZWVkYmFjayI6eyJyZXNvbHZlZCI6MCwidW5yZXNvbHZlZCI6MCwidG90YWwiOjAsImxpbmsiOiJ0Y2ctdmF1bHQtZ2l0LWNvbnZveS1zY2FubmVyLWEyNjlmMS1yYW5kYWxsLXN0aWxsd2VsbHMtcHJvamVjdHMudmVyY2VsLmFwcCJ9LCJpbnNwZWN0b3JVcmwiOiJodHRwczovL3ZlcmNlbC5jb20vcmFuZGFsbC1zdGlsbHdlbGxzLXByb2plY3RzL3RjZy12YXVsdC84R3dmVXZreTd1WHZDcnZIMWhWcFlvencyU0VrIiwibmV4dENvbW1pdFN0YXR1cyI6IkRFUExPWUVEIiwicm9vdERpcmVjdG9yeSI6bnVsbCwicHJldmlld1VybCI6InRjZy12YXVsdC1naXQtY29udm95LXNjYW5uZXItYTI2OWYxLXJhbmRhbGwtc3RpbGx3ZWxscy1wcm9qZWN0cy52ZXJjZWwuYXBwIn1dLCJyZXF1ZXN0UmV2aWV3VXJsIjoiaHR0cHM6Ly92ZXJjZWwuY29tL3ZlcmNlbC1hZ2VudC9yZXF1ZXN0LXJldmlldz9vd25lcj1zdHdsLWxhYnMmcmVwbz10Y2ctdmF1bHQmcHI9MTQ3In0= The latest updates on your projects. Learn more about [Vercel for GitHub](https://vercel.link/github-learn-more). | Project | Deployment | Actions | Updated (UTC) | | :--- | :----- | :------ | :------ | | [tcg-vault](https://vercel.com/randall-stillwells-projects/tcg-vault) | ![Ready](https://vercel.com/static/status/ready.svg) [Ready](https://vercel.com/randall-stillwells-projects/tcg-vault/8GwfUvky7uXvCrvH1hVpYozw2SEk) | [Preview](https://tcg-vault-git-convoy-scanner-a269f1-randall-stillwells-projects.vercel.app), [Comment](https://vercel.live/open-feedback/tcg-vault-git-convoy-scanner-a269f1-randall-stillwells-projects.vercel.app?via=pr-comment-feedback-link) | Jun 13, 2026 6:20am | <a href="https://vercel.com/vercel-agent/request-review?owner=stwl-labs&repo=tcg-vault&pr=147" rel="noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://agents-vade-review.vercel.sh/request-review-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://agents-vade-review.vercel.sh/request-review-light.svg"><img src="https://agents-vade-review.vercel.sh/request-review-light.svg" alt="Request Review"></picture></a>
github-actions[bot] commented 2026-06-13 02:22:18 -04:00 (Migrated from github.com)

Pipeline Health

Build + CI gates

Gate Status
Vercel build (Preview) pass
CI: Lint pass
CI: Schema map fresh skipped
Preview smoke pass
Visual diff ⏭ skipped or pending

Build runs on Vercel; this CI runs lint and schema-map drift only (no duplicate build).

Role reports

Role Status
Reviewer report pending
A11y audit pending
Design system audit pending

See individual comments above for details. This rollup updates automatically.

<!-- pipeline-rollup --> ## Pipeline Health ### Build + CI gates | Gate | Status | | --- | --- | | Vercel build (Preview) | ✅ pass | | CI: Lint | ✅ pass | | CI: Schema map fresh | ❌ skipped | | Preview smoke | ✅ pass | | Visual diff | ⏭ skipped or pending | _Build runs on Vercel; this CI runs lint and schema-map drift only (no duplicate build)._ ### Role reports | Role | Status | | --- | --- | | Reviewer report | ⏳ pending | | A11y audit | ⏳ pending | | Design system audit | ⏳ pending | See individual comments above for details. This rollup updates automatically.
Sign in to join this conversation.
No description provided.