feat(conv): per-topic reply automation with promotion - #870
Open
kmonsoe wants to merge 2 commits into
Open
Conversation
This was referenced Aug 28, 2026
conv_topics gains agent_mode + auto_promoted_at (migration 0085); a topic mode overrides the per-conversation mode in the runner detail, queue DTO and dashboard. ConvAutomationService aggregates the 30-day review record per topic and flips modes, emitting conversation.topic_automation_changed. Control endpoints, MCP tools (conv_list/set_topic_automation), promote-topic-to-auto-send skill, and the dashboard Automation screen with readiness gate, promote dialog and one-click demotion. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CPwvC1MqF1uhpNqC8BmvQN
kmonsoe
force-pushed
the
feat/conv-topic-automation
branch
from
August 28, 2026 16:35
129cdb9 to
a479990
Compare
The block was inserted under dashboard.overview, so the Automation screen rendered raw message keys. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CPwvC1MqF1uhpNqC8BmvQN
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.
Stacked on #869 (→ #868 → #867 → #866 → #865). The design's "Automation" screen and promote dialog, with the backend under them.
Backend
0085_conv_topic_automation—conv_topics.agent_mode varchar(16)(null = inherit) +auto_promoted_at timestamptz. Idempotent (ADD COLUMN IF NOT EXISTS), journalwhenstrictly above 0084's; smoke-tested against a DB already at 0084 and re-run to prove idempotency.getConversation(what the runner acts on → promoting a topic flips its conversations to auto-send with no runtime change) and the queue DTO (agentModeresolved + rawtopicAgentModefor the nudge line).ConvAutomationService— per-topic 30-day review record (approved-unedited / edited / rejected via theapprovedDraftanddraft_reply_rejectedstamps from feat(conv): review-queue read model, internal notes, draft reject stamps #865, weekly volume, auto-sent) + org-wide 7-day auto-rate;setTopicAgentModestampsauto_promoted_aton promotion (kept on re-promotion, cleared otherwise) and emits the newconversation.topic_automation_changedcatalog event.GET /v1/conversations/automation,POST /v1/conversations/topics/:topicId/agent-mode; MCP toolsconv_list_topic_automation(read) /conv_set_topic_automation(destructive, pre-checked 404 on unknown topic — no bare 500s); skillpromote-topic-to-auto-senddocumenting the evidence → judgement → promote/demote loop. Docs fixtures + openapi regenerated (218 tools, 51 skills).Dashboard
pages/automation.tsx— header with the big 7-day auto-rate figure; per-topic table (volume/window, approved-unedited % with bar, cobalt at ≥90 %); actions per state:Auto-send on+ one-click Back to manual, Promote to auto when the ≥90 % gate holds, or the hold note (needs ≥90% unedited/always humanforofftopics).Topic · Auto/Review/Human(cobalt when effective mode is auto); Automation joins the Oversight nav group (admin-only). Full en + nb transcreation.Tests
conv-automation.service.test.ts: disposition math incl. 7-day auto-rate, promotion stamp kept on re-promotion / cleared on demotion, event emission ×4, 404 pre-check.conv.service.test.ts: topic mode overrides conversation mode in both detail and queue reads.🤖 Generated with Claude Code
https://claude.ai/code/session_01CPwvC1MqF1uhpNqC8BmvQN