Rework scan screen, make lookups non-blocking, fix review findings

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-18 10:19:32 -07:00
1 parent 468cafc6db
commit b5defb4e4f
46 files changed
+1957 -406

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
/** Empty means "no year" (null); anything that is not a whole number is an error, never NaN. */
export function parseYear(text: string): { ok: true; value: number | null } | { ok: false } {
const t = text.trim();
if (t === '') return { ok: true, value: null };
if (!/^\d{1,4}$/.test(t)) return { ok: false };
return { ok: true, value: Number(t) };
}