editor: keep room surfaces in sync with wall topology - #554
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>
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 7e6bd1d. Configure here.
| beforeNode?.type === 'wall' && beforeNode.parentId === levelId ? beforeNode : null | ||
| if (!sameIndexedWall(cached.walls.get(wallId), beforeWall)) { | ||
| return { level: this.rebuildLevel(levelId, beforeNodes), fallback: true } | ||
| } |
There was a problem hiding this comment.
Index treats new walls as stale
Medium Severity
sameIndexedWall compares missing walls with left === right, but the cache lookup returns undefined while the before-state path normalizes absence to null. For any newly created wall ID, that mismatch makes ensureBeforeLevel discard the spatial index and rebuild the whole level, so divider inserts take the fallback path instead of the indexed reconcile the PR is built around.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 7e6bd1d. Configure here.


What does this PR do?
Keeps room walls, generated slabs, and generated ceilings aligned as wall topology changes.
Wall topology
Slabs and ceilings
Scoped reconciliation
Editor behavior
@pascal-app/core; editor tools only apply the resulting atomic scene changes.How to test
bun run check,bun run lint, andbun run check-types.Validation
bun run check,bun run lint, andbun run check-typespass.Checklist
main