Repository navigation
[Maintainer] Leave vertical routing after a riser drawn from a collar - #1242
Conversation
The collar inspectors' "Draw from" handlers move next to the existing continuation starters, so the collar start can be exercised without rendering the inspector.
The first section follows the collar's axis and takes its grade; a chosen grade that cannot meet the collar is refused with the grade message, not the fitting-clearance one, and later sections take the chosen grade.
Drawing from a collar that points up or down sets Route to Vertical. After the riser reached the target elevation, the next vertical section aimed at the riser's own top, so every click was refused until the route or target changed. A committed riser out of a fixed collar now switches the pipe and duct tools to the plan route; a vertical route chosen from a pipe or duct end is left alone. Reported by Cursor Bugbot on #1236 ("Vertical collar draw blocks next segment").
The level first section and the 2% section after it meet directly; the only fitting is the end cap on the open end.
The switch to the plan route applies only to risers out of a fixed collar; a vertical route chosen while drawing from a pipe or duct end stays on for the next riser.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
[Maintainer] Tooling re-review requested (@Aymericr) at Your static LGTM on #1236 (review) covered At this SHA, CI's Changed paths, quality and cli-smoke jobs passed, and Cursor Bugbot and Codex's code review reported no findings. |
Aymericr
left a comment
There was a problem hiding this comment.
LGTM at 5a20e28
Maintainer — reviewed the full seven-file diff, all three new integration tests, the surrounding routing/commit code, and all returned review/conversation comments. No blocking findings.
- #1236 Bugbot Medium (vertical collar draw blocks the next segment): fixed. Only after a successful fixed-collar riser commit does the pipe tool switch to Plan route and the duct tool to Horizontal; the next section starts at the new run end rather than targeting the riser's existing height. Pipe preview-only calls and refused commits do not switch modes.
- Normal vertical routing is preserved: pipe-segment starts do not satisfy startCollar, and duct-segment/duct-fitting starts are explicitly excluded (as are promoted-fitting starts). Both riser tests assert the horizontal continuation and then explicitly select Vertical at the new run end, place another riser, and assert the mode remains Vertical.
- Inspector-handler extraction preserves the original defaults/selection/tool activation behavior. The third test pins fixed-collar axis alignment, grade-conflict refusal wording, and subsequent graded continuation without a bend.
- Codex reports no findings at this exact head; Cursor Bugbot succeeded. No inline review threads or prior reviews were returned for #1242.
- No auth, payments, or secrets changes.
Exact-head CI: Changed paths, quality, cli-smoke and Cursor Bugbot all completed successfully. No legacy commit statuses are published (the legacy API's empty rollup says pending, not an actual pending check). GitHub reports mergeable=true, mergeable_state=clean. Head rechecked immediately before posting and unchanged.
Static review only: tests read, not rerun.
What does this PR do?
Follow-up to #1236, which @Aymericr merged as
3a972b68from headbbe4b501. #1236 ported @sudhir9297's connected duct and pipe editing from #1115, and #1237, #1238 and #1240 followed it. This PR fixes the one Bugbot finding still open on #1236's merged head. It also adds a test for the collar-start behaviour behind two other Bugbot threads there.f0977ddd; Bugbot Medium "Vertical collar draw blocks next segment").main, the cursor then reads "Target elevation: … · click or Enter to place" next to "Run must be at least 0.05 m" (0.08 m for ducts), and clicks place nothing until Route or the target changes.5a20e28ctests this).466f46f8).activatePipeCollarContinuationandactivateDuctCollarContinuation, in each kind'scontinuation.ts, hold the inspector buttons' code unchanged. Tests can now start a collar draw without rendering the inspector.d8c5cb2d,1a250ac0). This behaviour is what Bugbot's High "Fixture start clears chosen waste grade" and Medium "Snapped grade connect fails with wrong message" describe. Both are answered on [Maintainer] Connected duct and pipe editing, ported from #1115 #1236 with no code change:The collar draw these changes touch is @sudhir9297's work from #1115. Next owner: Maintainer.
How to test
main, Route stays Vertical and clicks place nothing.Automated checks:
bun run cipassed locally onf0977ddd(exit 0). The two commits after it, up to this head (5a20e28c), only add assertions to the new test file. Biome and the whole nodes suite (5,340 pass, 0 fail) were run again on this head.5a20e28c, CI's Changed paths, quality and cli-smoke jobs passed.mcp-cidoesn't run because no MCP paths changed. Cursor Bugbot passed, and Codex's code review completed; neither reported findings.shared/collar-draw.test.tsx. They mount the real pipe and duct tools and drive them with plan-view pointer events.main's tools. It fails if the free end stops following the collar axis, or if the start keeps the chosen grade. It also fails if the refusal shows the fitting-clearance message instead of the grade message, or if the graded section gets a bend.Screenshots / screen recording
Both images start the same way: select the P-trap, click the Inlet's "Draw from collar", click once to place the riser, then move the pointer to the right. They were captured in the local editor (
bun run devinapps/editor, with the nodes package built from this branch). For the before image, the four lines this PR adds to the pipe tool were removed from that build, which leavesmain's pipe tool. The duct tool's change isn't pictured; its test covers it.Before (
main): Route is still Vertical after the riser, and the preview stays on the riser's top. The run readout falls outside this camera view; it reads "L 0m … Target elevation: 1.58 m · click or Enter to place · Run must be at least 0.05 m".Before: Route stays Vertical after a riser drawn from the trap inlet
After: Route reads "Plan route", and the preview runs across from the riser's top to the pointer.
After: Route switches to Plan route and the next section follows the pointer
The before image's target field shows
1.5800100000000001becausemaindisplays the collar height plus 1 m unrounded. This PR doesn't change that.Checklist
bun devbun checkto verify)mainbranchTo show artifacts inline, enable in settings.
Note
Low Risk
Localized editor tool-default and continuation UX changes in pipe/duct drawing, with new integration tests and no auth or data-layer impact.
Reviewed by Cursor Bugbot for commit 5a20e28. Bugbot is set up for automated code reviews on this repo. Configure here.