Skip to content

Support cross-account bulk actions - #144

Merged
rajzik merged 14 commits into
mainfrom
codex/issue-61-cross-account-bulk-actions
Jul 24, 2026
Merged

rajzik merged 14 commits into
mainfrom
codex/issue-61-cross-account-bulk-actions

Conversation

@rajzik

@rajzik rajzik commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #61

Summary

  • add unified mailbox multi-selection with capability-safe bulk action menus, including typed shared move destinations
  • execute durable provider actions in concurrent connection-scoped batches with coherent progress and partial-success reporting
  • persist authorization-loss work for retry and attribute failures to exact stable message identities
  • document the behavior and add a release changeset

Validation

  • strict Apple formatting and SwiftLint
  • focused MailboxConnectionAdapterTests on iPhone 17 Simulator
  • complete unwired-mail test suite on iPhone 17 Simulator
  • pnpm lint and format
  • workspace TypeScript checks and tests
  • Fallow codebase analysis
  • independent standards and issue-spec reviews: clean

Summary by CodeRabbit

  • New Features
    • Select multiple threads across mailbox connections and apply supported bulk mail actions.
    • View bulk-action progress, independent connection status, and detailed failures.
    • Bulk moves now target compatible mailbox destinations safely.
  • Bug Fixes
    • Actions resume after reconnection or authorization recovery, with retries for temporary failures.
    • Successful actions remain completed even when another connection encounters an error.
    • Provider mail actions do not modify product-owned Pins.
  • Documentation
    • Updated Gmail mail action documentation with persistence, retry, recovery, and failure-handling details.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (9)
  • README.md is excluded by none and included by none
  • apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift is excluded by none and included by none
  • apps/unwired-mail/unwired-mail/Features/Account/GenericMailSetupPanel.swift is excluded by none and included by none
  • apps/unwired-mail/unwired-mail/Services/Mailbox/IMAPMailboxConnectionAdapter.swift is excluded by none and included by none
  • apps/unwired-mail/unwired-mail/Services/Mailbox/MailboxConnection.swift is excluded by none and included by none
  • apps/unwired-mail/unwired-mail/Services/Mailbox/PendingProviderActionService.swift is excluded by none and included by none
  • apps/unwired-mail/unwired-mailTests/GenericMailSetupServiceTests.swift is excluded by none and included by none
  • apps/unwired-mail/unwired-mailTests/MailboxConnectionAdapterTests.swift is excluded by none and included by none
  • apps/unwired-mail/unwired-mailTests/PendingProviderActionServiceTests.swift is excluded by none and included by none

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d877a92f-4008-4a3e-9621-ec0796f7ea63

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds cross-mailbox thread selection and capability-safe bulk Gmail actions. Actions execute in independent connection-scoped batches with concurrent progress, persisted retry handling, partial failure reporting, and message-level failure details.

Changes

Cross-connection bulk mail actions

Layer / File(s) Summary
Bulk selection and action contracts
apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift, apps/unwired-mail/unwired-mail/Services/Mailbox/MailboxConnection.swift
Thread selection now uses sets, intersects provider capabilities, builds connection-specific batches, and supports move destinations and bulk result types.
Provider queue and failure lifecycle
apps/unwired-mail/unwired-mail/Services/Mailbox/MailboxConnection.swift, apps/unwired-mail/unwired-mail/Services/Mailbox/PendingProviderActionService.swift
Provider action protocols and Gmail queue handling support per-connection resumption, retries, authorization recovery, and message-level failure details.
Bulk execution and reader integration
apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift
The reader renders bulk actions and progress while the view model executes batches concurrently and aggregates successes and failures.
Behavior validation and boundary documentation
apps/unwired-mail/unwired-mailTests/MailboxConnectionAdapterTests.swift, README.md, .changeset/cross-account-bulk-actions.md
Tests cover capability intersection, partial success, retries, authorization loss, concurrency, and selection reconciliation; documentation records the provider-action behavior.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.26% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR appears to satisfy #61 with cross-account selection, connection-scoped batches, partial success handling, retries, and coverage.
Out of Scope Changes check ✅ Passed The changes stay focused on cross-account bulk actions, supporting docs, service logic, UI, and tests without obvious unrelated scope.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding cross-account bulk actions.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/issue-61-cross-account-bulk-actions

Comment @coderabbitai help to get the list of available commands.

@rajzik

rajzik commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1846b909b4

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift Outdated
Comment thread apps/unwired-mail/unwired-mail/Services/Mailbox/MailboxConnection.swift Outdated
@rajzik

rajzik commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@rajzik

rajzik commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6147c82922

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift
@rajzik

rajzik commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@rajzik

rajzik commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: b4a99283a3

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@rajzik
rajzik marked this pull request as ready for review July 24, 2026 15:28
@cursor

cursor Bot commented Jul 24, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b4a99283a3

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift Outdated
Comment thread apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a5d5c855c3

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +3399 to +3400
errorDescription: failureDetails?.isEmpty != false
? combinedErrorDescription([resumeError, retryError]) : nil,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep fallback errors scoped to selected batch

When the selected messages' detail lookup returns an empty list, this branch falls back to the connection-level resumeError/retryError. Fresh evidence after the earlier fix is that GmailMailboxConnectionAdapter.resumePendingActions(connection:) returns failureDescription for every failed or userActionRequired row on that connection, so an old failed pending action for another message/action will make a newly successful bulk batch appear failed; keep [] as “no batch-scoped failure” unless the error is known to come from this batch.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2da4378: compact navigation remains in the thread list while Edit mode is active, enabling multi-select; it updates to the selected conversation or bulk-actions column when editing ends.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction: the compact-navigation fix belongs to the separate thread below. This fallback-error concern conflicts with the earlier resolved guidance to preserve connection-level errors when detail lookup is empty, so it remains unresolved pending a scoped-error design.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deferred to #153 because the concern conflicts with the already-resolved fallback behavior. The follow-up defines batch-to-error association and regression coverage; this thread remains unresolved until that design is implemented.

Comment thread apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift
rajzik added 2 commits July 24, 2026 21:42
…account-bulk-actions

# Conflicts:
#	apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2f56f2e207

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift Outdated
Comment thread apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift
Comment thread apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift Outdated
Comment thread apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 24a0c05782

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift Outdated
Comment thread apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dea13a4ab2

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift
@rajzik
rajzik merged commit 6e3265e into main Jul 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support cross-account bulk actions

1 participant