feat: show covers, providers and a provider filter on manual lookup results #95

Merged
jfro merged 1 commit from feat/manual-lookup-providers into main 2026-10-25 23:01:46 +00:00
Owner

Closes #91. Stacked on #94 (all providers queried, F3 / Hugo Winners fix), which is stacked on #86; merge order #86 → #94 → this.

  • Covers: each title lookup result shows its cover (safe_cover_url, lazy, no-referrer) or a book-icon placeholder.
  • Provider shown: a badge per result from the :provider tag #94 adds.
  • All providers: done in #94 (every configured provider queried concurrently, results merged and deduped).
  • Filter: when results come from 2+ providers, radio buttons "All (n)" / " (n)" above the list; assets/js/provider_filter.js hides other providers' rows. No JS → all rows stay visible. Hidden when only one provider answered.

Tests: book_lookup_results_test.exs (provider per row, cover vs placeholder, filter options and counts, no filter for one provider, lookup_providers/1). mix precommit: 658 tests pass.
Browser check: live "Dune" lookup on the dev server in Chromium: 20 results from Open Library + Library of Congress, 16 covers, picking Library of Congress shows only its 10, All restores 20.

Note: Open Library's ISBN cover fallback sometimes returns a 1×1 blank image, which shows as an empty cover box rather than the icon. Pre-existing fallback; left alone.

Closes #91. Stacked on #94 (all providers queried, F3 / Hugo Winners fix), which is stacked on #86; merge order #86 → #94 → this. - **Covers:** each title lookup result shows its cover (`safe_cover_url`, lazy, no-referrer) or a book-icon placeholder. - **Provider shown:** a badge per result from the `:provider` tag #94 adds. - **All providers:** done in #94 (every configured provider queried concurrently, results merged and deduped). - **Filter:** when results come from 2+ providers, radio buttons "All (n)" / "<Provider> (n)" above the list; `assets/js/provider_filter.js` hides other providers' rows. No JS → all rows stay visible. Hidden when only one provider answered. **Tests:** `book_lookup_results_test.exs` (provider per row, cover vs placeholder, filter options and counts, no filter for one provider, `lookup_providers/1`). `mix precommit`: 658 tests pass. **Browser check:** live "Dune" lookup on the dev server in Chromium: 20 results from Open Library + Library of Congress, 16 covers, picking Library of Congress shows only its 10, All restores 20. Note: Open Library's ISBN cover fallback sometimes returns a 1×1 blank image, which shows as an empty cover box rather than the icon. Pre-existing fallback; left alone.
jfro added this to the v0.9.0 milestone 2026-10-25 22:03:32 +00:00
feat: show covers, providers and a provider filter on manual lookup results
All checks were successful
CI / test (pull_request) Successful in 48s
3c13e8be55
Each title lookup result now shows its cover (or a placeholder) and a
badge with the provider it came from. When results come from more than
one provider, a row of All / per-provider buttons (with counts) filters
the list in the browser; without JS every result stays visible.

Closes #91
jfro force-pushed feat/manual-lookup-providers from 3c13e8be55
All checks were successful
CI / test (pull_request) Successful in 48s
to 0612b2a1e9
All checks were successful
CI / test (pull_request) Successful in 48s
2026-10-25 22:16:31 +00:00
Compare
jfro changed target branch from fix/title-lookup-all-providers to main 2026-10-25 23:01:38 +00:00
jfro merged commit 8d2a1e078b into main 2026-10-25 23:01:46 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfro/fuzzy_catalog!95
No description provided.