Openings get descriptions: zone is the keyword, this is the sentence
Eric's ask. Free text on any opening ("tall bookcase by the window —
kids reach the bottom rows"), edited in the opening settings sheet,
shown under the sheet's title, and surfaced as the cell's hover title
on the wall diagram. Stored in furniture.json like everything else.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016jXZFSTZQKzAC8fqpWSz9g
This commit is contained in:
co-authored by
Claude Fable 5
parent
a23b97d2f9
commit
ce4b0e09d4
@@ -800,3 +800,23 @@ def test_reunification_outranks_tightest_fit_and_full_shelves_stop_lying(tmp_pat
|
||||
exp = next(g for g in state["unshelved"] if g["name"].endswith("Tower"))
|
||||
first = exp["suggestions"][0]
|
||||
assert first["id"] == ids["A1"] and first["reunites"] is True
|
||||
|
||||
|
||||
def test_opening_descriptions_round_trip(tmp_path):
|
||||
web, cfg = _web(tmp_path, {})
|
||||
web.post("/api/furniture/add-unit", json={"name": "Den"})
|
||||
web.post("/api/furniture/add-openings", json={"unit": "Den", "label": "top"})
|
||||
oid = web.get("/api/shelves").json()["units"][0]["openings"][0]["id"]
|
||||
web.post(
|
||||
"/api/furniture/edit-opening",
|
||||
json={
|
||||
"id": oid,
|
||||
"description": "tall bookcase by the window",
|
||||
},
|
||||
)
|
||||
opening = web.get("/api/shelves").json()["units"][0]["openings"][0]
|
||||
assert opening["description"] == "tall bookcase by the window"
|
||||
import json as _json
|
||||
|
||||
saved = _json.loads(cfg.furniture_path.read_text())["units"][0]["openings"][0]
|
||||
assert saved["description"] == "tall bookcase by the window"
|
||||
|
||||
Reference in New Issue
Block a user