-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
Summary
delete-staged fails for IMAP accounts with Error: OAuth client secrets not configured, because the CLI command only creates Gmail API clients. However, the IMAP client already implements the full gmail.API deletion interface (TrashMessage, DeleteMessage, BatchDeleteMessages with per-message fallback).
Steps to reproduce
- Add an IMAP account (e.g. iCloud Mail via
add-imap) - Stage messages for deletion (via TUI or MCP
stage_deletiontool) - Run
msgvault delete-staged <batch-id> --yes - Fails with OAuth error even though the account is IMAP, not Gmail
What I'd expect
delete-staged should detect the account type and instantiate an IMAP client (using stored credentials) instead of always assuming Gmail OAuth.
Analysis
internal/imap/client.goalready implementsTrashMessage(IMAP MOVE),DeleteMessage(UID STORE \Deleted + UID EXPUNGE), andBatchDeleteMessages(graceful fallback to per-message delete)internal/deletion/executor.goaccepts anygmail.APIinterface, which the IMAP client satisfies- The gap is in
cmd/msgvault/cmd/deletions.go— it callsfindGmailSourceand sets up OAuth unconditionally, never routing to the IMAP client
This appears to be a small wiring change rather than a fundamental limitation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels