Skip to content

fix: hidden walls no longer swallow pointer events - #683

Merged
Snoopy147 merged 1 commit into
mainfrom
fix/outlets-hidden-wall-clicks
Aug 19, 2026
Merged

fix: hidden walls no longer swallow pointer events#683
Snoopy147 merged 1 commit into
mainfrom
fix/outlets-hidden-wall-clicks

Conversation

@Snoopy147

@Snoopy147 Snoopy147 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

While the viewer's wall mode hides walls (X-ray plugins set 'down'), each wall keeps a full-height invisible raycast mesh whose pointer handlers still fire and stopPropagation — clicks aimed at visible objects behind them hit the phantom wall instead (measured: a click meant for a device box at 3.93m was captured by an invisible wall at 1.03m), silently selecting walls and even arming accidental wall moves that then trigger zone/slab auto-sync mutations.

Fix: WallCutout stamps userData.wallHidden; the wall renderer's pointer handlers early-return while hidden (no emit, no stopPropagation) so the R3F raycast continues to the real target. Delete-mode is excepted (hidden walls must stay deletable).

Found by the Bones movable-outlets track (night-5 D4) — the same phantom-click class already affects service-point interaction in prod today.

🤖 Generated with Claude Code


Note

Medium Risk
Changes core viewer pointer/selection behavior for walls; scope is narrow with an explicit delete-mode exception and translucent walls unchanged.

Overview
Fixes phantom wall selection when walls are drawn invisible (X-ray down, cutaway, auto interior partitions) but their hidden collision mesh still intercepts clicks meant for wall-mounted plugins or items behind them.

WallCutout now sets userData.wallHidden on each wall mesh when it is hidden and not in translucent mode (translucent walls stay interactive). The wall renderer wraps useNodeEvents so those handlers no-op while wallHidden is true—no emit and no stopPropagation, so R3F can hit the next intersection. Delete mode is unchanged: hidden walls still receive events for the delete-invisible hover flow.

Reviewed by Cursor Bugbot for commit c40d7fd. Bugbot is set up for automated code reviews on this repo. Configure here.

A wall hidden by the wall-mode pass ('down' mode, cutaway-hidden faces,
auto-mode interior-interior partitions) still raycasts at full height via
its invisible collision mesh, and the selection path stopPropagation's on
it — so clicks aimed at VISIBLE objects standing behind the hidden wall
(wall-mounted plugin device/service boxes in X-ray mode, items) select an
invisible wall instead. Night-5 evidence: arming a receptacle drag on the
demo scene's south wall selected wall_x86… two meters in front of it
(raycast hit at 1.03m vs the device at 3.93m), and the follow-up click
committed an accidental WALL move plus its auto slab/ceiling/zone sync.

WallCutout now stamps userData.wallHidden with the effective hide state,
and the wall renderer's pointer handlers early-return (no emit, no
stopPropagation) while it's set — R3F continues to the next intersection,
so hover/select/click pass through to whatever the user actually sees.
Delete mode keeps the events: hidden walls stay hover-targetable for the
deleteInvisible highlight flow.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Snoopy147
Snoopy147 merged commit 3009c67 into main Aug 19, 2026
3 checks passed
@Snoopy147
Snoopy147 deleted the fix/outlets-hidden-wall-clicks branch August 19, 2026 06:16
Snoopy147 added a commit that referenced this pull request Aug 19, 2026
… tee guards, examiner fixes (#684)

- Movable outlets default ON: every receptacle/switch drags like a
  door with exact single-undo (the drag-commit cascade that woke
  space-detection mid-commit is gone; pairs with #683's
  pointer-transparent hidden walls).
- Tee-junction guards: parallel-wall false tees filtered, width-aware
  oblique retreats in all three consumers, junction honesty warnings.
- Blueprint examiner round: circuit legend never truncates (second
  column), condensers tagged CU (not AH), GEN color walk no longer
  wraps into the lighting band.
878 plugin tests, tsc clean.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant