editor: improve cabinet resizing and wall alignment#503
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>
| previewOverrideIds.add(previewId) | ||
| useScene.getState().markDirty(previewId) | ||
| } | ||
| } |
There was a problem hiding this comment.
Stale preview overrides during resize
Medium Severity
During a linear resize drag, previewOverrides can leave stale overrides on connected nodes that are no longer part of the active preview. This causes visual glitches for neighboring elements mid-gesture, even though the final committed state is correct.
Reviewed by Cursor Bugbot for commit bfa0e90. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
There are 3 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit adedce3. Configure here.
| magneticSnap: linearDescriptor?.magneticSnap | ||
| ? (value) => linearDescriptor.magneticSnap?.(initialNode, value, sceneApi) ?? value | ||
| : undefined, | ||
| }) |
There was a problem hiding this comment.
Shift no longer frees resize
Low Severity
Handle resize snapping now uses resolveResizeSnapValue and global snapping mode only. The previous resize path skipped grid quantization while Shift was held; that bypass is gone, so users in grid mode cannot hold Shift for finer cabinet width or depth steps during a handle drag.
Reviewed by Cursor Bugbot for commit adedce3. Configure here.
|
|
||
| addSubtree(selected.id) | ||
| addSubtree(selected.parentId) | ||
|
|
There was a problem hiding this comment.
Level scope falls back silently
Low Severity
When quickActionNodeScope is level, a failed walk to a level ancestor falls through to the smaller family collection instead of using the full level graph. Wall overlap checks may miss cabinets on other runs and allow a blocked add.
Reviewed by Cursor Bugbot for commit adedce3. Configure here.


What does this PR do?
How to test
bun run check,bun run lint,bun run check-types, andbun run build; confirm every command completes successfully.Screenshots / screen recording
To be added — this is a visual and interactive change.
Checklist
bun devbun checkto verify)mainbranchNote
Medium Risk
Large cabinet corner-run and resize commit paths touch core editor history and scene graph; behavior is heavily tested but regressions in L-runs or undo would be user-visible.
Overview
Extends the handle registry so linear resize can apply live
previewOverrideson related nodes, optional kind-ownedmagneticSnap, and scene-aware handle lists; quick actions gainquickActionNodeScope(family/level) andblockedFeedbackfor disabled clicks.The editor routes resize snapping through
resolveResizeSnapValue(grid vs magnetic vs off), commits handle drags viacommitHandleDragPatchas a single undo step, and wires cabinet-style multi-node previews during drag. Move from menus/inspector usesresolveMoveActionNode(same-kind host) instead of always moving the selection; quick-action availability usescollectQuickActionNodeScope. Blocked quick actions get red shake feedback in 2D/3D menus. Snapping HUD resolves handle-drag context from the target node’s snap profile; group bbox helpers re-measure afteruseMeshSettleEpoch.Wall mitering fixes free-end tangent direction so left/right boundary points stay on consistent physical faces (new test).
Cabinets are the bulk of the change: default module size 0.5×0.5, overlay wall fronts from presets, per-module depth for run countertops/plinths (split spans), back-aligned group depth with wall stacks moving as a unit, side-specific width on modules, richer L/U corner depth handles with
overrideTarget/commit/ preview fan-out, context-aware depth on add-side and corners, resize caps and neighbor width reflow, and quick actions that disable wall add on overlap with titles + feedback. Schema default width/depth tweaks and extensive new tests document the behavior.Minor: ifc-converter
next-env.d.tspoints at.next/dev/types/routes.d.ts.Reviewed by Cursor Bugbot for commit adedce3. Bugbot is set up for automated code reviews on this repo. Configure here.