perf: gate ConnectionStatusIndicator /admin/health poll on Page Visibility #54
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_biz#54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
crates/hero_biz_app/src/components/connection_status.rspolls/hero_biz/admin/health+ backend_url every 10s in a never-pausinguse_futureloop. When hero_biz_app runs in a hidden iframe (parent display:none), the poll continues and burns RPCs.Repro
Observed during hero_os boot-path investigation:
/hero_biz/admin/healthrequests fired continuously in the Network tab even when no hero_biz island was mounted in the visible viewport.Fix sketch
Gate the polling loop on
document.visibilityState == "visible". When hidden, skip the tick; resume onvisibilitychange. Same pattern as Page Visibility API; reflects parent display:none for iframes.Not blocking; tracking for cleanup.