No placebo buttons: accept-overhang only offered when it would help
Eric clicked accept-overhang on two boxes in a Kallax cube and got an "overhang ✓" pill with no lane behind it. The cube's flat pile claims 11.7 of 13.25 inches of width, leaving 1.55 inches of standing lane — acknowledging waives depth and height, never width, so nothing changed. That opening is overfull, not overhung, and the button was a placebo. The sheet now probes before offering: a laneless resident gets the accept button only when acknowledging would actually land it a lane; otherwise it's marked "no room" with the honest tooltip. Acknowledged boxes that DID land show "▮ standing, proud" (their lane isn't flippable — proud of the shelf is the whole point), plus the retractable "overhang ✓". Verified against the live wall: the three Etherfields monoliths on the tower's big row read standing-proud, the squeezed cube residents read no-room, zero page errors. 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
7d7d3bb8da
commit
f0cf4ec271
@@ -1095,3 +1095,64 @@ def test_import_acknowledge_column(tmp_path):
|
||||
"lane": "standing",
|
||||
"acknowledged": True,
|
||||
}
|
||||
|
||||
|
||||
def test_ackable_only_when_it_helps(tmp_path):
|
||||
"""The accept-overhang button is offered only when acknowledging
|
||||
would actually give the box a lane. A depth-blocked box on a shallow
|
||||
shelf is ackable; a box squeezed out of a width-starved opening is
|
||||
overfull, not overhung — no placebo button."""
|
||||
web, cfg = _web(
|
||||
tmp_path,
|
||||
{
|
||||
"1": _entry("Wide Flat", 13.0, 13.0, 12.0),
|
||||
"2": _entry("Squeezed Out", 10.0, 10.0, 3.0),
|
||||
"3": _entry("Etherfields", 11.8, 11.8, 2.9),
|
||||
},
|
||||
)
|
||||
save_furniture(
|
||||
cfg,
|
||||
[
|
||||
{
|
||||
"name": "Mix",
|
||||
"openings": [
|
||||
{
|
||||
"id": "cube",
|
||||
"label": "A1",
|
||||
"zone": "",
|
||||
"width_in": 13.25,
|
||||
"height_in": 13.25,
|
||||
"depth_in": 15.4,
|
||||
},
|
||||
{
|
||||
"id": "tower",
|
||||
"label": "B1",
|
||||
"zone": "",
|
||||
"width_in": 23.25,
|
||||
"height_in": 19.0,
|
||||
"depth_in": 9.5,
|
||||
},
|
||||
],
|
||||
}
|
||||
],
|
||||
)
|
||||
save_locations(
|
||||
cfg,
|
||||
{
|
||||
"1": {"opening_id": "cube", "note": ""},
|
||||
"2": {"opening_id": "cube", "note": ""},
|
||||
"3": {"opening_id": "tower", "note": ""},
|
||||
},
|
||||
)
|
||||
units = web.get("/api/shelves").json()["units"]
|
||||
by_label = {o["label"]: o for o in units[0]["openings"]}
|
||||
cube = {g["name"]: g for g in by_label["A1"]["resident_games"]}
|
||||
# the wide flat box claims 13.0" of a 13.25" opening: 0.25" of
|
||||
# standing lane left — acknowledging Squeezed Out changes nothing
|
||||
assert cube["Squeezed Out"]["laneless"] is True
|
||||
assert cube["Squeezed Out"]["ackable"] is False
|
||||
tower = {g["name"]: g for g in by_label["B1"]["resident_games"]}
|
||||
# the classic overhang: no lane takes 11.8" of depth on a 9.5"
|
||||
# shelf, but standing proud works — offer the button
|
||||
assert tower["Etherfields"]["laneless"] is True
|
||||
assert tower["Etherfields"]["ackable"] is True
|
||||
|
||||
Reference in New Issue
Block a user