Skip to content

fix(unified-inbox): don't discard every account's envelopes if one account fails#13204

Open
ktogias wants to merge 4 commits into
nextcloud:mainfrom
ktogias:fix/unified-inbox-one-account-failure
Open

fix(unified-inbox): don't discard every account's envelopes if one account fails#13204
ktogias wants to merge 4 commits into
nextcloud:mainfrom
ktogias:fix/unified-inbox-one-account-failure

Conversation

@ktogias

@ktogias ktogias commented Jul 3, 2026

Copy link
Copy Markdown

Summary

fetchEnvelopes() and fetchNextEnvelopes() combine every constituent account's envelope fetch into the unified/priority inbox via Promise.all(), which rejects as soon as any single promise rejects. A single account that's temporarily unreachable (throttled provider, network hiccup, provisioned account with an unavailable server, etc.) was therefore enough to make the whole unified mailbox render nothing at all, discarding every other account's already-successful envelopes too.

This matches the failure shape described in #9072 ("Other section of unified inbox doesn't load for new accounts") — one account's IMAP server being unavailable breaking the combined view for every account.

Fix

Catches each individual account's fetch before it reaches Promise.all(), so a failing account contributes an empty list instead of failing the whole batch. Same reasoning applied to the pagination path in fetchNextEnvelopes().

Test plan

  • Added a unit test with two accounts where one throws — confirms the working account's envelopes still render.
  • Verified the new test fails without the fix (reproduces the original bug) and passes with it.
  • npx vitest --run src/tests/unit/store/actions.spec.js — 24/24 passing.
  • npx eslint src/store/mainStore/actions.js — 0 errors (pre-existing unrelated jsdoc warnings only).

Fixes #9072

…count fails

fetchEnvelopes() and fetchNextEnvelopes() combine every constituent
account's envelope fetch into the unified/priority inbox via
Promise.all(), which rejects as soon as any single promise rejects.
A single account that's temporarily unreachable (throttled provider,
network hiccup, etc.) was therefore enough to make the whole unified
mailbox render nothing at all, discarding every other account's
already-successful envelopes too.

Catches each individual account's fetch before it reaches Promise.all(),
so a failing account contributes an empty list instead of failing the
whole batch. Same reasoning applied to the pagination path in
fetchNextEnvelopes().

Fixes nextcloud#9072

Signed-off-by: Konstantinos Togias <info@ktogias.gr>
@ktogias

ktogias commented Jul 3, 2026

Copy link
Copy Markdown
Author

You're right, and I'm sorry. I missed the guideline about the disclosure.

ktogias added 2 commits July 4, 2026 02:31
… one account fails

fix(unified-inbox): don't discard every account's envelopes if one account fails

Fixes nextcloud#9072

Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Konstantinos Togias <info@ktogias.gr>
…ilure' into fix/unified-inbox-one-account-failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

*Other* section of unified inbox doesn't load for new accounts

1 participant