JudgeReview.comments: number column exists (counter for display) but no Comment model is wired and no comment-on-review UI exists. Yelp has comments under reviews for back-and-forth context; bench-review would benefit similarly when readers want to push back on a take or add context.
Scope
- New
Commentmodel:id, uuid, judge_review_id, user_id, body, status (pending/published/rejected), created_at, updated_at. - Optional
parent_comment_idfor threaded replies (nice-to-have; flat first). - API:
GET /api/reviews/{id}/comments— paginated, published-only for public.POST /api/reviews/{id}/comments— auth-gated, status=pending by default (moderation).PATCH /api/me/comments/{id}— author edit (resets to pending).DELETE /api/me/comments/{id}— author delete.PATCH /api/admin/comments/{id}/status— moderate.
- UI:
- Comments section below the review body in
ArticleView.stx. - Comment composer (signed-in users only).
- Comment cards with timestamp, author, optional edit/delete for own comments.
- Comments section below the review body in
- Counter: keep
judge_reviews.commentsin sync via observer hooks (afterCreate / afterDelete on Comment).
Acceptance
- Authenticated user can comment on a published review; comment lands pending.
- Admin sees comments in the moderation queue.
- Published comments appear under the review for everyone.
- The
commentscounter on the review row reflects published comments only.
Privacy / safety
- Comments inherit the moderation pipeline already in place.
- Author of the original review can delete comments on their own review (community moderation lite).
- Anonymous mode (sibling issue) applies the same way for comments.