Summary
clients/web/src/hooks/ is not listed in the v8 coverage include in clients/web/vite.config.ts, so its four modules (917 lines) fall outside the per-file ≥90 gate — silently. Two of them have no test file at all. This is the live instance of the whitelist caveat documented by #1776 (PR #1784): a module outside components/lib/utils/server is ungated with no warning.
Surfaced during the #1776 review (PR #1784, round 7).
Current state
src/hooks/usePaginatedList.ts + usePaginatedList.test.tsx ✓ tested (but ungated)
src/hooks/useScrollMemory.ts + useScrollMemory.test.tsx ✓ tested (but ungated)
src/hooks/useServerJsonImport.ts (308 lines) — NO test, ungated
src/hooks/useImportClientConfig.ts — NO test, ungated
useServerJsonImport / useImportClientConfig are real logic (config/JSON import parsing + wiring), consumed by ServerImportJsonModal / ServerImportConfigModal. Some lines execute during those components' tests, but because include never names src/hooks/**, nothing is measured or enforced.
Proposed change
Either:
- (a) Add
'src/hooks/**/*.{ts,tsx}' to the coverage include in clients/web/vite.config.ts, and bring useServerJsonImport.ts and useImportClientConfig.ts to ≥90 on all four dimensions (lines/statements/functions/branches) with dedicated tests; or
- (b) If
hooks/ is deliberately excluded, document why in AGENTS.md.
(a) is preferred — these are exactly the kind of stateful wiring the gate exists for.
Note
Kept out of PR #1784 (same out-of-scope reasoning applied to customHeaders / navigation.ts there). While in vite.config.ts, consider also normalizing the include bases (it mixes src/**, clients/web/server/**, and path.join(repoRoot, 'core/**') — all resolve, just untidy).
Acceptance
Summary
clients/web/src/hooks/is not listed in the v8 coverageincludeinclients/web/vite.config.ts, so its four modules (917 lines) fall outside the per-file ≥90 gate — silently. Two of them have no test file at all. This is the live instance of the whitelist caveat documented by #1776 (PR #1784): a module outsidecomponents/lib/utils/serveris ungated with no warning.Surfaced during the #1776 review (PR #1784, round 7).
Current state
useServerJsonImport/useImportClientConfigare real logic (config/JSON import parsing + wiring), consumed byServerImportJsonModal/ServerImportConfigModal. Some lines execute during those components' tests, but becauseincludenever namessrc/hooks/**, nothing is measured or enforced.Proposed change
Either:
'src/hooks/**/*.{ts,tsx}'to the coverageincludeinclients/web/vite.config.ts, and bringuseServerJsonImport.tsanduseImportClientConfig.tsto ≥90 on all four dimensions (lines/statements/functions/branches) with dedicated tests; orhooks/is deliberately excluded, document why in AGENTS.md.(a) is preferred — these are exactly the kind of stateful wiring the gate exists for.
Note
Kept out of PR #1784 (same out-of-scope reasoning applied to
customHeaders/navigation.tsthere). While invite.config.ts, consider also normalizing theincludebases (it mixessrc/**,clients/web/server/**, andpath.join(repoRoot, 'core/**')— all resolve, just untidy).Acceptance
src/hooks/**gated (or a documented exclusion).useServerJsonImport.tsanduseImportClientConfig.tsat ≥90 on all four dimensions.npm run cigreen.