feat: add filtered comments list route #85

Merged
erik merged 1 commit from feat/task-4e8d17d3-comments-list-filters into main 2026-06-02 12:10:03 -05:00
Owner

Summary\n- Add GET /api/v1/comments with status, postSlug, author, receivedFrom, and receivedTo filters.\n- Remove the special-purpose /comments/pending route from routing and OpenAPI.\n- Update docs/specs and tests for the new global comments list route and combined filters.\n\n## Verification\n- npm exec --workspace @slugkit/template-site -- vitest run --config ../../vitest.config.ts src/api/tests/comments.test.ts src/api/tests/routes.test.ts\n- npm test\n- npm run lint\n- npm run typecheck\n- ./scripts/pre-pr.sh\n\nTask: #task-4e8d17d3

## Summary\n- Add GET /api/v1/comments with status, postSlug, author, receivedFrom, and receivedTo filters.\n- Remove the special-purpose /comments/pending route from routing and OpenAPI.\n- Update docs/specs and tests for the new global comments list route and combined filters.\n\n## Verification\n- npm exec --workspace @slugkit/template-site -- vitest run --config ../../vitest.config.ts src/api/__tests__/comments.test.ts src/api/__tests__/routes.test.ts\n- npm test\n- npm run lint\n- npm run typecheck\n- ./scripts/pre-pr.sh\n\nTask: #task-4e8d17d3
feat: add filtered comments list route
All checks were successful
CI / build-lint-test (pull_request) Successful in 31s
8688964a15
Task: #task-4e8d17d3
Author
Owner

PR Review

Summary

Reviewed PR #85 for task task-4e8d17d3. The changes add GET /api/v1/comments with combinable filters, remove the special-purpose pending comments route from routing/OpenAPI, preserve post-scoped comments, and update docs/specs/tests.

Acceptance criteria

  • GET /api/v1/comments?status=pending lists pending comments across posts.
  • GET /api/v1/comments?postSlug=<slug> filters comments by post.
  • GET /api/v1/comments?author=<search> filters by author name, handle, or profile URL.
  • receivedFrom and receivedTo filter comments by received timestamp.
  • Filters can be combined.
  • GET /api/v1/comments/pending is no longer routed or documented.
  • GET /api/v1/posts/{slug}/comments still works for post-scoped comment listing.
  • OpenAPI documents the new global comments route and query parameters.
  • Relevant tests and checks pass.

Blocking issues

None.

Warnings

None.

Verification reviewed

  • Targeted comments/OpenAPI tests passed.
  • npm test passed.
  • npm run lint passed.
  • npm run typecheck passed.
  • ./scripts/pre-pr.sh passed.
  • Forgejo CI status is success for commit 8688964a15a91e090ed86896e27e1ff223b35534.

Verdict

Approved. Ready for human merge approval.

PR Review Worker Result

  • pr: open
  • review: approved
  • pr_comment: posted
  • task_comment: posted
  • blocking_issues: 0
  • warnings: 0
  • criteria_total: 9
  • criteria_met: 9
  • criteria_missing: 0
## PR Review ### Summary Reviewed PR #85 for task `task-4e8d17d3`. The changes add `GET /api/v1/comments` with combinable filters, remove the special-purpose pending comments route from routing/OpenAPI, preserve post-scoped comments, and update docs/specs/tests. ### Acceptance criteria - [x] `GET /api/v1/comments?status=pending` lists pending comments across posts. - [x] `GET /api/v1/comments?postSlug=<slug>` filters comments by post. - [x] `GET /api/v1/comments?author=<search>` filters by author name, handle, or profile URL. - [x] `receivedFrom` and `receivedTo` filter comments by received timestamp. - [x] Filters can be combined. - [x] `GET /api/v1/comments/pending` is no longer routed or documented. - [x] `GET /api/v1/posts/{slug}/comments` still works for post-scoped comment listing. - [x] OpenAPI documents the new global comments route and query parameters. - [x] Relevant tests and checks pass. ### Blocking issues None. ### Warnings None. ### Verification reviewed - Targeted comments/OpenAPI tests passed. - `npm test` passed. - `npm run lint` passed. - `npm run typecheck` passed. - `./scripts/pre-pr.sh` passed. - Forgejo CI status is `success` for commit `8688964a15a91e090ed86896e27e1ff223b35534`. ### Verdict Approved. Ready for human merge approval. PR Review Worker Result - pr: open - review: approved - pr_comment: posted - task_comment: posted - blocking_issues: 0 - warnings: 0 - criteria_total: 9 - criteria_met: 9 - criteria_missing: 0
erik force-pushed feat/task-4e8d17d3-comments-list-filters from 8688964a15
All checks were successful
CI / build-lint-test (pull_request) Successful in 31s
to 5f0bc977d1
All checks were successful
CI / build-lint-test (pull_request) Successful in 27s
2026-06-02 12:06:26 -05:00
Compare
Author
Owner

PR update

Included the required docs/CONTRIBUTING.md clarification in this PR: approval requests must include the implementation plan in normal chat text in the same message.

Updated head commit: 5f0bc977d1323bea373831e10525d4aec4e742cb.

Verification after amend:

  • ./scripts/pre-pr.sh passed.
  • Forgejo CI is success.

Review remains approved; no new blockers or warnings.

## PR update Included the required `docs/CONTRIBUTING.md` clarification in this PR: approval requests must include the implementation plan in normal chat text in the same message. Updated head commit: `5f0bc977d1323bea373831e10525d4aec4e742cb`. Verification after amend: - `./scripts/pre-pr.sh` passed. - Forgejo CI is `success`. Review remains approved; no new blockers or warnings.
erik merged commit 1668b1eb46 into main 2026-06-02 12:10:03 -05:00
erik deleted branch feat/task-4e8d17d3-comments-list-filters 2026-06-02 12:10:03 -05:00
Sign in to join this conversation.
No description provided.