Files
editor/packages
Wassim SAMADandClaude Opus 4.7 df07f7bcb2 SelectionManager: route item to furnish phase before registry fallback
User report: items needed a double click to select after the item kind
registered (Phase 5). Root cause: `getSelectionTarget` checked
`isRegistrySelectable(node.type)` as part of the FIRST branch (which
routes to structure phase), matching `item` before the item-specific
branch below could route door/window-category items to structure +
everything else to furnish.

Effect: clicking an item triggered phase switch (structure ← furnish),
then the next click selected. Hence the double click.

Fix:
 1. Item-specific case moved to the TOP of getSelectionTarget. Its
    asset.category-driven routing (door/window items → structure;
    everything else → furnish) beats any generic registry fallback.
 2. Generic registry fallback at the bottom now reads `def.category`
    to pick the phase — `category: 'furnish'` → furnish phase,
    everything else → structure/elements. Future furnish-category
    kinds (only shelf right now) route correctly without a special
    case.
 3. `isRegistrySelectable(node.type)` clause removed from the
    structure branch — replaced by the def.category check at the
    bottom.

Net: single-click selection works for items again, and the routing
logic is now cleanly capability/category-driven instead of "all
registered kinds → structure" which was a Stage A simplification
that broke as soon as a furnish-category kind registered.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 15:29:06 -04:00
..
2026-01-21 10:03:29 +09:00
2026-02-05 08:35:09 +09:00
2026-02-26 22:09:40 -05:00