Implement comments API routes #18

Closed
opened 2026-05-19 19:51:44 -05:00 by erik · 3 comments
Owner

Goal

Implement Slugkit comment/reply listing and moderation routes.

Spec: docs/specs/11-comments-routes.md

Requirements

  • Implement routes for listing comments on a post, listing pending comments across posts, approving a comment, and hiding a comment.
  • Support moderation statuses pending, approved, and hidden.
  • Store and return comment fields including post slug, activity/object URLs, author profile/name/handle, HTML/text content, reply target URL, published/received/moderated timestamps, and moderation status where documented.
  • Default post comment listing to approved comments unless status requests another documented value.
  • Return shared 404 for missing posts/comments.
  • Return standardized 501 Not Implemented if comments are intentionally unsupported.
  • Use shared auth, validation, and error behavior.
  • Document every route in OpenAPI with the operation IDs from the spec.
  • Add tests for post comments, pending comments, approve/hide actions, filtering, missing resources, auth, and OpenAPI coverage.

Acceptance criteria

  • Can list comments for a post.
  • Can list pending comments across posts.
  • Can approve a comment.
  • Can hide a comment.
  • Missing post/comment returns shared 404.
  • Unsupported implementations return standardized 501 Not Implemented.
  • Every route appears in OpenAPI with documented operation IDs.
  • Relevant lint/test checks pass.

Dependencies

  • task-c272cbda
  • task-782a7074
  • task-4efe743e
## Goal Implement Slugkit comment/reply listing and moderation routes. Spec: `docs/specs/11-comments-routes.md` ## Requirements - Implement routes for listing comments on a post, listing pending comments across posts, approving a comment, and hiding a comment. - Support moderation statuses `pending`, `approved`, and `hidden`. - Store and return comment fields including post slug, activity/object URLs, author profile/name/handle, HTML/text content, reply target URL, published/received/moderated timestamps, and moderation status where documented. - Default post comment listing to approved comments unless `status` requests another documented value. - Return shared `404` for missing posts/comments. - Return standardized `501 Not Implemented` if comments are intentionally unsupported. - Use shared auth, validation, and error behavior. - Document every route in OpenAPI with the operation IDs from the spec. - Add tests for post comments, pending comments, approve/hide actions, filtering, missing resources, auth, and OpenAPI coverage. ## Acceptance criteria - [ ] Can list comments for a post. - [ ] Can list pending comments across posts. - [ ] Can approve a comment. - [ ] Can hide a comment. - [ ] Missing post/comment returns shared `404`. - [ ] Unsupported implementations return standardized `501 Not Implemented`. - [ ] Every route appears in OpenAPI with documented operation IDs. - [ ] Relevant lint/test checks pass. ## Dependencies - task-c272cbda - task-782a7074 - task-4efe743e
Collaborator

Synced from todu comment by @todu on 2026-05-24T14:11:03.655Z

PR review approved

  • PR: #70
  • Review: approved
  • Blocking issues: 0
  • Warnings: 0
  • Acceptance criteria: 8/8 met
  • Verification: make check, ./scripts/pre-pr.sh, and Forgejo CI passed.

Merge is waiting for explicit human approval.

_Synced from todu comment by @todu on 2026-05-24T14:11:03.655Z_ ### PR review approved - PR: [#70](https://forge.caradoc.com/erik/slugkit/pulls/70) - Review: approved - Blocking issues: 0 - Warnings: 0 - Acceptance criteria: 8/8 met - Verification: `make check`, `./scripts/pre-pr.sh`, and Forgejo CI passed. Merge is waiting for explicit human approval.
Collaborator

Synced from todu comment by @todu on 2026-05-24T14:10:03.166Z

PR review approved

  • PR: #70
  • Review: approved
  • Blocking issues: 0
  • Warnings: 0
  • Acceptance criteria: 8/8 met
  • Verification: make check, ./scripts/pre-pr.sh, and Forgejo CI passed.

Merge is waiting for explicit human approval.

_Synced from todu comment by @todu on 2026-05-24T14:10:03.166Z_ ### PR review approved - PR: https://forge.caradoc.com/erik/slugkit/pulls/70 - Review: approved - Blocking issues: 0 - Warnings: 0 - Acceptance criteria: 8/8 met - Verification: `make check`, `./scripts/pre-pr.sh`, and Forgejo CI passed. Merge is waiting for explicit human approval.
Collaborator

Synced from todu comment by @todu on 2026-05-28T17:44:25.016Z

Close gate passed

  • PR: #70
  • Merge: completed into main
  • Acceptance criteria: 8/8 met in the approved PR review
  • Verification evidence: make check, ./scripts/pre-pr.sh, and Forgejo CI passed before merge

The comments listing and moderation routes are implemented, documented in OpenAPI, covered by tests, and merged.

_Synced from todu comment by @todu on 2026-05-28T17:44:25.016Z_ ### Close gate passed - PR: [#70](https://forge.caradoc.com/erik/slugkit/pulls/70) - Merge: completed into `main` - Acceptance criteria: 8/8 met in the approved PR review - Verification evidence: `make check`, `./scripts/pre-pr.sh`, and Forgejo CI passed before merge The comments listing and moderation routes are implemented, documented in OpenAPI, covered by tests, and merged.
caradoc 2026-05-30 13:14:10 -05:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/slugkit#18
No description provided.