Review UI: surface the unresolved backlog and a full catalog ledger
The done screen claimed "diff-ready" while 104 extracted titles had never been resolved (they're invisible to matches.csv until the BGG token arrives). The state now counts titles.json entries with no matches row: the header tally shows "awaiting resolve", the done screen says "Resolved set fully reviewed" with the real extracted total and what to run on token day, and a read-only Catalog section lists every extracted title with its status chip (auto/approved/rejected/awaiting BGG), matched game, version, and source photos. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+19
-1
@@ -105,7 +105,13 @@ def make_cfg(tmp_path) -> Config:
|
||||
"publisher_hint": "Fantasy Flight",
|
||||
"edition_hint": "",
|
||||
"source_photos": ["shelf.jpg"],
|
||||
}
|
||||
},
|
||||
{
|
||||
# extracted but never resolved (no BGG token yet)
|
||||
"title_raw": "Fresh Off The Shelf",
|
||||
"confidence": "high",
|
||||
"source_photos": ["shelf.jpg"],
|
||||
},
|
||||
]
|
||||
)
|
||||
)
|
||||
@@ -268,3 +274,15 @@ def test_thumbnails_come_from_cached_thing_xml(tmp_path):
|
||||
)
|
||||
thumbs = load_thumbnails(cache)
|
||||
assert thumbs == {478: "https://cf.example/citadels.jpg"}
|
||||
|
||||
|
||||
def test_catalog_and_unresolved_backlog_are_visible(tmp_path):
|
||||
"""Extracted-but-unresolved titles must not vanish from the UI, and the
|
||||
done state must not claim diff-readiness while they exist."""
|
||||
web, _ = make_client(tmp_path)
|
||||
state = web.get("/api/state").json()
|
||||
assert state["summary"]["extracted"] == 2
|
||||
assert state["summary"]["unresolved"] == 1
|
||||
by_title = {c["title_raw"]: c for c in state["catalog"]}
|
||||
assert by_title["Fresh Off The Shelf"]["status"] == "awaiting_resolve"
|
||||
assert by_title["Citadels"]["status"] == "ambiguous"
|
||||
|
||||
Reference in New Issue
Block a user