Duplicate a unit: describe the furniture once, stamp out the rest

Eric's ask. duplicate-unit clones the STRUCTURE — openings with their
sizes, zones, and descriptions, under fresh ids and the first free
"<name> 2"-style name — never the game assignments. And because a
copy immediately wants a real name, units gained rename: opening ids
are stable through it so locations and export URLs never notice, and
a rename-only edit no longer risks wiping the description (the body
field learned the None-means-leave-alone convention). Tests pin the
disjoint ids, the empty copy, the numbering past taken names, and
the wipe-nothing rename.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016jXZFSTZQKzAC8fqpWSz9g
This commit is contained in:
Eric Wagoner
2026-08-09 15:10:47 -04:00
co-authored by Claude Fable 5
parent e90a53fb6c
commit 10f99e23f5
6 changed files with 224 additions and 5 deletions
+46
View File
@@ -120,6 +120,52 @@
}
],
"description": "Centerpiece of the game wall in the library"
},
{
"name": "Library Right Shelving",
"description": "To the right of the Kallax",
"openings": [
{
"id": "library-right-shelving-a1",
"label": "A1",
"zone": "",
"width_in": 23.25,
"height_in": 10.25,
"depth_in": 9.5
},
{
"id": "library-right-shelving-b1",
"label": "B1",
"zone": "",
"width_in": 23.25,
"height_in": 10.25,
"depth_in": 9.5
},
{
"id": "library-right-shelving-c1",
"label": "C1",
"zone": "",
"width_in": 23.25,
"height_in": 10.25,
"depth_in": 9.5
},
{
"id": "library-right-shelving-d1",
"label": "D1",
"zone": "",
"width_in": 23.25,
"height_in": 10.25,
"depth_in": 9.5
},
{
"id": "library-right-shelving-e1",
"label": "E1",
"zone": "",
"width_in": 23.25,
"height_in": 10.25,
"depth_in": 9.5
}
]
}
]
}