Files
houseplan-card/demo
Claudeandclaude[bot] 5fddc75514 fix(space-card): key markers and opening symbols by space and id (#764)
(iconDevs.map) and opening symbols (resolvedHosted.map) were still bare
map() calls. The card takes the full cardStyles, so `.device-core`
(background/color 0.15 s), `.device-shell-frame` (border-color) and the
door `.op-leaf`/`.op-arc` (0.6 s) transition, and Lit's positional reuse
turned a list change into an animation of something that never happened.

Measured on dev with a browser witness (one card element, doors on a
partition in both spaces, neighbours in different states):
- setConfig f1 -> garden: 4 nodes outlive the switch (closed door
  hp764-g-shut drawn in frame 0 at f1's open angle, matrix(0,-1,1,0); the
  same-id door hp764-shared in f1's closed state; mower and gate start in
  the ceiling light's orange), 16 transitionrun, 39/65 frames off-final.
- config push (a door inserted first, the first marker hidden): 11 nodes
  handed to a neighbour, 35 transitionrun, 38/68 frames off-final.

Both lists are now keyed(space.id, repeat(..., id, ...)), the shape of the
full card (#525/#534) and of the rooms (#745). The outer key makes a door
with the same id on another floor a new object; an id-less opening keys by
its index. The transitions stay: a real contact or light change on the same
object still animates on the same node, and the witness asserts it (catches
a `transition: none` fix). The #742/#745 note in plan.styles.ts now names
these lists too.

Witness: demo/smoke_space_card_identity.mjs (new, linked in smoke-links to
src/space-render.ts). It samples computed styles per frame and compares
each object to its settled look, not just DOM ids (#528). Red on dev as
above, green after: 0 transitions, 0 frames off-final, 0 reused nodes.
Mutants (checked by hand, each red on its own case): markers by map() and
openings by map() (config push), openings without the space key (same-id
door on setConfig). The marker space key has no observable case here, as
device ids are global; it is kept for parity with #534.

Issue: #764
User-Visible: yes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018qZfe7YS4rqEMKoVeS3GKd
2026-10-07 00:16:20 +00:00
..
2026-08-07 07:47:37 +03:00