feat(editor): streamline connected pipe and duct drafting - #827
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>
… github.com:pascalorg/editor
# Conflicts: # packages/editor/src/components/editor/handles/handle-arrow.tsx # packages/editor/src/components/editor/index.tsx
- Split pipe runs around inline fittings with preserved connections - Improve run snapping, marquee selection, and rotation shortcut ownership
- Add screen-space projection data for cross-view snapping - Use registry scene APIs for atomic node changes and selection
- Update mated duct and pipe end caps as endpoints move - Cache shared handle geometry and materials - Remove redundant connection and snap labels
- Preserve ray and arrow dimensions while using unit-sized shared geometry
|
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: 5fb60cef-242c-4154-953c-ef3bb7058e8b |
|
Addressed all Cursor Bugbot findings in
Validation:
Cursor Bugbot's follow-up check completed as skipped and reported no additional findings. |
…-foundation # Conflicts: # bun.lock # packages/nodes/package.json
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 45e353f. Configure here.
| { node: fitting, parentId }, | ||
| { node: runTail, parentId }, | ||
| ], | ||
| }) |
There was a problem hiding this comment.
Inline split orphans run end caps
High Severity
Inserting a fitting splits the run into a shortened original and a new tail, but automatic end-cap metadata still names the original run and its end. The cap stays on the tail visually, so later endpoint drags, connections, or cap cleanup act on the wrong node.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 45e353f. Configure here.
| ) | ||
| return [euler.x, euler.y, euler.z] as Point | ||
| })(), | ||
| }) |
There was a problem hiding this comment.
Inserted coupling keeps wrong outlet
Medium Severity
Inline placement copies the run’s diameter onto the fitting but leaves diameter2 at the catalog template size. A coupling or inline cleanout on a different-sized pipe becomes a tapered fitting while the tail stays the original diameter.
Reviewed by Cursor Bugbot for commit 45e353f. Configure here.
| ) | ||
| const capUpdates = endCapUpdates(nextPath) | ||
| const capIds = new Set(capUpdates.map((update) => update.id)) | ||
| return [...updates.filter((update) => !capIds.has(update.id)), ...capUpdates] |
There was a problem hiding this comment.
Floor-plan drag skips end-cap undo
Medium Severity
The 2D path-point session snapshots only the run and declared connectivity IDs, and followUpdates returns no cap writes when connectivity is null. End-cap follow can run without being snapshotted, so cancel and undo restore the pipe but leave the cap at the dragged pose.
Reviewed by Cursor Bugbot for commit 45e353f. Configure here.


What does this PR do?
Pipe and duct connection snapping
Run direction controls
Inline pipe fittings
Automatic run end caps
Pool plumbing workflows
Portable CLI runtime size
cli-smokeover its compressed-size limit.Run selection and hanger controls
System checks panel
WebGPU handle stability
Plugin-facing tool boundaries
How to test
Run
bun install --frozen-lockfile, then runbun devand open the editor athttp://localhost:3002.Draw a DWV pipe or duct near an existing open socket in both 3D and floor-plan views.
Start a run and choose diagonal, wall-plane, or vertical directions with the guides and keyboard controls.
Choose a compatible pipe fitting, hover it over the middle of a straight pipe, and click.
Draw a free pipe and duct, then drag either endpoint.
Create pools with different supported outlines and automatically connect inlets, skimmers, and drains.
Box-select across pipe and duct runs, then open System checks from a selected distribution item.
Repeatedly select, resize, and draw items while using WebGPU rendering.
Run the automated checks.
bun run lint,bun run check-types, andbun run buildshould pass.cli-smokeworkflow should pass with a 107.6 MB compressed artifact.Screenshots / screen recording
Not added yet.
Checklist
bun devbun checkto verify)mainbranchNote
Medium Risk
Touches scene mutation paths (atomic applyChanges, end caps, inline pipe splits) and cross-package drafting APIs; regressions could affect MEP editing and portable CLI size gates.
Overview
Wires the pool plugin into the editor (discovery, host panel, transpile, vendored tarball) and hardens builtin plugin loading so HMR cannot re-register duplicate node kinds against the persistent registry.
Pipe and duct drafting gets screen-space port snapping (including floor-plan
screenProjectionon grid events), length grid snapping, Tab direction cycling, H for hanger mode via shared run-hanger state, and leaner run cursors (no inline hanger/preset HUD). Planners commit through registrySceneApiwith explicit scene snapshots instead of globaluseScenereads. Automatic end caps are added on free ends, removed when extending through them, and follow endpoint drags in 3D and floor-plan affordances.Inline pipe fittings (coupling/reducer/inline cleanout) can split a run on body snap with atomic create/update. Box/marquee selection transforms position-based footprints (
marqueePolygon) so moved pools select correctly.Editor UX fixes: handle hit areas respect
placementDragModewithout per-frame raycast swaps; geometries/materials are cached for WebGPU stability; R/T rotation is not stolen when the item tool is armed without a catalog selection; continuation handles hide while a pipe vertex cluster is open.CLI packaging drops staged
apps/editor/vendorafter bundle and raises the compressed smoke budget to 110 MB.Reviewed by Cursor Bugbot for commit 45e353f. Bugbot is set up for automated code reviews on this repo. Configure here.