-
Notifications
You must be signed in to change notification settings - Fork 656
bug(gmail): draft replies via --reply-to-message-id don't set a recipient (no --to inference, no --reply-all) #804
Copy link
Copy link
Closed
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossThis issue is about lost, duplicated, misrouted, or suppressed channel messages.This issue is about lost, duplicated, misrouted, or suppressed channel messages.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossThis issue is about lost, duplicated, misrouted, or suppressed channel messages.This issue is about lost, duplicated, misrouted, or suppressed channel messages.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
gog gmail drafts create/drafts updatewith--reply-to-message-id(or--thread-id)auto-populate the subject (
Re: …), threading headers (In-Reply-To/References), and thequoted body, but do not set the recipient. The draft's
Tois taken only from--to, anddrafts allow an empty recipient, so a reply draft created without
--tois silently saved with norecipient. It looks like a proper reply (correct subject/thread/quote) but can't be sent as-is.
This is the natural follow-up to the reply-parity fixes in #488 (subject), #512 (threading headers),
and #673 (
--thread-id) — recipient is the one reply attribute still not derived.Repro
Expected
Either the recipient auto-populated from the reply target (matching the Gmail UI and
gog gmail send --reply-all), or at least a warning when a reply draft is created with an empty recipient.Actual
Draft saved with an empty
To. No error or warning.Root cause (v0.22.0, 197992a)
internal/cmd/gmail_drafts.go:324—Tois built only fromsplitCSV(input.To); the reply lookup(
prepareComposeReply) supplies subject/threading/quote but the sender is never used forTo.internal/cmd/gmail_drafts.go:327— drafts build withrfc822Config{allowMissingTo: true}, so themissing-recipient guard at
internal/cmd/gmail_mime.go:52is skipped (intentional, per feat(gmail): allow drafts without a recipient #57"allow drafts without a recipient").
gog gmail sendis protected:--tois required unless--reply-all(
internal/cmd/gmail_send.go:93-95), and--reply-allauto-populates recipients from the replytarget (
internal/cmd/gmail_send.go:25). Drafts have neither.Impact
Especially bites scripted/agent workflows: the draft looks complete, so the empty recipient goes
unnoticed until a human opens or tries to send it.
Suggested fix
--reply-alltodrafts create/updatefor parity withsend.--tois empty, defaultToto the original sender(Gmail-UI behavior), keeping the empty-draft use case from feat(gmail): allow drafts without a recipient #57 when no reply target is given.
Environment
gog v0.22.0 (confirmed by reading source at
197992a; behavior is longstanding).