Skip to content

editor: improve cabinet resizing and wall alignment - #503

Merged
Aymericr merged 40 commits into
pascalorg:mainfrom
sudhir9297:fix/cab-wall
Jul 19, 2026
Merged

Aymericr merged 40 commits into
pascalorg:mainfrom
sudhir9297:fix/cab-wall

Conversation

@sudhir9297

@sudhir9297 sudhir9297 commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Adds side-specific width handles for individual base and wall cabinets, with real-time mesh updates and linked wall-cabinet sizing.
  • Keeps connected cabinets snapped while redistributing width, hides blocked handles beside corner and bridge fillers, and prevents new wall cabinets from overlapping existing wall runs.
  • Surfaces blocked wall actions with red jiggle feedback in both 2D and 3D menus, commits composite drags as one undo step, and moves wall-treatment miter calculation to level-scoped system data.

How to test

  1. Run bun run check, bun run lint, bun run check-types, and bun run build; confirm every command completes successfully.
  2. In both 2D and 3D, select individual base and wall cabinets and drag either side handle; confirm the selected cabinet updates live, its connected neighbor compensates, cabinets remain snapped without gaps, and one undo restores the full drag.
  3. Place corner, wall-corner, and wall-bridge fillers beside a selected cabinet; confirm the handle on each blocked side is hidden.
  4. Resize a wall cabinet into the space above another base cabinet, then try adding that base cabinet's wall companion; confirm the Wall text and icon turn red and jiggle, and no overlapping cabinet is created.
  5. Shrink the existing wall cabinet to free enough space, add the new wall cabinet, then resize either neighbor; confirm the cabinets snap together and redistribute width without preserving an empty gap.

Screenshots / screen recording

To be added — this is a visual and interactive change.

Checklist

  • I've tested this locally with bun dev
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch

Note

Medium Risk
Large editor interaction and cabinet scene-graph changes affect undo, snapping, and multi-node resize commits, though behavior is heavily covered by new tests.

Overview
Extends the handle registry so linear resize handles can publish previewOverrides on related nodes during drag, apply kind-owned magneticSnap, and resolve handle lists with optional sceneApi. Quick actions gain quickActionNodeScope (family / level) and blockedFeedback for disabled-but-clickable actions.

The editor wires those hooks: resize snapping follows the active mode (grid vs lines) via resolveResizeSnapValue, live previews merge/clear companion overrides, and commitHandleDragPatch records the final composite write as one undo step after preview history resumes. Move from menus/inspector uses resolveMoveActionNode so same-kind nested modules move their host run. Floating menus collect the scoped node graph for quick-action availability and play red jiggle feedback when a blocked action is clicked. Handle-drag snap context is derived from the dragged node’s profile (not rotation drags). Group bbox helpers depend on useMeshSettleEpoch via an explicit nodes read instead of biome ignores.

Straight-wall miter frames now use a consistent segment direction so left/right boundary points stay on the correct physical faces at free ends.

Cabinets shift default box size to 0.5×0.5 m, split countertop/plinth geometry per module depth, and add side-specific width resize with neighbor compensation, back-aligned group depth, and L/U corner depth handles that target derived legs with preview/commit fan-out. Corner ops, continuous placement, and quick actions are updated for context-aware depth, overlap checks for add wall, and outer-module selection after L-corner actions. Schema default width/depth in core align with the new defaults.

Reviewed by Cursor Bugbot for commit 908d581. Bugbot is set up for automated code reviews on this repo. Configure here.

sudhir9297 and others added 30 commits May 19, 2026 02:59
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 <[email protected]>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 908d581. Configure here.

const rawNode = useScene((state) => {
if (!selectedId) return null
const selectedNode = state.nodes[selectedId as AnyNodeId]
return selectedNode ? resolveDirectManipulationNode(selectedNode, state.nodes) : null

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3D run rotate unavailable

Medium Severity

3D handle rendering now uses the selected node directly instead of resolveDirectManipulationNode, so choosing a base cabinet-module only shows module width/depth handles and hides the parent run’s rotate control. Floorplan ctrl/meta rotate still resolves to the rotatable parent run, so the same selection rotates in 2D but not via 3D gizmos.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 908d581. Configure here.

@Aymericr
Aymericr merged commit 6cc10c9 into pascalorg:main Jul 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants