Door/window/light action-menu buttons with E hint, slab lift on Preview remount, Select building - #982
Merged
Conversation
… 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
|
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
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
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.ActionMenuButtonis extracted with apressedstate 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).FloorElevationSystemnow 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.use-keyboard.ts(now unreachable behind the mechanism route).Tests
bun testforpackages/nodes/src/shared,packages/viewer/src/systems,registry-action-contributionsanduse-keyboardpass.tsgoclean onpackages/editor.Not verified
🤖 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.mechanismwith open/close semantics, door/window icons, and non-persisting open previews (open*/close*helpers exported from the editor). The floating action menu uses a sharedActionMenuButton(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:
FloorElevationSystemapplies 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.