Skip to content

OBJ-84 — Comment threads model + API - #30

Merged
objectgyan merged 1 commit into
mainfrom
objectgyan/obj-84-m54-comment-threads-model-api
May 17, 2026
Merged

objectgyan merged 1 commit into
mainfrom
objectgyan/obj-84-m54-comment-threads-model-api

Conversation

@objectgyan

Copy link
Copy Markdown
Owner

Summary

  • Adds comments and comment_replies tables with EF Core entities, migration AddCommentTables, and tenant-scoped query filters (OBJ-71)
  • Implements ICommentService / CommentService with create comment, list comments (with embedded replies), create reply, and patch comment (isResolved toggle)
  • Four minimal-API endpoints: POST /api/documents/{id}/comments, GET /api/documents/{id}/comments?fieldId=&isResolved=, POST /api/comments/{commentId}/replies, PATCH /api/comments/{commentId}

Test plan

  • Build succeeds with 0 warnings (TreatWarningsAsErrors=true)
  • 140 unit tests pass
  • 76 integration tests pass (includes 6 new CommentApiTests covering full lifecycle)
  • scripts/validate-obj-84.ps1 exits 0 — live API lifecycle + DB row assertions
  • validation/obj-84-db.txt and validation/obj-84-api.txt produced

Adds two new tables (comments, comment_replies) with EF Core entities,
a migration (AddCommentTables), ICommentService + CommentService implementation,
and four minimal-API endpoints: POST /documents/{id}/comments, GET /documents/{id}/comments,
POST /comments/{commentId}/replies, PATCH /comments/{commentId}.
Tenant-scoped via OBJ-71 global query filter. Full lifecycle integration tests included.
@linear-code

linear-code Bot commented May 17, 2026 •

Copy link
Copy Markdown
OBJ-84 M5.4 — Comment threads model + API

Milestone: M5 · Wave: 2

Summary

Add comments and comment_replies tables. APIs to create/list/reply/resolve comments anchored to a document range (fieldId + optional selectionStart/end).

Acceptance

  • POST/GET/PATCH endpoints for comments
  • Threading: replies link to parent comment
  • Resolution flips is_resolved
  • Tenant-scoped

Validation

  • DB check: round-trip create + reply + resolve reflected in comments and comment_replies
  • Live API check: curl create → 201; list → 200 with thread; resolve → 200
  • Script: scripts/validate-obj-NNN.ps1

Branch / PR

Branch from main; target main. No trailers/footer.

Review in Linear

@objectgyan
objectgyan merged commit efb1f9c into main May 17, 2026
2 of 3 checks passed
objectgyan added a commit that referenced this pull request May 17, 2026
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