Repository navigation
feat: add the /api/reviews routes, review server functions and MCP book_reviews tool - #2843
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
cargo-auditNo RustSec advisories found in Posted by the Rust workflow's |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Authentication-failure coverage is incomplete, and the published null-clearing contract misstates spoiler handling.
2 open issues
What changed in this PR
Adds the API layer for book reviews, building on the database work while preserving legacy ratings routes.
Changes:
- Adds review REST endpoints and Dioxus server functions.
- Adds the read-only MCP
book_reviewstool. - Updates tests, OpenAPI, and privacy documentation.
| File | Description |
|---|---|
| server/src/backend/routes.rs | Registers review routes. |
| server/src/backend/reviews/tests.rs | Tests review endpoints and privacy. |
| server/src/backend/reviews.rs | Implements review REST handlers. |
| server/src/backend/ratings.rs | Deprecates legacy ratings endpoints. |
| server/src/backend/openapi.rs | Adds the Reviews API tag. |
| server/src/backend.rs | Registers the reviews module. |
| openapi/openapi.json | Publishes review schemas and endpoints. |
| mcp/src/tools/read/views.rs | Adds review response views. |
| mcp/src/tools/read/tests.rs | Tests review response conversion. |
| mcp/src/tools/read.rs | Adds book_reviews; corrects read-status descriptions. |
| mcp/src/server/tests/read.rs | Checks review tool registration. |
| mcp/src/server/tests/checkin.rs | Updates expected tool count. |
| frontend/src/rpc/reviews.rs | Adds review server functions. |
| frontend/src/rpc/mod.rs | Exports review server functions. |
| docs/architecture.md | Documents private-note isolation. |
Review effort: Balanced
4 of 6 tasks
…h coverage - ReviewPatch.spoiler documents as a non-nullable boolean: leave it out to keep it - book_reviews reports an unknown uuid as book not found, not an internal error - cover anonymous GET and DELETE on /api/reviews; a refused DELETE keeps the review - document review image embeds and cleanup, and the text-review sort order - ratings routes name their Android and iOS callers; rule 13 covers deprecation - share the reader test helper through backend::test_support
…leanup - a null spoiler counts as leaving it out and keeps the flag; pinned in shared and REST tests - journal edit and delete docs keep an image any journal entry or review still shows
roberte777
added a commit
that referenced
this pull request
Oct 21, 2026
## Summary - Reviews stop after Stats: your card, household summary, other readers - Your card: one-tap half stars, a pencil to edit and a trash can to delete - Spoiler flag lives in the editor; flagged text stays folded until Finished - Title area links to Reviews once two or more readers have rated the book ## Test plan - [x] `cargo nextest run -p omnibus-frontend --features server` - [x] `just e2e-ci tests/flows/reviews.spec.ts` - [x] `just lint` ## Version By default a merge to `main` cuts a patch release. Pick the version update this PR should trigger; labels override the default: - [x] **Minor** — add the `minor version` label (`vX.Y.Z` → `vX.(Y+1).0`). - [ ] **Patch** — the default; add the `patch version` label or leave unlabeled (`vX.Y.Z` → `vX.Y.(Z+1)`). - [ ] **No release** — add the `no release` label to skip cutting a release. If both `minor version` and `patch version` are applied, `minor version` wins. Unlabeled PRs that only touch docs (`*.md`, `docs/`) or CI (`.github/`) skip the release automatically. ## Notes - Part of #2841: stacked on #2843 (db → API → web → mobile → React → iOS) - Book-delete confirmation now counts reviews; the wire field stays `ratings` - The journal's Markdown field and highlights inserter are shared with reviews
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.

Summary
GET/PATCH/DELETE /api/reviews/{uuid}; PATCH changes only fields sent/api/rpc/reviews/{get,update,delete}server functions for the Dioxus UI/api/ratingsroutes marked deprecated in the spec; still served unchangedbook_reviewstool;book_read_statusstops claiming want-to-readTest plan
cargo nextest run -p omnibus(newbackend::reviewstests)cargo nextest run -p omnibus-mcpjust openapi-genleavesopenapi/openapi.jsonunchangedjust lintVersion
By default a merge to
maincuts a patch release. Pick the version update this PR should trigger; labels override the default:minor versionlabel (vX.Y.Z→vX.(Y+1).0).patch versionlabel or leave unlabeled (vX.Y.Z→vX.Y.(Z+1)).no releaselabel to skip cutting a release.If both
minor versionandpatch versionare applied,minor versionwins. Unlabeled PRs that only touch docs (*.md,docs/) or CI (.github/) skip the release automatically.Notes
docs/architecture.md