Skip to content

fix(ui): remove redundant envelope fetch on mailbox switch#13220

Open
ChristophWurst wants to merge 1 commit into
mainfrom
fix/ui/remove-redundant-envelope-fetch
Open

fix(ui): remove redundant envelope fetch on mailbox switch#13220
ChristophWurst wants to merge 1 commit into
mainfrom
fix/ui/remove-redundant-envelope-fetch

Conversation

@ChristophWurst

@ChristophWurst ChristophWurst commented Jul 6, 2026

Copy link
Copy Markdown
Member

The mailbox watcher fetch was introduced in fe12a29 to fix threads disappearing after a refresh, but that case is fully covered by the guarded calls in mounted() and the route watcher. On every switch to an uninitialized or empty mailbox it duplicated the fetch that the child Mailbox component already performs and threw an unhandled MailboxNotCachedError for mailboxes that were not initialized yet.

Ref #10084 (review)

Assisted-by: Claude:claude-fable-5

How to test

  1. Add a new account
  2. Open the browser console and network tab
  3. Navigate to one of its mailboxes (other than inbox if it's opened by default)
  4. Observe the XHRs

main: two identical GETs to fetch messages of the mailbox
here: only one request

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

The mailbox watcher fetch was introduced in fe12a29 to fix threads
disappearing after a refresh, but that case is fully covered by the
guarded calls in mounted() and the route watcher. On every switch to
an uninitialized or empty mailbox it duplicated the fetch that the
child Mailbox component already performs and threw an unhandled
MailboxNotCachedError for mailboxes that were not initialized yet.

Assisted-by: Claude:claude-fable-5
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
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.

1 participant