refactor(decnet_web/Config): wire hook + bump coverage floor

Final integration. The page shell is now a thin composition of
useConfig + the previously-extracted children:

- Config.tsx: 989 -> 131 LOC. Page owns only the activeTab state
  (and the "drop the users tab if the server didn't send users"
  effect). Every form lives inside its tab; toast wiring lives
  in AppearanceTab; window.alert calls live inside UsersTab.
- Tabs receive their `onSave* / onAddUser / ...` callbacks
  directly from the hook — no intermediate wrapper handlers.

Coverage floor bumped after the split:

  lines       14 -> 17
  functions   13 -> 15
  branches    11 -> 13
  statements  13 -> 16

Phase 4 final scoreboard: 34 test files, 156 tests, all green.
This commit is contained in:
2026-05-09 05:27:47 -04:00
parent 4a9cd90f90
commit 171e20e427
2 changed files with 57 additions and 510 deletions

View File

@@ -15,14 +15,14 @@ export default defineConfig({
include: ['src/**/*.{ts,tsx}'],
exclude: ['src/**/*.d.ts', 'src/test/**', 'src/main.tsx'],
// Baseline floors. Each refactor PR raises these; never lower.
// Phase 3 (CanaryTokens split): page shell down from 1,334 to 210
// LOC; hook + 3 modals + 3 list views + ui/types/helpers, 33 new
// tests. Suite: 28 files, 131 tests, 14.51% lines / 11.43% branches.
// Phase 4 (Config split): page shell down from 989 to 131 LOC;
// hook + WorkersPanel + 4 tab files, 25 new tests. Suite:
// 34 files, 156 tests, 17.73% lines / 13.85% branches.
thresholds: {
lines: 14,
functions: 13,
branches: 11,
statements: 13,
lines: 17,
functions: 15,
branches: 13,
statements: 16,
},
},
},