Ticket: Conversation Atomic Edits and Hiding by Index
Description,
We need to introduce the ability to atomically edit or hide individual conversation comments.
Unlike the previous "append-only" strictness, users (authors) need to be able to correct mistakes or hide inappropriate comments.
Crucially, these operations must target a comment by its index relative to the organization's conversation history (e.g., "edit the 3rd comment").
Acceptance Criteria / TODOs,
Database / Schema Changes (src/model/conversation.js)
Backend Logic (src/repositories/conversationRepository.js)
API Changes (src/controller/registry-org.controller or conversation.controller)
Testing,
Ticket: Conversation Atomic Edits and Hiding by Index
Description,
We need to introduce the ability to atomically edit or hide individual conversation comments.
Unlike the previous "append-only" strictness, users (authors) need to be able to correct mistakes or hide inappropriate comments.
Crucially, these operations must target a comment by its index relative to the organization's conversation history (e.g., "edit the 3rd comment").
Acceptance Criteria / TODOs,
Database / Schema Changes (src/model/conversation.js)
is_active: Boolean, defaulttrue. (Used for hiding/soft-deletion).edited_at: Date. (Timestamp of last edit).editor_uuid: String. (UUID of the user who performed the edit/hide).Backend Logic (src/repositories/conversationRepository.js)
findByTargetUUIDAndIndex:target_uuid, sort bycreated_at(ascending) + UUID (ascending) for stability..skip(index).limit(1)to retrieve the specific document.editConversationByIndex:body,edited_at, andeditor_uuid.hideConversationByIndex:is_activetofalse, updateeditor_uuid.API Changes (
src/controller/registry-org.controllerorconversation.controller)PUT /api/registryOrg/:shortname/conversation/:index(or similar path structure linked to Org).body: String (optional, for editing).is_active: Boolean (optional, for hiding).shortname.repo.findByTargetUUIDAndIndex.Testing,