Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Add window.focus event listener alongside visibilitychange to handle cases where the Electron app loses/gains focus without the document becoming hidden (e.g., app behind other windows, different desktop/space).

The visibilitychange API is designed for browser tab visibility, which doesn't map perfectly to Electron window focus states. Adding the focus event ensures pending refreshes are flushed when the user returns to the app regardless of how they left.


Generated with mux • Model: anthropic:claude-opus-4-5 • Thinking: high

Add window.focus event listener alongside visibilitychange to handle
cases where the Electron app loses/gains focus without the document
becoming hidden (e.g., app behind other windows, different desktop/space).

The visibilitychange API is designed for browser tab visibility, which
doesn't map perfectly to Electron window focus states. Adding the focus
event ensures pending refreshes are flushed when the user returns to
the app regardless of how they left.

---
_Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking: `high`_
@ammario ammario merged commit f267209 into main Dec 21, 2025
20 checks passed
@ammario ammario deleted the code-review-08wh branch December 21, 2025 07:04
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.

2 participants