refactor(decnet_web/MazeNET): wire hooks + bump coverage floor

Final integration step. The MazeNET page shell is now a thinner
composition of the existing module-level hooks (useMazeApi,
useMazeInteraction, useTopologyEditor, useTopologyStream,
useLayoutPersistor) PLUS the three new ones from this phase
(useFullscreenMode, useTopologyData, useMazeContextMenu).

- MazeNET.tsx: 980 -> 715 LOC. The fullscreen + body-class
  effects, the topology hydrate / SSE stream / deploy /
  flashErr plumbing, and the four context-menu builders are
  all gone from the shell.
- Page still owns the per-operation editor callbacks
  (removeNet/Node/Edge, duplicateNode, addServiceToNode, etc.)
  because they need direct access to setNodes/setEdges/setNets
  for optimistic patches alongside their REST calls — those
  setters are exposed by useTopologyData for that reason.

Coverage floor bumped after the phase:

  lines       17 -> 19
  functions   15 -> 17
  branches    13 -> 14
  statements  16 -> 18

Phase 5 final scoreboard: 37 test files, 172 tests, all green.
This commit is contained in:
2026-05-09 05:39:32 -04:00
parent f33a011900
commit 6e0e1c204e
2 changed files with 40 additions and 268 deletions

View File

@@ -15,14 +15,16 @@ 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 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.
// Phase 5 (MazeNET trim): page shell down from 980 to 715 LOC
// (already partially modular; lifted fullscreen, topology data
// plane, and context-menu builder into focused hooks).
// 16 new tests. Suite: 37 files, 172 tests,
// 19.49% lines / 14.67% branches.
thresholds: {
lines: 17,
functions: 15,
branches: 13,
statements: 16,
lines: 19,
functions: 17,
branches: 14,
statements: 18,
},
},
},