Comments

Namespace comments (actionstools_app/comments/), table em_actions_comments (_staging outside production), key (target_uuid, uuid). A comment’s target_uuid is the task or note it belongs to — or another comment, which is how threads nest.

Method Path Behaviour

GET

/comments/

Comments of X-Actions-TargetUUID, newest first, each with comments (replies) nested two levels.

POST

/comments/

Create. Required: body, created_by_key, created_by_email, target_type (task, note or comment), X-Actions-TargetUUID, X-InstanceId. Optional task_url for notifications.

PATCH

/comments/<uuid>/<target_uuid>/

Update top-level attributes of a comment.

DELETE

/comments/<uuid>/<target_uuid>/

Soft delete.

Creating a comment also touches its parent (an empty update refreshes updated_at), so the task or note moves to the top of its list. For a task, do_notify is queued and notifies the assignee, the owner and followers (first 40 characters of the comment). Notes look the parent up through instance_id-uuid-index; a missing note is a 404.