Repository navigation
Conversation
Aymericr
left a comment
There was a problem hiding this comment.
Thanks @kruschdev, this closes a real false-negative (#1255): floor-standing procedural-items now go through the same footprint and vertical-interval checks as items, and the bridge path no longer needs @pascal-app/nodes loaded. I ran the new suites locally on this branch: layout-clearance.test.ts 51/51 and check-collisions.test.ts 16/16.
A few small things before merge:
- Optional chaining on
recipe(check-collisions.ts): the name usesnode.recipe?.name, butsource.assetIdusesnode.recipe.name. Ifrecipeis always present by schema, drop the?.. If it isn't, guard both. - Skip reason for wall-hosted procedural items: a procedural item with
wallIdis skipped asparent_local_coordinateswhenfloorOnlyis false. It isn't in parent-local coordinates, it's wall-attached, sounsupported_attachmentseems more accurate in both modes. An agent reading the result will act on that reason. - Scope:
furniture-kind.ts(+81) isn't mentioned in the description. If it's needed for procedural footprints, a sentence on why would help. Otherwise it could be a separate PR.
CI for this fork is waiting on maintainer approval to run.
|
Thanks @Aymericr! I addressed all three points in e40f704:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7989f5f. Configure here.

What does this PR do?
Fixes #1255
check_collisionsandlayout-clearance(collectOccupiedFootprintsandfindItemItemCollisions, used byverify_scene,furnish_room, andplace_in_room) previously filtered strictly onnode.type === 'item'. As a result, overlapping floor-standingprocedural-itemnodes returnedstatus: "checked"with emptycheckedItems,skippedItems, andcollisions, whileverify_scenereportedhasIssues: false.I updated
@pascal-app/coreand@pascal-app/mcpso floor-standingprocedural-itemnodes participate in plan footprint and vertical-interval collision checks under the same contract asitemnodes:door-clearance.ts,item-space.ts): AddedproceduralNodePlanCorners,proceduralNodePlanAabb,inspectProceduralItemPlanFootprint, andproceduralItemLevelPoseusing@pascal-app/core/procedural-itemsdirectly so standalone MCP bridges without@pascal-app/nodesloaded still evaluate recipe bounds accurately, including off-center recipe datums under yaw, named surface attachment host chains, and consistentunsupported_attachmentskipping forwall-sideandceilingmounting designs parented to a level.layout-clearance.ts,furniture-kind.ts): Includedprocedural-itemincollectOccupiedFootprintsandfindItemItemCollisions, extendeddesignedTogethertoProceduralItemNodeso procedural dining/bedside pairs within the 0.08 m clearance band are not false-positived asitem_too_close, addedproceduralHeightsInLeveland shared floor-lift election (electFloorPlacedLift) so items hosted on or resting atop procedural surfaces still honorSTACK_TOLERANCE, filtered flat procedural rug underlays, and guardedItemNode-only helpers (isWallDressing,itemSolidsInLevel,boxSolid).check_collisions(check-collisions.ts): Scoped, inspected, and gatedprocedural-itemalongsideitemwithcatalog: "procedural"source metadata, recordingunsupported_attachment,parent_local_coordinates, andnon_planar_rotationinskippedItems(insufficient_evidenceorpartial) and excluding skipped procedural nodes fromfindItemItemCollisions.How to test
bunx biome checkon the modified files inpackages/coreandpackages/mcp(0 errors, 0 warnings).bunx turbo run build check-types test --filter=@pascal-app/core --filter=@pascal-app/mcpand verify the new#1255regression cases pass inpackages/core/src/agent-operations/layout-clearance.test.tsandpackages/mcp/src/tools/check-collisions.test.ts.level_0, place two floor-standing2 m x 2 m x 0.9 mprocedural-itemnodes at[0, 0, 0]and callcheck_collisions({ levelId, minimumClearance: 0, floorOnly: true })andverify_scene({}):check_collisionsnow reportscheckedItemslength 2 (catalog: "procedural") and 1overlapcollision, andverify_scenereportshasIssues: truewithitem_overlap.Screenshots / screen recording
N/A (MCP and core layout-clearance logic; verified locally in both
bun devand production build).Checklist
bun devbun checkto verify)mainbranchNote
Medium Risk
Touches shared layout/collision logic used by
verify_scene, furnishing, and MCP tools; behavior changes are broad but guarded with conservative skips and extensive regression tests.Overview
Floor-standing
procedural-itemnodes now participate in the same plan-footprint and vertical collision path as catalogitemnodes, fixing silent “all clear” results when procedural furniture overlapped.Core layout clearance gains recipe-driven plan AABBs (
proceduralNodePlanCorners/inspectProceduralItemPlanFootprint), level-frame poses through procedural host chains and named attachment surfaces, andproceduralHeightsInLevel(including ceiling-mounted items with motion reach fromevaluateRecipe).collectOccupiedFootprintsandfindItemItemCollisionshonor procedural rugs,designedTogetherdining pairs, and stacked children on procedural surfaces; ceiling/wall-hosted procedural nodes are skipped with explicit reasons.The MCP
check_collisionstool inspects procedural items alongside items, emitscatalog: "procedural"metadata, and surfaces skip reasons (unsupported_attachment,non_planar_rotation, etc.). Regression coverage is added under#1255in core and MCP tests.Reviewed by Cursor Bugbot for commit bd0c21d. Bugbot is set up for automated code reviews on this repo. Configure here.