feat(editor): make wall drafting and attachments curve-aware - #897
sudhir9297 wants to merge 13 commits into
Conversation
- Add immersive WebXR editor integration and wand bindings - Improve floorplan drawing controls, placement, and wall-height editing - Update node tools, viewer integration, and bundled dependencies
- Deleted multiple obsolete WebXR plugin binaries to streamline the vendor directory and reduce clutter.
- Removed the outdated WebXR plugin files from the vendor directory to streamline the project. - Updated the WebXR plugin path in the editor configuration for local development. - Refactored the editor components to utilize the new WebXR feature gate for improved integration.
- Deleted the WebXR plugin files and references from the editor components to streamline the project. - Updated the configuration and component files to remove obsolete WebXR integration. - Added a new entry to the .gitignore for the failed cache directory.
- Document architectural modeling capabilities and Pascal gaps - Stabilize pre-slice host-child migration coverage
|
I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…). Please try again, rephrase, or reach out if it keeps failing. Error id: 8f826581-0222-443d-b789-b0fec8e67a80 |
- Consolidate spatial and wall-handle drag logic - Remove unused React Three XR dependencies and toolbar plumbing - Add provenance auditing to the open-pr2 workflow
- Generalize wall ownership for plugin-defined child nodes - Register drawing controls and tool overlays through extensions - Preserve exact wall draft lengths across views
| wallId: wall.id, | ||
| position: [clampedX, node.position[1], node.position[2]], | ||
| ...(node.type === 'item' ? { wallT: nextLength > 1e-6 ? clampedX / nextLength : 0 } : {}), | ||
| } as Partial<AnyNode> |
There was a problem hiding this comment.
Wall topology drops generic hosted children
High Severity
Walls now accept any child id and validateWallRelations requires a matching parentId, but getWallAttachmentSpan and remapWallAttachment still only handle doors, windows, and wall-mounted items. A split aborts when any other hosted child is present, and a merge can list children it never remaps, so the following commit fails validation or leaves those children attached to a deleted wall.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 73e607f. Configure here.
…t-items # Conflicts: # packages/core/src/store/actions/node-actions.ts # packages/core/src/systems/wall/wall-topology.ts
There was a problem hiding this comment.
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).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1aa647d. Configure here.
| const primary = views.get(owner) | ||
| const secondary = views.get(owner === '2d' ? '3d' : '2d') | ||
| if (!primary?.finish?.()) return false | ||
| secondary?.afterFinish?.() |
There was a problem hiding this comment.
Split ceiling Enter drops 2D draft
High Severity
In split view, runDrawingControl always invokes the 3D ceiling finish when that function exists and treats a false return as a hard failure. A polygon authored on the 2D pane lives in ceilingDraftPoints, not the 3D tool's points, so Enter does not commit and never falls back to the 2D handler.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 1aa647d. Configure here.
| for (const attachment of wallAttachments(wall, nodes)) { | ||
| const span = attachmentSpan(attachment) | ||
| for (const attachment of getWallAttachments(wall, nodes)) { | ||
| const span = getWallAttachmentSpan(attachment) |
There was a problem hiding this comment.
Plugin wall children block splits
Medium Severity
WallNode.children now accepts any plugin id, and getWallAttachments includes those hosted nodes, but getWallAttachmentSpan only understands doors, windows, and wall items. splitWall returns null on the first unknown attachment, so a wall that hosts a plugin child cannot be split and the attachment is not remapped.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 1aa647d. Configure here.


What does this PR do?
Curve-aware wall geometry and attachments
Strict, migration-safe wall data
Exact wall drafting and shared drawing controls
Stable placement previews
Plugin-owned editor extensions
Provenance-safe PR descriptions
Editor integration maintenance
How to test
Draw walls in 2D, 3D, and split view; type a length and press Enter, then exercise Backspace and Escape.
Create a curved wall with a hosted door, window, or wall item, then split or merge the wall.
Place a ceiling and preview or resize a door/opening.
Run the focused provenance, wall, drawing, ceiling, door, opening, and slab tests:
bun test ./.agents/skills/open-pr2/scripts/provenance-audit.test.ts packages/core/src/schema/nodes/wall.test.ts packages/core/src/store/use-scene-wall-slot-migration.test.ts packages/core/src/systems/wall/wall-curve.test.ts packages/core/src/systems/wall/wall-mitering.test.ts packages/editor/src/components/tools/wall/wall-draft-length.test.ts packages/editor/src/lib/drawing-controls.test.ts packages/nodes/src/ceiling/draft-elevation.test.ts packages/nodes/src/door/renderer.test.tsx packages/nodes/src/shared/opening-width-affordances.test.ts packages/nodes/src/slab/placement-ownership.test.tsRun
bun run checksandbun run build.Screenshots / screen recording
Not added yet.
Checklist
bun devbun checkto verify)mainbranchNote
Medium Risk
Touches core wall topology, scene migrations, and shared keyboard/drafting paths; regressions could affect saved scenes and wall-hosted attachments, though the added tests cover the main geometry and control flows.
Overview
This PR extends wall geometry and topology so curved centerlines use exact arc length, adaptive sampling, and projection helpers; split/merge and miter/junction logic remaps hosted doors, windows, and wall items along those curves instead of straight chords. Wall schema and load paths tighten finite dimensions, normalize legacy geometry and material presets into slots, and validate bidirectional wall–child ownership (including plugin child IDs via generic
children).The editor gains a shared typed wall draft length (2D/3D/split), a drawing-controls registry for Enter/Backspace finish and back across tools, optional tool overlays from node extensions, and ceiling drafts that resolve level-aware height. Door previews apply live overrides without mutating scene data until commit.
OpenPR2 is rewritten around a provenance audit (
provenance-audit.ts) that classifies eligible commits, merge-imported files, overlaps, and reverted work before PR titles and bodies are written; the audit is wired intoskills:validate.Smaller maintenance: Turbopack resolves monorepo packages from the repo root, the environment plugin pin and lockfile update,
.next-failed-cache/ignored, and minor editor typing for wall child IDs in trees/scene data.Reviewed by Cursor Bugbot for commit 1aa647d. Bugbot is set up for automated code reviews on this repo. Configure here.