Skip to content

Door/window/light action-menu buttons with E hint, slab lift on Preview remount, Select building - #982

Merged
wass08 merged 2 commits into
mainfrom
feat/door-window-mechanism-slab-preview
Sep 30, 2026
Merged

wass08 merged 2 commits into
mainfrom
feat/door-window-mechanism-slab-preview

Conversation

@wass08

@wass08 wass08 commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • Doors and windows declare capabilities.mechanism: the action menu shows Open/Close with their own glyphs (door, panel-top) instead of Play/Stop. E runs the same mechanism, so it now previews the open state and no longer saves it or adds an undo entry (the saved default is still set in the door panel). Windows without an operable type show no button.
  • Action menu tooltips: ActionMenuButton is extracted with a pressed state and reused by the mechanism button and the light toggle, so both show the E key hint. The light button only shows E when E really toggles the light (no mechanism on the item).
  • Preview slab bug: entering Preview mounts fresh meshes at base Y, and no dirty mark follows, so items on a slab (e.g. the 0.206 porch slab) dropped to 0. FloorElevationSystem now applies the lift once when a floor-placed mesh first appears in the registry. Reproduced on a local import of the affected project: Y 0.206 → 0 in Preview before, held after.
  • Select building: the multi-selection panel gets a Select building button when the selection is everything selectable on the level. It selects the building itself (no level), so its floating Move pill appears. Wraps into two rows.
  • Removed the dead door/window E branches in use-keyboard.ts (now unreachable behind the mechanism route).

Tests

  • bun test for packages/nodes/src/shared, packages/viewer/src/systems, registry-action-contributions and use-keyboard pass.
  • tsgo clean on packages/editor.
  • No regression test for the per-frame lift (needs a real scene); verified with Playwright against the local project.

Not verified

  • Prod build, and the 2D / split views for Select building.
  • Door E behaviour change (preview instead of save) — flagging in case saving was relied on.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VMczFMfWJtZDbBdTARy88m


Note

Medium Risk
E and mechanism actions now preview open state without persisting or undo—behavior change for doors/windows. Floor elevation runs on registry remount, touching viewer positioning for slab-placed items.

Overview
Doors and windows now register capabilities.mechanism with open/close semantics, door/window icons, and non-persisting open previews (open* / close* helpers exported from the editor). The floating action menu uses a shared ActionMenuButton (with E tooltips and pressed styling) so mechanism toggles show Open/Close instead of Play/Stop; item light toggles only show E when no mechanism owns that key.

E in the keyboard hook no longer special-cases door/window types—it goes through the same registry interaction path as other kinds. Walkthrough ray-picking treats doors/windows as already covered by their own interactable resolvers so generic mechanism targets don’t double-hit them.

Preview / viewer: FloorElevationSystem applies slab lift when floor-placed meshes first appear after a registry rebuild (fixes items dropping to base Y when entering Preview).

Multi-select: when the selection is every selectable object on the level, the panel adds Select building to jump to building-level move.

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

… lift on remount, select-building action

- doors and windows declare capabilities.mechanism (Open/Close with their own glyphs); E routes through it
- ActionMenuButton extracted with pressed state; light toggle and mechanism buttons show the E key
- FloorElevationSystem lifts floor-placed meshes when they first mount (Preview remount left them at base Y)
- multi-selection panel: Select building when the selection is everything on the level

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VMczFMfWJtZDbBdTARy88m
@pascal

pascal Bot commented Sep 30, 2026

Copy link
Copy Markdown

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: 06a1c6cc-d19d-4cb6-9492-56bf8a9763f7

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VMczFMfWJtZDbBdTARy88m
@wass08
wass08 merged commit 606692a into main Sep 30, 2026
4 checks passed
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