Skip to content

nodes: add modular cabinets and wall trim controls#461

Open
sudhir9297 wants to merge 74 commits into
pascalorg:mainfrom
sudhir9297:fix/wed-jul-1
Open

nodes: add modular cabinets and wall trim controls#461
sudhir9297 wants to merge 74 commits into
pascalorg:mainfrom
sudhir9297:fix/wed-jul-1

Conversation

@sudhir9297

@sudhir9297 sudhir9297 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds the modular cabinet workflow: cabinet runs/modules, wall snapping, paint slots, drawer/appliance/fridge/cooktop/range-hood geometry, floorplan/sidebar support, quick actions, move-frame handling, island placement, L-corner actions, grouped undo/redo behavior, and cabinet animation systems.

It also extends the wall finishing workflow with configurable wall bands and paintable skirting/crown/chair rail. The trim work adds curated profiles, Flat defaults, separate material slots for each trim family, raycast selection for paint, and architecture-review cleanup so trim geometry emits metre-scale UVs and cabinet Alt behavior stays force-only rather than bypassing snap modes.

How to test

  1. Run bun run check and bun run lint; both should complete without findings.
  2. Run the focused cabinet and wall tests: bun test packages/nodes/src/cabinet/__tests__/move-frame.test.ts packages/nodes/src/cabinet/__tests__/wall-snap.test.ts packages/nodes/src/cabinet/__tests__/quick-actions.test.ts packages/core/src/schema/nodes/wall.test.ts packages/nodes/src/wall/paint.test.ts.
  3. Build/typecheck the touched packages with bun --filter @pascal-app/core build, bun --filter @pascal-app/nodes build, and bun --filter @pascal-app/editor check-types.
  4. Run bun dev, open the editor, add cabinet runs/modules, switch base modules to tall/fridge/cooktop/sink variants, and verify wall snapping, island placement, L-corner quick actions, paint slots, UV-scaled countertop/drawer textures, and grouped undo/redo behavior.
  5. Select a cabinet module or run and press E; doors/drawers should animate open, second press closes, and the panel Play/Stop button should mirror the same animation.
  6. Switch to the 2D floor plan and verify cabinets draw as countertop outlines with sink/cooktop symbols and DW/REF/OV labels; nested wall cabinets and hoods draw as dashed open outlines.
  7. In wall settings, adjust band count from 1 to 4 and add skirting/crown/chair rail; verify each trim type has Flat as the default option, can be selected/painted independently, and renders with the selected material.

Screenshots / screen recording

Will be added — visual/interactive cabinet workflow 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

High Risk
Large surface area across scene graph, movement, collision, selection, and undo history for composite cabinets; wall band/trim changes affect paint and geometry for a core structural kind.

Overview
Introduces cabinet and cabinet-module node types (schemas, events, paint targets) and wires them through the registry: parent-frame movement, selection proxies, quickActions, multi-footprint floor collision, delete cascades, and floor-plan invalidation across linked runs. The editor gains selection:find-node, registry sceneAction click dispatch (e.g. cooktop knobs), quick-action rows on 3D/2D action menus, grouped cabinet drags in the floor plan, groupMoveSnap parity for wall attach, and runAsSingleSceneHistoryStep for single-undo compound edits.

Walls gain optional face bands (1–4 heights with per-band material slots) and skirting / crown / chair rail trim configs with profile enums and dedicated slot defaults, plus helpers to enable bands and seed solid-color slots when counts change.

Plugin loading no longer registers plugin sidebar panels in core; apps use extendPluginDiscovery to compose discovery and registerEditorHostPanel for host UI (e.g. trees). setPluginDiscovery warns if it would drop prior extended sources.

Other notable changes: spatial canPlaceOnFloorFootprints (multi-footprint drafts, ignore composite subtrees), handle commit / centered guide rings, floor-plan drag docs favoring live overrides over per-tick scene writes, and editor dev PORT override in package.json.

Reviewed by Cursor Bugbot for commit bc33ac2. 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>
Fridge exterior is now brushed silver with brass accents and the
interior is all white. Door/drawer animation no longer rebuilds the
full cabinet geometry per frame — animated parts carry pose metadata
that a new per-frame cabinet system applies directly to transforms.

Co-Authored-By: Claude <noreply@anthropic.com>
Port the curved-flame look from reference gas-burner photos: each burner
gets a ring of vertex-coloured tube flames (blue body, orange-yellow tips)
whose spines breathe and flicker per frame at ~30fps, plus a flat ignition
glow and a faded heat halo. Fix the knob pointer notch to rotate with the
knob instead of drifting sideways. Also includes cooktop compartment
presets/panels and cabinet selection/move affordance work.

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread packages/core/src/hooks/spatial-grid/spatial-grid-manager.ts
Comment thread packages/nodes/src/cabinet/floorplan-move.ts
# Conflicts:
#	packages/editor/src/components/editor/use-floorplan-background-placement.ts
Comment thread packages/editor/src/components/editor/node-arrow-handles.tsx Outdated
Comment thread packages/editor/src/components/editor/group-move-handle.tsx Outdated
}

const current = effectiveOperationState(nodeId, node.operationState)
animateCabinetOperationState(nodeId, current >= 0.5 ? 0 : 1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Run E-key many undo steps

Medium Severity

Pressing E on a cabinet run starts a separate open/close animation for every module, and each animation commits with its own updateNode when it finishes. One E interaction can push multiple undo history entries instead of a single step like the quick actions use via runAsSingleSceneHistoryStep.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 83163e6. Configure here.

@sudhir9297 sudhir9297 changed the title nodes: add modular cabinet workflows nodes: add modular cabinets and wall trim controls Jul 9, 2026

@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.

There are 2 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 e05e4ca. Configure here.

if (draft) {
setMovingNode(draft as any)
setSelection({ selectedIds: [] })
return

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 duplicate leaves history paused

Medium Severity

When duplicating a cabinet run (or other subtree) via the 3D floating menu, handleDuplicate pauses scene undo history before createFreshPlacementSubtree, but the success path returns without calling resume. The 2D floor-plan duplicate handler resumes in the same situation, so 3D placement can leave history paused and break grouped undo for later edits.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e05e4ca. Configure here.

# Conflicts:
#	packages/editor/src/components/editor/group-move-handle.tsx
#	packages/plugin-trees/src/instanced.tsx
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