You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(web): src/hooks/ is outside the coverage gate — two hooks (useServerJsonImport, useImportClientConfig) have no tests #1787
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).
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
src/hooks/** gated (or a documented exclusion).
useServerJsonImport.ts and useImportClientConfig.ts at ≥90 on all four dimensions.
Activity
chore: close a batch of quality-gate & tidy gaps (#1785 #1787 #1789 #…
cliffhall commentedon Jul 26, 2026
Fixed in #1792 (merged to v2/main).