Skip to content

feat: broaden quiz mood and avoid options - #15

Merged
MichaelJShepherd merged 5 commits into
mainfrom
feat/expand-quiz-options
Jun 10, 2026
Merged

feat: broaden quiz mood and avoid options#15
MichaelJShepherd merged 5 commits into
mainfrom
feat/expand-quiz-options

Conversation

@MichaelJShepherd

Copy link
Copy Markdown
Owner

The quiz offered only six moods and six avoid genres, which left
common reading tastes (spicy romance, historical fiction, dark reads,
non-fiction curiosity) with no matching option.

  • Add six moods: romantic, spicy, nostalgic, escapist, dark, curious,
    each mapped to related genres in the scoring engine
  • Add five avoid chips: thriller, young adult, historical, memoir,
    and spice (erotica)
  • Cover the new mood-to-genre matching with unit tests

https://claude.ai/code/session_01V2vTccAgRe8jfGq3A4MLcx

claude added 5 commits June 9, 2026 19:15
The quiz offered only six moods and six avoid genres, which left
common reading tastes (spicy romance, historical fiction, dark reads,
non-fiction curiosity) with no matching option.

- Add six moods: romantic, spicy, nostalgic, escapist, dark, curious,
  each mapped to related genres in the scoring engine
- Add five avoid chips: thriller, young adult, historical, memoir,
  and spice (erotica)
- Cover the new mood-to-genre matching with unit tests

https://claude.ai/code/session_01V2vTccAgRe8jfGq3A4MLcx
The Goodreads RSS feed carries no genre data, so every imported book
landed with null genres and the quiz's mood matching and avoid filters
never affected results — scoring fell back to page count and rating.

- Add enrich.ts to import-goodreads: looks up each book's genres on
  Open Library (ISBN first, title/author fallback) with a per-request
  timeout, capped concurrency, and a global time budget so huge
  shelves cannot stall the import; failures leave genres null
- Treat scrape_cache entries with no genres anywhere as stale so
  shelves imported before this change refresh on the next import
- Log enrich_start/enrich_complete with counts and duration
- Cover enrichment, subject normalisation, and cache-staleness
  detection with Deno unit tests; update spec/README/TODO notes
  (genres now arrive at import; synopsis stays lazy)

https://claude.ai/code/session_01V2vTccAgRe8jfGq3A4MLcx
Checked the mappings against an actual Goodreads to-read shelf and the
subject style Open Library returns. Mythology retellings, post-
apocalyptic fiction, and magical realism appeared on the shelf but
matched no mood.

- nostalgic: add mythology, retelling
- escapist: add magical realism, mythology, post-apocalyptic
- dark: add post-apocalyptic
- Add a regression test using capitalised Open Library style subjects
  drawn from real shelf books

https://claude.ai/code/session_01V2vTccAgRe8jfGq3A4MLcx
A second real shelf surfaced time-travel fantasy (tagged 'Time Travel'
on Open Library) that no mood matched. Extend the escapist mapping and
the Open Library subject regression test to cover it.

https://claude.ai/code/session_01V2vTccAgRe8jfGq3A4MLcx
A third real TBR (cozy fantasy, dark academia, witch fiction) surfaced
subjects no mood matched:

- cozy: add found family
- escapist: add witches
- dark: add dark academia
- Extend the Open Library subject regression test with witch and
  dark-academia books

https://claude.ai/code/session_01V2vTccAgRe8jfGq3A4MLcx
@MichaelJShepherd
MichaelJShepherd merged commit fd900f4 into main Jun 10, 2026
5 of 6 checks passed
@MichaelJShepherd
MichaelJShepherd deleted the feat/expand-quiz-options branch June 10, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants