Titles actions uncramp: wrong-match joins the corrections panel

Four buttons in a nowrap cell clipped past the card edge. "wrong
match" is a correction like "remove", so it moves into the edit panel
beside it (the panel already carries the row's identity); the actions
cell drops nowrap so its remaining buttons wrap right-aligned instead
of clipping.

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-05 19:56:42 -04:00
co-authored by Claude Fable 5
parent e3516ea043
commit d4c2bdf92d
3 changed files with 13 additions and 14 deletions
+2 -1
View File
@@ -322,7 +322,8 @@ button.danger { color: var(--stop-ink); border-color: var(--stop); background: #
text-underline-offset: 2px;
}
.catalog a:hover { color: var(--accent-ink); }
.catalog td.actions { text-align: right; white-space: nowrap; }
.catalog td.actions { text-align: right; }
.catalog td.actions button { margin: .1rem 0 .1rem .3rem; white-space: nowrap; }
.catalog td.actions button { font-size: .78rem; padding: .2rem .6rem; box-shadow: none; }
.catalog td.actions button:hover { background: var(--board); }
.catalog tr.editrow td { background: #fff; border-top: none; padding: .2rem .5rem .7rem; }
+1 -1
View File
@@ -39,7 +39,7 @@
<p><b>edit</b> — fix a misread title or add cues you already know (publisher, edition, year, language). A corrected misspelling automatically merges with a correctly-read sighting of the same game from another photo. If the line already had a BGG match, saving re-queues it so resolve searches again with the corrected data.</p>
<p><b>split into copies</b> — one line, several physical boxes? Splitting makes each photo its own copy, and each copy picks its own edition afterward. Appears on any line whose title was seen in more than one photo. Splitting one game never affects a same-named different edition.</p>
<p><b>pick edition</b> — a matched game with no legible edition cues stays version-less by design (never guess) — but you know which printing your box is. This fetches the game's complete version list into a Review ballot; pick yours there.</p>
<p><b>wrong match</b> — an auto-match landed on the wrong game (same-name impostors happen). This clears the match and returns the title to Review's unmatched queue, where re-search and manual-id live. Note BGG sometimes splits one game's lineage across entries — Wiz-War's early editions and its FFG remake are separate games — so a copy whose edition isn't on the ballot may belong to the sibling entry.</p>
<p><b>wrong match</b> (inside the edit panel) — an auto-match landed on the wrong game (same-name impostors happen). This clears the match and returns the title to Review's unmatched queue, where re-search and manual-id live. Note BGG sometimes splits one game's lineage across entries — Wiz-War's early editions and its FFG remake are separate games — so a copy whose edition isn't on the ballot may belong to the sibling entry.</p>
<p><b>add a game</b> (top of the Titles page) — a game no photo shows: an expansion stored inside a base box, a game away from the shelves. It joins the list like any read (BGG wants base game and expansion as separate collection entries, so boxes that hold both need this for the hidden half), and if a later photo shows it, the sighting merges instead of duplicating.</p>
<p><b>remove</b> (inside the edit panel) — for lines that shouldn't exist at all: a book read as a game, box art misread as a title. The line and its matches are discarded and stay gone. This is different from <i>reject</i> on the Review page, which keeps the line visible as "no BGG match" — right for real games BGG doesn't know.</p>
<p>Undo: each decision is one record in <code>data/title_edits.json</code>, <code>data/title_splits.json</code>, or <code>data/title_removals.json</code> — delete the record and the next rebuild restores the old state.</p>
+10 -12
View File
@@ -32,7 +32,7 @@ function editorRow(c) {
return `
<tr class="editrow"><td colspan="5">
<form class="editform" data-title="${esc(c.title_raw)}"
data-photos="${esc(c.photos.join(";"))}">
data-photos="${esc(c.photos.join(";"))}" data-rowix="${c.row_ix ?? ""}">
<label>Title <input name="title" value="${esc(c.title_raw)}" required></label>
<label>Publisher <input name="publisher" value="${esc(cue.publisher || "")}"></label>
<label>Edition <input name="edition" value="${esc(cue.edition || "")}"></label>
@@ -41,6 +41,9 @@ function editorRow(c) {
<span class="editactions">
<button type="submit" class="primary">save</button>
<button type="button" class="canceledit">cancel</button>
${c.bgg_id && ["auto", "approved"].includes(c.status)
? `<button type="button" class="wrongmatch danger">wrong match — re-search</button>`
: ""}
<button type="button" class="removetitle danger">remove — not a game</button>
</span>
<span class="edithint">saving re-queues this title for resolve with the corrected data</span>
@@ -86,12 +89,6 @@ function render() {
title="one line, several boxes? make each photo its own copy">
split into copies</button>`
: ""}
${c.bgg_id && ["auto", "approved"].includes(c.status)
? `<button class="wrongmatch" data-title="${esc(c.title_raw)}"
data-photos="${esc(c.photos.join(";"))}" data-rowix="${c.row_ix ?? ""}"
title="this matched the wrong game — send it back to Review to re-search">
wrong match</button>`
: ""}
${c.bgg_id && ["auto", "approved"].includes(c.status)
&& ["version_unknown", "version_error", ""].includes(c.version_status || "")
? `<button class="pickedition" data-title="${esc(c.title_raw)}"
@@ -123,14 +120,15 @@ document.getElementById("catbody").addEventListener("click", async e => {
if (cancel) { EDITING = null; GATE.reset(); render(); refresh().catch(() => {}); return; }
const wm = e.target.closest("button.wrongmatch");
if (wm) {
if (!confirm(`"${wm.dataset.title}" matched the wrong game? This clears the ` +
const f = wm.closest("form.editform");
if (!confirm(`"${f.dataset.title}" matched the wrong game? This clears the ` +
`match and sends it back to Review for a re-search.`)) return;
const res = await apiPost("/api/reopen-match", {
title_raw: wm.dataset.title,
source_photos: wm.dataset.photos,
row_ix: wm.dataset.rowix === "" ? null : Number(wm.dataset.rowix),
title_raw: f.dataset.title,
source_photos: f.dataset.photos,
row_ix: f.dataset.rowix === "" ? null : Number(f.dataset.rowix),
});
if (res) { GATE.reset(); refresh().catch(() => {}); }
if (res) { EDITING = null; GATE.reset(); refresh().catch(() => {}); }
return;
}
const pe = e.target.closest("button.pickedition");