fix: restore wall plane-bound defaults (draft, panel, self-heal) - #630
Merged
Conversation
The terrain drafting flow stamped the ghost's explicit height and a supportOffset onto every wall whose frozen construction plane sat above y=0 — i.e. any wall started on a slab or deck, not just ground-hosted terrain chains. Such walls stopped following the level height and no longer re-elected their base from slab support. Gate the stamping on a ground-drafted plane (the terrain exception), and re-resolve the aimed support surface per commit for non-ground chains so a later segment still elects the slab it visibly crosses instead of being capped at the first click's elevation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Top: "Follows level" (no explicit height, shows the resolved height) vs "Custom height" (seeded from the effective height so geometry doesn't jump on detach). Bottom: the terrain infill toggle no longer materializes an explicit height, so toggling it can't silently detach the wall top from the storey plane. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pointing at bare ground freezes a GROUND construction plane, and the commit path treated every ground-preferred draft as a terrain chain: stamped ghost height, persisted ground host, election capped at the draft plane. On flat ground (no sculpted terrain) all three are wrong — the wall showed "Custom height 2.50" instead of following the level, and a slab drawn later could never lift it, leaving the wall buried in the slab (z-fighting band at the base). Gate the terrain exception on terrainSupportLift(): ground-preferred drafts with no terrain support drop their draft options entirely and commit plane-bound. The terrain-freeze test now seeds a real terrain field; a new regression test pins the flat-ground shape. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…toggle Switching Top back to "Follows level" only cleared the stored height, so regression-era walls (stamped ground host + draft offset) kept their base pinned at the level floor, still buried in any slab. The toggle now also drops the draft offset, and drops a ground host when no sculpted terrain supports it — giving existing broken walls a one-click repair. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The follows-level toggle repairs regression-era walls, but walls whose Bottom already displays "Auto" while secretly ground-pinned had no clickable path that kept their custom height — the pin isn't reflected in the control, and the base stayed buried in the slab (z-fighting its side faces). "Auto" now performs the same re-election repair (drop the draft offset, drop a terrain-less ground host), and the segmented control fires on already-selected clicks, so clicking "Auto" itself heals the wall. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Regression-era walls carry supportSlabId 'ground', which short-circuits slab election: the base stays at the level floor, buried in the room slab and z-fighting its side faces, while the panel truthfully-but- uselessly displays the base as automatic. Users shouldn't have to click anything: the load-time canonicalization now strips the pin (and draft offset) when the un-pinned election would land the wall on a slab its base is currently embedded in. Deliberately narrow so the one legitimate flat-scene ground pin survives: a wall kept on the ground under a hovering deck is not buried (the deck's occupied interval sits above the base) and keeps its pin, and scenes with sculpted terrain are skipped wholesale — the pin is load-bearing there and the live terrain field isn't visible to this pure, authority-shared pass. Co-Authored-By: Claude Fable 5 <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 85c9229. Configure here.
| ? { supportSlabId: undefined } | ||
| : {}), | ||
| } | ||
| } |
There was a problem hiding this comment.
Repair clears terrain wall offsets
Medium Severity
wallBaseRepairPatch always clears supportOffset, even when it keeps a terrain-backed supportSlabId of ground. Clicking already-selected Bottom Auto (or Top Follows level) therefore drops the frozen construction offset on legitimate terrain-drafted walls, so the base jumps while the ground host remains.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 85c9229. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What does this PR do?
Fixes the fallout of the terrain-sculpt regression (#564-era) that detached walls from the plane-bound vertical model, across three layers:
createWallOnCurrentLevelno longer stamps the draft ghost'sheight/supportOffset/ground host onto walls drawn on flat ground or on slabs. Stamping is gated on drafted ground intent with sculpted terrain actually present (the terrain exception), so every other wall commits plane-bound: no stored height, top at the storey plane, base re-elected from slab support. Non-ground chains re-resolve the pointed surface per commit forsupportCap.Includes 2 drafting regression tests and 5 canonicalization tests. Suites: core 1004, nodes 944, editor 600 — green;
turbo check-types10/10.How to test
bun dev, open a project, draw a slab, then draw a wall on it with the 3D wall tool. Select the wall: Top should read "Follows level" and the persisted node should have noheight/supportOffset/supportSlabId.supportSlabId: "ground"+ stampedheight, buried in a room slab). On load the pin is stripped and the base lands on the slab, keeping the custom height.Screenshots / screen recording
N/A — validated via before/after base close-ups during development (z-fight band at the wall base gone once the ground pin is stripped); happy to attach a clip on request.
Checklist
bun devbun checkto verify)mainbranchNote
Medium Risk
Changes serialized wall vertical fields, load-time migration shared by editor and authority, and commit-time drafting behavior—high user visibility but narrow rules and solid test coverage.
Overview
Restores the plane-bound wall vertical model after terrain-sculpt-era regressions that stamped draft ghost data (
height,supportOffset,supportSlabId: 'ground') onto walls that should stay storey-bound.Drafting —
createWallOnCurrentLevelonly freezes construction plane/height when the chain is a ground draft on sculpted terrain; flat ground and slab starts commit without stored height, offset, or ground host. The 3D wall tool re-resolves the pointed support surface on each segment commit except ground-hosted chains.Load migration —
migrateVerticalSceneNodesstrips terrain-less ground pins (and draft offsets) when slab election would bury the wall base in a floor slab; skips sculpted-terrain sites and preserves pins under hovering decks.Wall panel — Top is “Follows level” vs “Custom height”; Bottom is “Auto” vs “Fill to terrain”. Toggling back to storey/auto applies
wallBaseRepairPatchto clear bogus offsets and ground hosts without terrain support.Reviewed by Cursor Bugbot for commit 85c9229. Bugbot is set up for automated code reviews on this repo. Configure here.