editor: complete floorplan construction documentation#531
Conversation
Items (e.g. solar panels) can now be placed on sloped roof surfaces. The placement system computes euler rotation from the roof surface normal so items sit flush on the slope instead of going inside. - Add roofStrategy to placement-strategies with enter/move/click/leave - Wire roof:enter/move/click/leave events in the placement coordinator - Add calculateRoofRotation in placement-math using surface normals - Support full 3D cursor rotation for sloped surfaces - Items on roofs are parented to the level with world-space rotation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| useEffect(() => { | ||
| setAuditIssues(issues) | ||
| return () => setAuditIssues([]) | ||
| }, [issues, setAuditIssues]) |
There was a problem hiding this comment.
Audit cleared between refreshes
Medium Severity
The useEffect for audit issues clears them in its cleanup function. This cleanup runs on every issues change, not just on unmount. This briefly wipes audit advisories from the store, causing issues like dimension-completeness to flicker away before new results are displayed.
Reviewed by Cursor Bugbot for commit 6b6ee8f. Configure here.
|
|
||
| - Reassess internal line contrast only after the corrected geometry can be seen in the target scene. | ||
|
|
||
| final result: blocked |
There was a problem hiding this comment.
Local QA doc committed
Medium Severity
The design-qa.md file introduces temporary, machine-specific QA notes and paths. This content isn't reproducible for other contributors and isn't suitable as permanent project documentation.
Reviewed by Cursor Bugbot for commit 6b6ee8f. Configure here.
| if (pending) clearTimeout(pending) | ||
| unsubscribe() | ||
| } | ||
| }, []) |
There was a problem hiding this comment.
Timer updates after unmount
Medium Severity
The debounced scene subscription clears its timeout on unmount but never guards setNodes. A callback scheduled before teardown can still run afterward and update React state on an unmounted hook instance.
Reviewed by Cursor Bugbot for commit 6b6ee8f. Configure here.
| ...dimension, | ||
| anchors: remapMeasurementAnchors(dimension.anchors, idMap), | ||
| controllingDimensionId, | ||
| } |
There was a problem hiding this comment.
Clone keeps old controller id
Medium Severity
When remapping construction dimensions, controllingDimensionId falls back to the original id if the controller is absent from the clone id map. Partial duplicates can keep pointing at a dimension that was not copied.
Reviewed by Cursor Bugbot for commit 6b6ee8f. Configure here.
| const mode = useEditor((s) => s.mode) | ||
| const follow = useLiquidLineToolOptions((s) => s.follow) | ||
| const toggleFollow = useLiquidLineToolOptions((s) => s.toggleFollow) | ||
| const buildTypes = useMemo(collectBuildTypes, []) |
There was a problem hiding this comment.
Build palette never refreshes
Low Severity
buildTypes is computed once via useMemo(collectBuildTypes, []), so structure tools discovered after the first mount—such as asynchronously loaded registry plugins—never appear in the Build tab until a full remount.
Reviewed by Cursor Bugbot for commit 6b6ee8f. Configure here.
# Conflicts: # packages/core/src/store/use-scene.ts # packages/core/src/utils/clone-scene-graph.test.ts # packages/core/src/utils/clone-scene-graph.ts # packages/editor/src/index.tsx # packages/nodes/src/shared/opening-placement-dimensions.ts # packages/nodes/src/wall/measurement.ts
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
There are 7 total unresolved issues (including 5 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fe92336. Configure here.
| message: issue.message, | ||
| })) | ||
| const clearance = clearanceChecksEnabled | ||
| ? buildClearanceAdvisories(nodes, { includeDisabled: true }).map((issue) => ({ |
There was a problem hiding this comment.
Clearance audit ignores profile toggles
Medium Severity
When clearance checks are turned on, advisories are built with includeDisabled: true, so disabled clearance profiles still run. That inverts the usual meaning of enabling checks and can surface advisories users explicitly turned off in profile settings.
Reviewed by Cursor Bugbot for commit fe92336. Configure here.
| .default([ | ||
| [0, 0, 0], | ||
| [1, 0, 0], | ||
| ]), |
There was a problem hiding this comment.
Arc modes allow two anchors
Medium Severity
ConstructionDimensionNode always requires at least two anchors, but constructionDimensionRequiredAnchorCount expects three for arc-length and angular modes. Data created outside the floor-plan tool (import, MCP, hand-edited JSON) can validate yet violate what rendering and the tool assume.
Reviewed by Cursor Bugbot for commit fe92336. Configure here.


What does this PR do?
How to test
bun run check,bun run check-types, andbun run build; all workspace checks and production builds should pass.bun dev, open the editor, create a level with straight and curved walls, openings, rooms, columns, stairs, and structural grids, then switch to floor-plan view and confirm the documented geometry and schedules update with scene edits.Screenshots / screen recording
To be added — this PR includes visual and interactive floor-plan, annotation, and PDF-export changes.
Checklist
bun devbun checkto verify)mainbranchNote
High Risk
Large cross-package feature (new persistent node types, associative references, PDF pipeline swap) with broad editor and export surface area; regressions in clone, dimensions, or PDF output are plausible despite heavy test coverage.
Overview
Delivers floor-plan construction documentation end-to-end by introducing persistent scene nodes and editor wiring so dimensions, sheets, and advisories stay associative with the model.
Core schema and registry gain
construction-dimension,drawing-sheet, andstructural-gridkinds (with clone/migration remapping for dimensions, measurements, and sheet-local IDs). Walls can carry assembly layers and datum references; doors/windows gain construction marks and optional opening dimensions. Floorplan geometry addsdimension-string, dimension terminators/text placement, and optionalGeometryContext.extensions. Event bus and subtree clone paths are extended for the new types.Standalone editor app mounts a headless
FloorplanConstructionPreflightthat debounces scene nodes and pushes dimension completeness, clearance, and module advisories into editor preflight state. The Build tab builds its structure palette fromnodeRegistry(plusgetFloorplanNodeExtensionpreferred view) instead of a fixed tool-kind union. The viewer toolbar adds coordinated drawing type selection, floor-plan annotation and wall dimension reference submenus, and a units submenu (meters / millimeters / imperial).Dependencies:
@pascal-app/editorreplaces jspdf/svg2pdf with pdfkit (+ blob-stream); workspace packages bump to 0.9.2 / nodes 0.1.1. Minor Next env path tweak in ifc-converter;design-qa.mddocuments internal-dimension baseline fixes (mostly validated in tests; local 2D preview was blocked in QA).Reviewed by Cursor Bugbot for commit fe92336. Bugbot is set up for automated code reviews on this repo. Configure here.