fix(unified-inbox): don't discard every account's envelopes if one account fails#13204
Open
ktogias wants to merge 4 commits into
Open
fix(unified-inbox): don't discard every account's envelopes if one account fails#13204ktogias wants to merge 4 commits into
ktogias wants to merge 4 commits into
Conversation
…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>
Author
|
You're right, and I'm sorry. I missed the guideline about the disclosure. |
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fetchEnvelopes()andfetchNextEnvelopes()combine every constituent account's envelope fetch into the unified/priority inbox viaPromise.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 infetchNextEnvelopes().Test plan
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