Units get descriptions too — both levels of the furniture speak

Eric's correction: the opening-level description shipped, but the
unit deserved one as well (my own example sentence was unit-scale
prose). Units take a description at creation and edit it in place —
a linkish add/edit control under the unit's name with an inline
input — shown as quiet meta text on the card and stored in
furniture.json. Label addresses, zone matches, descriptions explain;
now at both scales.

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 14:30:58 -04:00
co-authored by Claude Fable 5
parent ce4b0e09d4
commit e58cc789f3
4 changed files with 79 additions and 3 deletions
+20
View File
@@ -820,3 +820,23 @@ def test_opening_descriptions_round_trip(tmp_path):
saved = _json.loads(cfg.furniture_path.read_text())["units"][0]["openings"][0]
assert saved["description"] == "tall bookcase by the window"
def test_unit_descriptions_round_trip(tmp_path):
web, cfg = _web(tmp_path, {})
web.post(
"/api/furniture/add-unit",
json={"name": "Den", "description": "the wall behind the couch"},
)
assert (
web.get("/api/shelves").json()["units"][0]["description"]
== "the wall behind the couch"
)
web.post(
"/api/furniture/edit-unit",
json={"name": "Den", "description": "now in the study"},
)
import json as _json
saved = _json.loads(cfg.furniture_path.read_text())["units"][0]
assert saved["description"] == "now in the study"