Repository navigation
Conversation
PUT /documents/{document}/info takes moods, up to 12 names. Like
manual genres they stick over Hardcover's lookup, null hands them back,
and a merge keeps them over the other copy's. Both lists share one
check.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 25 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Manual lists go through the same tidy() as Hardcover's: trimmed, one entry per name whatever the case, first letter capitalized. Otherwise the web app's mood and genre counts, which compare names exactly, would list a manual "dark" and Hardcover's "Dark" apart.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Content warnings, description, series with its number, and release
year can be set through PUT /documents/{document}/info like genres and
moods: set by hand they stick over Hardcover's lookup, null hands them
back, and a merge keeps them. One table of these details drives the
route, the lookup and the merge. A series set by hand drops Hardcover's
series id, which points at the series Hardcover found.
The kept copy's value now wins whenever it was set by hand, even empty. Before, a list cleared on purpose took the other copy's Hardcover list and kept the manual flag, so the lookup's values ended up frozen. The genre merge from crosspoint-reader#35 had the same gap.
Every detail Hardcover fills in can now be set by hand, the way genres can since #35: moods, content warnings, description, series with its number, and release year. The community rating stays Hardcover's only, since it's other readers' average rather than a fact about the book.
PUT /documents/{document}/infotakes them all. A value set there sticks over Hardcover's lookup (one<field>_manualcolumn each, likegenres_manual), andnullhands the field back for the next lookup.tidy(): trimmed, one entry per name whatever the case, first letter capitalized. The web app counts mood and genre names exactly, so otherwise a manual "dark" would show apart from Hardcover's "Dark". This also changes manual genres, which were stored as typed.descriptionup to 6000 characters, the same cut Hardcover's get.release_yearfrom 1 to 9999.seriesandseries_positiongo together. Setting a series by hand also drops Hardcover's series id, which points at the series Hardcover found, so next-in-series lookups stop for that book instead of following the wrong series.series_positionwithoutseriesis rejected.src/models/manual-details.ts) lists these details and drives the route, the lookup'sUPDATEand the merge's SQL, so a new one is added in one place. Column names in SQL only ever come from that table.The migration is
0036, because #43 uses0035.Tests cover validation, sticking over a lookup, handing one field back while the others stay, the series id, and a merge, for both moods and the other details.
docs/API.mdis updated.