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

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

Summary

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

Closes #14

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 #14 ## 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 3m51s
Build and Test / build (push) Successful in 3m46s
873c588082
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 873c588082
All checks were successful
Build and Test / build (pull_request) Successful in 3m51s
Build and Test / build (push) Successful in 3m46s
to 4720d3bbee
All checks were successful
Build and Test / build (push) Successful in 5m22s
Build and Test / build (pull_request) Successful in 7m14s
2026-04-29 19:09:21 +00:00
Compare
zaelgohary merged commit 46f2455a51 into development 2026-04-29 19:26:09 +00:00
zaelgohary deleted branch development_perf_pause_polls_when_defocused 2026-04-29 19:26:10 +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_agent!13
No description provided.