feat: broaden quiz mood and avoid options - #15
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
each mapped to related genres in the scoring engine
and spice (erotica)
https://claude.ai/code/session_01V2vTccAgRe8jfGq3A4MLcx