The review done-card stops assuming why titles are unresolved

Clean-run finding #2 from Eric: with a token loaded and resolve simply
not yet run, the card still said unmatched titles were "waiting on the
API token" — stub-era copy hard-coding the only reason unresolved
titles existed back then. The summary payload now carries
token_present (a boolean, never the value — pinned by test), and the
card gives the advice that fits: token loaded → "run resolve";
no token → the waiting message, now with a link to BGG's application
page since that reader hasn't registered yet.

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-06 10:21:33 -04:00
co-authored by Claude Fable 5
parent 3566a62f2d
commit 251fc8fde8
3 changed files with 26 additions and 3 deletions
+9 -3
View File
@@ -157,9 +157,15 @@ function render() {
<div>${s.summary.rejected}<span>rejected</span></div>
</div>
${waiting
? `<p class="waiting">${waiting} titles are extracted but not yet matched
to BGG — they're waiting on the API token.</p>
<p class="next">When it arrives, run <b>resolve</b> from the <a href="/">pipeline</a>.</p>`
? s.summary.token_present
? `<p class="waiting">${waiting} title(s) are extracted but not yet matched
to BGG.</p>
<p class="next">Run <b>resolve</b> from the <a href="/">pipeline</a> to match them.</p>`
: `<p class="waiting">${waiting} title(s) are extracted but not yet matched
to BGG — they're waiting on your API token
(<a href="https://boardgamegeek.com/applications" target="_blank"
rel="noopener">boardgamegeek.com/applications</a>).</p>
<p class="next">When it arrives, run <b>resolve</b> from the <a href="/">pipeline</a>.</p>`
: `<p class="next">Next: run <b>diff</b> from the <a href="/">pipeline</a>, then check the <a href="/queue">queue</a>.</p>`}
</div>`;
}
+3
View File
@@ -701,6 +701,9 @@ def create_app(
"total": len(session.rows),
"extracted": len(session.titles),
"unresolved": unresolved_count,
# presence only, never the value: the done-card's advice
# differs between "run resolve" and "get a token first"
"token_present": bool(os.environ.get("BGG_API_TOKEN")),
},
}