the 3D toggle was a layout leak — plus editor polish
Picking up from the last entry. The 3D toggle showing pure black turned out to be a layout leak, not a rendering issue.
Diagnosis:
Fabric.js wraps its host canvas in a .canvas-container div. v-show on the inner canvas hid the canvas but left the wrapper’s layout space intact, pushing the 3D canvas 904px below the viewport. Fix: wrap both canvases in a single v-show div so display:none collapses the entire 2D subtree, Fabric wrapper included.
Tooling:
Added a /postmortem slash command that writes a bug-fix doc into docs/bug-fixing/YYMMDD-hhmm-{slug}.md. Template leads with the wrong hypotheses, then the diagnostic that worked, then transferable lessons. First artifact documents the v-show leak above.
Editor work since:
- Door + window 3D framing. Walls split into
BoxGeometrychunks (left / header / right / sill) around each opening. Door and window planes sit centered in the gap, visible from both sides through the open frame. No CSG. Closes the “doors only visible from inside the room” bug. - Door orientation picker. Added an optional
hinge_leftfield on the Door type. Properties panel exposes a 4-way orientation picker covering all canonical placements (left/right hinge × in/out swing). Replaces the prior “swing left” checkbox, which only expressed 2 of the 4. - Marquee select + group-drag + flood-fill. Drag on empty canvas marquee-selects (intersection-based; Shift adds). Drag any selected item to translate the whole selection by the same offset. Double-click a wall to grab its connected polygon plus every door/window attached. Diagnosis: Fabric v6+ defaults
originX/originYto center/center, so corner-anchored marquee math re-centered the rect on the click point. Fix: explicitoriginX: "left",originY: "top"on the Rect. - Nav polish.
Ffits the plan to view (computes wall bbox in meters, sets zoom + pan with 8% margin, clamped toZOOM_MIN/MAX).?opens a shortcuts modal whose documented codes are asserted against the keyboard handler in a regression test. Grid coverage bumped from 8× to 16× viewport for wider pan range.
Two diagnostics this round, both Fabric defaults doing something invisible — the wrapper that holds layout space, the origin that re-centers a rect. The /postmortem command exists so the next one costs less.