feat(conv): review-queue read model, internal notes, draft reject stamps - #865
Open
kmonsoe wants to merge 1 commit into
Open
feat(conv): review-queue read model, internal notes, draft reject stamps#865kmonsoe wants to merge 1 commit into
kmonsoe wants to merge 1 commit into
Conversation
GET /v1/conversations/queue enriches rows with customer, topic, channel type, active claim, note count and pending-draft flag. Internal notes stamp metadata.kind=internal_note and internal messages no longer bump last_message_at. clear-draft stamps draft_reply_rejected instead of deleting; replaced drafts stamp draft_reply_superseded; draft_reply_sent merges metadata so retrievedDocumentIds survives approval. New GET /v1/orgs/me/roster (member-accessible) and POST /v1/conversations/:id/request-draft with catalog events conversation.draft_requested / draft_ready / note_added. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CPwvC1MqF1uhpNqC8BmvQN
This was referenced Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First slice of the Oversight console rebuild (per
OVERSIGHT-HANDOVER.md— supersedes the closed #858–#863 stack). Backend read/write model the review queue sits on; no dashboard changes yet.What's here
GET /v1/conversations/queue— the list DTO the handover's item 1 asked for: left-joinsconv_contacts,conv_topics,conv_channelsand returnscustomerName/customerEmail,topicName/topicSlug,channelType, the active claim (holderId,holderName,expiresAt),noteCount, andhasPendingDraft. Claim + note stats load as two batched queries over the page, not per-row subqueries.conv_messagesrows:internal: true,metadata.kind = 'internal_note'(stamped bysendMessagefor user/agent internal messages). Internal messages no longer bumplast_message_at, so recording context can't reorder the queue. Newconversation.note_addedevent keeps other operators' panes live.clearDraftReplystampsdraft_reply_rejected(+rejectedByUserId,rejectedAt) instead of hard-deleting; a draft replaced by a newer one is stampeddraft_reply_supersededwith the new draft's id.draft_reply_sentnow merges into the draft's metadata soretrievedDocumentIdssurvives approval.GET /v1/orgs/me/roster(handover item 6) — members + active claim counts, readable by any org member (unlike the owner/admin-gated members endpoint). Feeds "On duty now".POST /v1/conversations/:id/request-draft— the design's "Ask for a draft": pre-checks (open, non-voice, end-user bound, agent not off, no pending draft →409 conv_draft_pending) then emitsconversation.draft_requested. The runner-side handling ships with the rationale PR next.setDraftReplynow emitsconversation.draft_readyso the queue refreshes when a requested draft lands.subscribe-to-eventsskill updated with the three new conv events.Tests
conv.service.test.ts(queue enrichment, end-user fallback, note no-bump/no-reorder invariant, note stamping + events, attention preserved, reject stamp, supersede, draft_ready, request-draft happy/conflict/closed) + roster controller tests (member access, api-key viewer).pnpm vitest run src/modules/conv src/control src/modules/webhooks: 615 passed.@getmunin/types: 82 passed. Typecheck clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01CPwvC1MqF1uhpNqC8BmvQN