Goal
When the agent calls draft_reply (existing tool, see PR #965), the resulting draft lands in the dashboard's Drafted column with per-draft Send / Edit / Discard actions — not as text in a chat. This is the first column that demonstrates the dashboard's "agent does work, human approves" loop, which is the central trust-arc claim for this surface.
Why now
Fourth sub-issue under #1007. Comes after the state machine (#1010) because drafts are stateful items (drafted → approved → sent). Comes before persistence (#1007 sub-issue 7) because we want the loop visible even if it doesn't survive restart yet.
Scope
- When the agent invokes
draft_reply, surface the result in the dashboard's Drafted column, not (only) in the chat stream.
- Each drafted-reply card displays:
- Recipient(s), subject, body preview (truncated, expandable).
- Three actions: Send (gates through existing
TOOLS_REQUIRING_CONFIRMATION for send_draft), Edit (opens the draft for inline edit before send), Discard (state → dismissed, agent's draft is dropped).
- Send action reuses the existing
send_draft tool — no parallel send path.
- Edit action: minimal inline editor (textarea), saved edits update the action store payload before send.
- Drafts persist in the in-session store across Refreshes during the same session.
- Render the count badge on the column header (e.g. "Drafted (2)").
Acceptance
Out of scope
- Persistent drafts across restarts (sub-issue 7).
- Auto-drafting from background events (sub-issue 9).
- Multi-recipient cc/bcc UI beyond what
send_draft already accepts.
Depends on
- #1010 (state machine + store)
Refs
- Parent: #1007
- Existing draft / send tooling: PR #965
Goal
When the agent calls
draft_reply(existing tool, see PR #965), the resulting draft lands in the dashboard's Drafted column with per-draft Send / Edit / Discard actions — not as text in a chat. This is the first column that demonstrates the dashboard's "agent does work, human approves" loop, which is the central trust-arc claim for this surface.Why now
Fourth sub-issue under #1007. Comes after the state machine (#1010) because drafts are stateful items (
drafted → approved → sent). Comes before persistence (#1007 sub-issue 7) because we want the loop visible even if it doesn't survive restart yet.Scope
draft_reply, surface the result in the dashboard's Drafted column, not (only) in the chat stream.TOOLS_REQUIRING_CONFIRMATIONforsend_draft), Edit (opens the draft for inline edit before send), Discard (state →dismissed, agent's draft is dropped).send_drafttool — no parallel send path.Acceptance
draft_replyresults appear in the Drafted column with no chat-driving required.send_drafttool fires → state moves tosenton success, item removed from Drafted column, summary appears in Archived-this-session column.dismissedand the agent's draft is dropped (no future Refresh resurrects it in this session).send_draftconfirmation gating is preserved — no bypass path.Out of scope
send_draftalready accepts.Depends on
Refs