Redesign the interface around Scan and Library, classify uncatalogued books from similar ones

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-18 11:01:50 -07:00
1 parent 308c0e1ed3
commit 6cec404e21
71 files changed
+8634 -1502

No files matched your search

+3 -2
View File
@@ -90,9 +90,10 @@ export function createJobs(deps: {
if (book.year) input.year = book.year;
const label = book.isbn13 ?? book.title;
const started = Date.now();
let similar = '';
const took = () => `${Date.now() - started} ms`;
try {
const res = await resolver.resolve(input, { onMeta: (m) => applyMeta(id, m), tolerateLocFailure: final });
const res = await resolver.resolve(input, { onMeta: (m) => applyMeta(id, m), tolerateLocFailure: final, onSimilar: (d) => { similar = d; } });
attempts.delete(id);
const cur = db.getBook(id);
if (!cur) return;
@@ -106,7 +107,7 @@ export function createJobs(deps: {
callNumber: res.callNumber, sortKey: res.sortKey, confidence: res.confidence,
source: res.source, dewey, status: 'resolved', attentionReason: null,
});
log(`[lookup] ${label}: ${res.callNumber} (${res.source}) in ${took()}`);
log(`[lookup] ${label}: ${res.callNumber} (${res.source === 'similar' && similar ? `similar ${similar}` : res.source}) in ${took()}`);
} else {
const reason = res.reason ?? 'No Library of Congress number found';
emit(id, { dewey, status: 'needs_attention', attentionReason: reason });