perf(frontend): pause background polling when tab is hidden#13129
Open
hamza221 wants to merge 1 commit into
Open
perf(frontend): pause background polling when tab is hidden#13129hamza221 wants to merge 1 commit into
hamza221 wants to merge 1 commit into
Conversation
Skip the periodic inbox/mailbox/outbox polling while document.hidden is true, and add an in-flight guard to the recursive inbox sync so a slow sync cannot overlap the next scheduled run. Also fix the cleanup hooks in Mailbox.vue and Outbox.vue, which used the Vue 3 "unmounted" name and therefore never ran under Vue 2.7; renamed to "destroyed" so the interval and event-bus teardown actually execute. Assisted-by: ClaudeCode:claude-opus-4-8[1m] Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
hamza221
commented
Jun 19, 2026
hamza221
left a comment
Contributor
Author
There was a problem hiding this comment.
If the new document.hidden check is not a trivial approve.
I can split into 2 or 3 PRs
ChristophWurst
left a comment
Member
There was a problem hiding this comment.
But then the user is not notified of new mails? 🤔
Contributor
Author
Sorry about the lack of knowledge when it comes to this. But how is the user notified now? there are no notifications afaik |
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.
Skip the periodic inbox/mailbox/outbox polling while document.hidden is true, and add an in-flight guard to the recursive inbox sync so a slow sync cannot overlap the next scheduled run.
Also fix the cleanup hooks in Mailbox.vue and Outbox.vue, which used the Vue 3 "unmounted" name and therefore never ran under Vue 2.7; renamed to "destroyed" so the interval and event-bus teardown actually execute.
->https://v2.vuejs.org/v2/guide/instance#Lifecycle-Diagram
Assisted-by: ClaudeCode:claude-opus-4-8[1m]
🤖 AI (if applicable)