editor: green/red placement box for shelf + tool sync for presets#366
Merged
Conversation
… presets Give the generic move tool a green/red footprint box for shelf placement, matching the GLB item cursor, and drop the vertical-arrow CursorSphere for shelves. Box colour comes from canPlaceOnFloor; an invalid (red) drop is refused unless Shift forces it, and R/T play the rotate sfx. Re-sync the box transform on node change so a re-armed clone isn't left at the previous rotation/position. Extract the box wireframe geometry helpers into a shared placement-box-geometry module reused by the item coordinator and the new declarative PlacementBox component. Export the Tool type so host apps can set the active tool for a positioned preset. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Format files that predate the current biome config (lineWidth 100, single quotes, semicolons as-needed) so they stop showing as dirty on every checkout. Formatting only — no behavior change. Also exclude **/next-env.d.ts from biome: Next regenerates it (double quotes + semicolon) on every build, so biome kept reformatting it into a perpetual dirty diff. Ignoring it lets Next own the file. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Aymericr
pushed a commit
that referenced
this pull request
Jun 3, 2026
…323) Guards every `cursorGroupRef.current` dereference in the placement coordinator against the null window where mitt listeners are live but the `<group>` is unmounted (mount/teardown race) — the EDITOR-BC/BD crash family. `getContext()` falls back to the draft's rotation, so the validation/revalidate path (Shift keys, onKeyUp) is safe; only the cursor *writes* are guarded, so Escape/right-click cancel, Shift reset, leave-state cleanup and transition state still run unconditionally. Also guards `wallPreviewRef` inside `WallTool.stopDrafting()` (the double-click/cancel path that the earlier diff missed). Reimplemented against current main (the original branch conflicted with #366 and used over-broad handler guards that silently dropped cancel/Shift). Verified: `tsc -p apps/editor` clean, biome clean on touched files.
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?
Adds an item-style green/red footprint box to the generic move tool for shelf placement, replacing the vertical-arrow cursor, plus a few correctness fixes around positioned-preset placement.
MoveRegistryNodeToolnow renders aPlacementBox(instead ofCursorSphere) when moving a shelf. Box colour comes fromcanPlaceOnFloor— green = placeable, red = overlaps a floor item. An invalid (red) drop is refused unless Shift is held to force it, matching the GLB item tool.R/Trotate the shelf + box together and now play the rotate sfx (sfx:item-rotate).nodechange, so a re-armed clone (or a different selection) no longer keeps the previous rotation/position until the next keypress.Tooltype from the package entry so host apps can set the active tool for a positioned preset (drives the build cursor badge icon).placement-box-geometrymodule reused by both the item placement coordinator and the new declarativePlacementBoxcomponent — no behaviour change to item placement.Also a separate
chorecommit: applies biome formatting to files that predated the current config (lineWidth 100 / single quotes / semicolons-as-needed) so they stop showing dirty, and excludes the Next-generated**/next-env.d.tsfrom biome (Next rewrites it every build, so biome kept reformatting it into a perpetual diff).Note: the catalog auto-select +
placePresetSubtreeflow that arms these placements lives in the downstream community app, not this repo.How to test
bun devand open the standalone editor.Screenshots / screen recording
Visual change — the green/red footprint box replaces the vertical-arrow cursor when moving a shelf.

Checklist
bun devbun checkto verify)mainbranch