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

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

Summary

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

Closes #22

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 #22 ## 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 and Test / build (pull_request) Successful in 4m20s
ccb793e1e9
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 ccb793e1e9
All checks were successful
Build and Test / build (pull_request) Successful in 4m20s
to 972b0c0e95
All checks were successful
Build and Test / build (pull_request) Successful in 7m0s
2026-04-29 19:09:24 +00:00
Compare
zaelgohary merged commit 1a85b80983 into development 2026-04-29 19:25:06 +00:00
zaelgohary deleted branch development_perf_pause_polls_when_defocused 2026-04-29 19:25:06 +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_foundry!21
No description provided.