Skip to content

editor: improve cabinet resizing and wall alignment#503

Open
sudhir9297 wants to merge 39 commits into
pascalorg:mainfrom
sudhir9297:fix/cab-wall
Open

editor: improve cabinet resizing and wall alignment#503
sudhir9297 wants to merge 39 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 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 previewOverrides on related nodes, optional kind-owned magneticSnap, and scene-aware handle lists; quick actions gain quickActionNodeScope (family / level) and blockedFeedback for disabled clicks.

The editor routes resize snapping through resolveResizeSnapValue (grid vs magnetic vs off), commits handle drags via commitHandleDragPatch as a single undo step, and wires cabinet-style multi-node previews during drag. Move from menus/inspector uses resolveMoveActionNode (same-kind host) instead of always moving the selection; quick-action availability uses collectQuickActionNodeScope. 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 after useMeshSettleEpoch.

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.ts points 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.

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 <noreply@anthropic.com>
previewOverrideIds.add(previewId)
useScene.getState().markDirty(previewId)
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bfa0e90. Configure here.

@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 2 potential issues.

There are 3 total unresolved issues (including 1 from previous review).

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 adedce3. Configure here.

magneticSnap: linearDescriptor?.magneticSnap
? (value) => linearDescriptor.magneticSnap?.(initialNode, value, sceneApi) ?? value
: undefined,
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit adedce3. Configure here.


addSubtree(selected.id)
addSubtree(selected.parentId)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit adedce3. Configure here.

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.

1 participant