floorplan-panel: prune dead drag state, useEffects, and measurement helpers

After the legacy SVG layers and handler callbacks were dismantled, the
backing drag-state useStates, mirror useRefs, and watch-effects became
orphans, along with a handful of top-level math helpers whose callers
were already gone.

Removed:
 - 12 dead `useState` declarations: `slabBoundaryDraft` /
   `slabVertexDragState` / `slabHoleBoundaryDraft` /
   `slabHoleVertexDragState` / `slabHoleMoveDraft` / `ceilingBoundary
   Draft` / `ceilingVertexDragState` / `ceilingHoleBoundaryDraft` /
   `ceilingHoleVertexDragState` / `ceilingHoleMoveDraft` /
   `zoneBoundaryDraft` / `zoneVertexDragState`. All written only by
   the dead vertex-drag handlers and read only by the dead
   `clear*BoundaryInteraction` callbacks and `transientFloorplanFit`
   checks (which collapse to `false` once their inputs are gone).
 - 5 dead `useRef` mirrors of the above (`slabBoundaryDraftRef` etc.)
   plus their mirror `useEffect` writes.
 - 5 dead `clear*BoundaryInteraction` callbacks (slab, slabHole,
   ceiling, ceilingHole, zone) — only called by deleted useEffects
   and by `clearDraft`, where the call became a no-op.
 - 7 dead `useEffect` watchers for `slabVertexDragState`,
   `ceilingVertexDragState`, `slabHoleVertexDragState`,
   `slabHoleMoveDraft`, `ceilingHoleVertexDragState`,
   `ceilingHoleMoveDraft`, `zoneVertexDragState` (each early-returns
   because state is always null, so all listener wiring + commit /
   cancel paths inside were unreachable).
 - 5 dead `shouldShow*BoundaryHandles` flags + the 5 `useEffect`s
   that called `clear*BoundaryInteraction` when they flipped.
 - `selectedSlabEditingHoleIndex` / `selectedSlabEditingHole` /
   `selectedCeilingEditingHoleIndex` / `selectedCeilingEditingHole`
   — derived from now-`null` selectedX entries.
 - Dead drag-state guards in `handlePointerMove`, `handleSvgPointer
   Move`, and the floor-plan fit `useMemo`.
 - Dead top-level helpers: `getRaySegmentIntersection`,
   `getSlabHandlePolygon`, `getSlabVisualOffsets`,
   `getDraftSlabVisualPolygon`, `WallMeasurementFaceContext` type,
   `getWallMeasurementFaceContext`, `getAdjacentOpeningBounds`,
   `getSelectedWallMeasurementOverlays`,
   `getItemDimensionMeasurementOverlays`, `polygonCentroid`.

Floor-plan panel: 10,466 → 9,006 lines (-1,460). Cumulative reduction
vs `main`: 17,913 → 9,006 (-8,907 lines, **~50%**).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Wassim SAMAD
2026-05-19 19:19:34 -04:00
co-authored by Claude Opus 4.7
parent ff147626bb
commit a3dc48a503
File diff suppressed because it is too large Load Diff