What's wrong
web/src/store/boundarySlice.ts grew from 549 → 1000 lines (+82%) across the four most recent PRs (#417-mkofler96/KoFEM#420: explicit tie connections, surface-to-point couplings, shell/solid MPC validation, surface-load overlap fix). It now mixes five distinct concerns in one file:
- Tie-group state/actions
- Coupling-group state/actions, including reference-point node lifecycle
- Original BC/load group state/actions
rebuildLoads / rebuildSurfaceLoads
- Viewport pick-session state (tie-side toggling, coupling draft)
Why it matters
boundarySlice.ts exists because issue #202 ("modelStore.ts is a 988-line monolith — split into focused state slices," closed) split it out as one of several focused slices. It has now grown back past that same ~1000-line threshold that made #202 worth fixing in the first place — the split bought headroom, not a permanent fix, and each new coupling feature has been landing in the same file.
Not a duplicate of the other outstanding "file has outgrown itself" issues: #401 is lib/shellize.ts, #371 is solver.worker.ts, #364 is BoundaryConditionLayer.tsx — none target boundarySlice.ts.
Suggested fix
Split along the same lines #202 used: tie-group and coupling-group state/actions are good candidates to move into their own slices (tieSlice.ts, couplingSlice.ts), leaving boundarySlice.ts with the original BC/load concerns plus the shared rebuild logic.
Found during a scheduled codebase health scan (fresh review of commits 57e0346..HEAD).
What's wrong
web/src/store/boundarySlice.tsgrew from 549 → 1000 lines (+82%) across the four most recent PRs (#417-mkofler96/KoFEM#420: explicit tie connections, surface-to-point couplings, shell/solid MPC validation, surface-load overlap fix). It now mixes five distinct concerns in one file:rebuildLoads/rebuildSurfaceLoadsWhy it matters
boundarySlice.tsexists because issue #202 ("modelStore.ts is a 988-line monolith — split into focused state slices," closed) split it out as one of several focused slices. It has now grown back past that same ~1000-line threshold that made #202 worth fixing in the first place — the split bought headroom, not a permanent fix, and each new coupling feature has been landing in the same file.Not a duplicate of the other outstanding "file has outgrown itself" issues: #401 is
lib/shellize.ts, #371 issolver.worker.ts, #364 isBoundaryConditionLayer.tsx— none targetboundarySlice.ts.Suggested fix
Split along the same lines #202 used: tie-group and coupling-group state/actions are good candidates to move into their own slices (
tieSlice.ts,couplingSlice.ts), leavingboundarySlice.tswith the original BC/load concerns plus the shared rebuild logic.Found during a scheduled codebase health scan (fresh review of commits 57e0346..HEAD).