Skip to content

fix(ui): load priority inbox sections when their initial sync is locked - #13847

Merged
ChristophWurst merged 1 commit into
nextcloud:mainfrom
stiller:fix/priority-inbox-locked-init
Nov 20, 2026
Merged

ChristophWurst merged 1 commit into
nextcloud:mainfrom
stiller:fix/priority-inbox-locked-init

Conversation

@stiller

@stiller stiller commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

On the first open of the priority inbox, the Important and Other sections initialize the same uncached INBOX in parallel. The loser gets MailboxLockedError, which syncEnvelopes deliberately rethrows for an initial sync (d572d04) so the component can load the messages instead. initializeCache never did: it only loaded after a successful sync and wasn't awaited, so the section kept spinning or stayed hidden.

Solution: Await the sync, fall back to loading the messages when the folder is locked, and let other errors reach the existing error state. The parallel syncs themselves are left as they are.

Fixes #13846

Assisted-by: Claude:claude-opus-5-5

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

@ChristophWurst

Copy link
Copy Markdown
Member

Thank you for the patch

@github-actions

Copy link
Copy Markdown

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@stiller

stiller commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Hi @GretaD, friendly ping on this one. It still merges cleanly onto main. Let me know if you'd like anything changed or tested.

The failing check-ai-trailers check isn't about the commit: the Assisted-by trailer is detected, but adding the "AI assisted" label then fails with 403 Resource not accessible by integration, since PRs from forks only get a read-only token. Same on other fork PRs, e.g. from hazveg.

@GretaD GretaD added the AI assisted This PR contains AI-assisted commits label Nov 5, 2026
Comment thread src/components/Mailbox.vue Outdated
})
}

this.loadingCacheInitialization = false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

logic is correct, but on the error path loadingCacheInitialization stays
true; harmless since v-if="error" wins, but a finally resetting it would be cleaner.

@GretaD GretaD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

tested and works

@GretaD

GretaD commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Please rebase and fix the conflicts, and deliver the small comment i left. Thank you again

@stiller
stiller force-pushed the fix/priority-inbox-locked-init branch from e56fd34 to 1e8a1bc Compare November 6, 2026 09:48
@stiller

stiller commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main and moved the reset into a finally. Your skeleton fix from main stays on the success path; on the locked path the skeleton stays until the other section's sync is done. Thanks for the review!

@stiller

stiller commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Could someone approve the workflow runs? They're waiting since the rebase on Thursday. Thanks.

On the first open of the priority inbox, the Important and Other
sections initialize the same uncached INBOX in parallel. The loser gets
MailboxLockedError, which syncEnvelopes deliberately rethrows for an
initial sync (d572d04) so the component can load the messages
instead. initializeCache never did: it only loaded after a successful
sync and wasn't awaited, so the section kept spinning or stayed hidden.

Await the sync, fall back to loading the messages when the folder is
locked, and let other errors reach the existing error state. The
parallel syncs themselves are left as they are.

Fixes nextcloud#13846

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Joachim Nolten <joachim@nolten.org>
@ChristophWurst
ChristophWurst force-pushed the fix/priority-inbox-locked-init branch from 1e8a1bc to 1456026 Compare November 20, 2026 13:19
@ChristophWurst
ChristophWurst merged commit 91c5eaf into nextcloud:main Nov 20, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review AI assisted This PR contains AI-assisted commits feedback-requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Priority inbox: a section stays empty on first open (locked initial sync)

3 participants