Register 'shelf' in selection managers (5 arrays + 1 type union)

Shelf renderer was emitting `shelf:click` / `shelf:enter` / `shelf:leave`
via useNodeEvents from the previous commit, but no listener subscribed
— the SelectionManager components (one in editor, one in viewer) each
maintain hardcoded allTypes arrays that didn't include 'shelf'.

Adds 'shelf' to:
- editor/selection-manager: 5 allTypes arrays (one per selection strategy
  — structure, structure-hover, furnish, site, deselect-also-listens-to).
- viewer/selection-manager: the SelectableNodeType union + allTypes
  array.

Shelves can now be clicked / hovered in the 3D canvas and the
selection state updates correctly.

The hardcoded arrays are exactly the kind of cross-cutting friction
the registry is supposed to eliminate. Phase 4 should derive these
lists from `nodeRegistry.entries().filter(d => d.capabilities.selectable)`
so adding a new kind doesn't require editing two files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Wassim SAMAD
2026-05-14 15:05:22 -04:00
co-authored by Claude Opus 4.7
parent d17e083c77
commit 857ddd4d95
2 changed files with 7 additions and 0 deletions
@@ -576,6 +576,7 @@ const SELECTION_STRATEGIES: Record<string, SelectionStrategy> = {
'roof-segment', 'roof-segment',
'stair', 'stair',
'stair-segment', 'stair-segment',
'shelf',
'spawn', 'spawn',
'window', 'window',
'door', 'door',
@@ -1012,6 +1013,7 @@ export const SelectionManager = () => {
'roof-segment', 'roof-segment',
'stair', 'stair',
'stair-segment', 'stair-segment',
'shelf',
'window', 'window',
'door', 'door',
'zone', 'zone',
@@ -1183,6 +1185,7 @@ export const SelectionManager = () => {
'roof-segment', 'roof-segment',
'stair', 'stair',
'stair-segment', 'stair-segment',
'shelf',
'spawn', 'spawn',
'window', 'window',
'door', 'door',
@@ -1334,6 +1337,7 @@ export const SelectionManager = () => {
'roof-segment', 'roof-segment',
'stair', 'stair',
'stair-segment', 'stair-segment',
'shelf',
'spawn', 'spawn',
'window', 'window',
'door', 'door',
@@ -1408,6 +1412,7 @@ export const SelectionManager = () => {
'roof-segment', 'roof-segment',
'stair', 'stair',
'stair-segment', 'stair-segment',
'shelf',
'spawn', 'spawn',
'window', 'window',
'door', 'door',
@@ -35,6 +35,7 @@ type SelectableNodeType =
| 'door' | 'door'
| 'column' | 'column'
| 'item' | 'item'
| 'shelf'
| 'slab' | 'slab'
| 'ceiling' | 'ceiling'
| 'roof' | 'roof'
@@ -338,6 +339,7 @@ export const SelectionManager = () => {
'fence', 'fence',
'item', 'item',
'column', 'column',
'shelf',
'slab', 'slab',
'ceiling', 'ceiling',
'roof', 'roof',