Skip to content

Add resolve/dismiss API endpoints for comment threads#16

Merged
HamptonMakes merged 1 commit into
mainfrom
api-comment-resolve-dismiss
Feb 24, 2026
Merged

Add resolve/dismiss API endpoints for comment threads#16
HamptonMakes merged 1 commit into
mainfrom
api-comment-resolve-dismiss

Conversation

@HamptonMakes

Copy link
Copy Markdown
Collaborator

Adds two new API endpoints for managing comment thread lifecycle:

  • PATCH /api/v1/plans/:plan_id/comments/:id/resolve — mark a thread as resolved (plan author or thread creator)
  • PATCH /api/v1/plans/:plan_id/comments/:id/dismiss — dismiss a thread as not applicable (plan author only)

Both endpoints enforce authorization via CommentThreadPolicy and broadcast Turbo Stream updates so the web UI stays in sync.

Changes

  • config/routes.rb — added resolve/dismiss member routes
  • Api::V1::CommentsController — added resolve/dismiss actions with broadcast
  • spec/requests/api/v1/comments_spec.rb — 5 new specs (happy path, 404, 403)
  • SKILL.md — documented new endpoints and added 403 error code

All 10 comment specs pass.

- PATCH /api/v1/plans/:plan_id/comments/:id/resolve
- PATCH /api/v1/plans/:plan_id/comments/:id/dismiss
- Policy authorization (plan author for dismiss, author or thread creator for resolve)
- Turbo Stream broadcasts on status change
- Request specs with auth coverage
- Updated planning-department skill docs

Amp-Thread-ID: https://ampcode.com/threads/T-019c90ba-6ddd-732d-9fe2-1ace4ba2a6fe
Co-authored-by: Amp <amp@ampcode.com>
@HamptonMakes
HamptonMakes merged commit b1ede5e into main Feb 24, 2026
4 checks passed
@HamptonMakes
HamptonMakes deleted the api-comment-resolve-dismiss branch February 24, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant