Expose MCP content actions and diagnose stuck Busy operations - #22
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9f32db7ba
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be87c1e918
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 92d3cb57e5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| var content = remote.Message; | ||
| // Explicit recipients override provider reply-all defaults, including an empty CC/BCC. | ||
| var local = new LocalDraft(Guid.NewGuid().ToString("N"), sender.Account.AccountId, mailboxId, | ||
| Recipients(to), Recipients(cc), Recipients(bcc), content.Subject, content.Body, content.Attachments ?? [], now, |
There was a problem hiding this comment.
Drop Microsoft inline parts after embedding them
When forwarding a Microsoft 365 message that contains both CID images and a regular attachment, PrepareQuotedMessageHtml embeds the images as data URIs, while Graph's createForward draft returns the original inline and regular attachments and this line stores all of them locally. send_draft subsequently retains those inline parts and creates new ones for the data URIs, duplicating every embedded image and potentially exceeding provider size limits. The Gmail follow-up now filters copied inline parts, but this Microsoft-backed path still needs to retain only the non-inline attachments.
Useful? React with 👍 / 👎.
MCP clients could mistake a missing attachment parameter or stale tool inventory for missing server support. Content actions in Calendar, People, To Do and Notes were also absent, and mail had no provider-backed reply/forward draft tool. This change exposes the app’s content operations and supplies documentation that clients can query directly.
get_capabilitiesreports server version, permissions, account allowlists, registered tool names and workflows.get_action_guide(topic)provides current tool descriptions for mail, calendar, people, tasks, notes and Drive, including discovery recovery and provider limits.The action matrix and usage guide explains required steps, permissions, recipient control, local file accessibility, retries, and unsupported provider/app operations. Cross-account mail moves, Google Drive, and OneNote notebook/section creation/deletion remain unsupported. Workspace operations call providers and need connectivity; UI caches refresh through normal sync. Provider workspace updates generally do not offer atomic version checks. Interrupted remote mutations must be inspected before retrying.
Validation: Release build has zero warnings/errors; all 515 tests pass. A real MCP HTTP client verifies the new tools are registered and the guide can be called. Regression tests cover independent workspace authorization, scoped CRUD dispatch, event send permissions, stale Notes edits, exact reply recipients, attaching a ZIP to a provider-linked draft, and Gmail thread/header preservation when changing attachments. Tests use fictional data/fake providers; no real mail was sent or account content changed.
Busy now shows the provider error, failure count, attempt/failure timestamps and recovery guidance inline. Automatic retries pause after three failures, including legacy high-count items; an explicit retry preserves history. Earlier pending actions for the same message block later actions. Unconfirmed sends cannot be retried through this path.
check_mail_actionand the app’s Check status button investigate saved IDs and bounded exact-identity matches without altering queued actions. Changed server IDs are reported with provider-side recovery guidance, not automatically rebound; inconclusive results never discard mail. The app displays check results beneath the affected item.Additional validation covers pause persistence after restart, legacy payloads, dependent moves, one explicit attempt after a pause, unconfirmed-send protection, MCP write permissions, and exact-identity versus subject-only matches. Native Xvfb captures use fictional data only. Live inspection was read-only; no live pending actions were retried or cancelled.
Pending move visibility follows the latest requested destination, including failed/retrying/paused actions. Archive from Unified Inbox removes the row from Inbox and shows it as pending in Archive. Stale source-folder sync pages cannot put it back, and startup repairs source projections left by older versions. Cancellation restores the previous pending destination, or the original source when no move remains. Duplicate destination requests are no-ops; explicitly choosing a different destination permits a retry without losing history. Regression coverage includes blocked provider calls, Unified Inbox navigation, stale sync, failures, restart, cancellation, and chained moves.