Commit f267209
authored
🤖 fix: improve code review auto-refresh reliability in Electron (#1268)
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`_1 parent c02774d commit f267209
File tree
2 files changed
+13
-5
lines changed- src/browser/hooks
2 files changed
+13
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
242 | 245 | | |
243 | | - | |
| 246 | + | |
| 247 | + | |
244 | 248 | | |
245 | 249 | | |
246 | 250 | | |
247 | 251 | | |
248 | 252 | | |
249 | | - | |
| 253 | + | |
| 254 | + | |
250 | 255 | | |
251 | | - | |
| 256 | + | |
| 257 | + | |
252 | 258 | | |
253 | 259 | | |
254 | 260 | | |
| |||
0 commit comments