perf(ui): pause iframe /health polling when defocused #37

Merged
zaelgohary merged 1 commit from development_perf_pause_polls_when_defocused into development 2026-04-29 19:24:56 +00:00
Member

Summary

Iframe self-checks parent window focus class via window.frameElement.closest; poll() bails when not focused.

Closes #38

Changes

  • Added isInFocusedHeroWindow() check
  • Exposed window.heroIsFocused for embedded WASM
  • Bumped default poll interval 5s → 30s

Test Results

Verified end-to-end as part of cross-repo focus-pause work.

## Summary Iframe self-checks parent window focus class via window.frameElement.closest; poll() bails when not focused. ## Related Issue Closes #38 ## Changes - Added isInFocusedHeroWindow() check - Exposed window.heroIsFocused for embedded WASM - Bumped default poll interval 5s → 30s ## Test Results Verified end-to-end as part of cross-repo focus-pause work.
perf(ui): pause /health polling in iframe when defocused
All checks were successful
Build & Test / check (pull_request) Successful in 4m42s
Build & Test / check (push) Successful in 4m42s
0048126e63
Iframe-side self-check via window.frameElement.closest finds the
hero_os shell window class; poll() bails when not focused.
window.heroIsFocused exposed for embedded WASM apps in the iframe.
Default interval bumped 5s -> 30s for the focused fallback.
zaelgohary force-pushed development_perf_pause_polls_when_defocused from 0048126e63
All checks were successful
Build & Test / check (pull_request) Successful in 4m42s
Build & Test / check (push) Successful in 4m42s
to 8186fc74a1
All checks were successful
Build & Test / check (push) Successful in 3m36s
Build & Test / check (pull_request) Successful in 4m13s
2026-04-29 19:09:23 +00:00
Compare
zaelgohary merged commit e79ea1df9d into development 2026-04-29 19:24:56 +00:00
zaelgohary deleted branch development_perf_pause_polls_when_defocused 2026-04-29 19:24:56 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_proxy!37
No description provided.