Skip to content

Fix: pause widget animations off screen and stop VPN loop stacking - #512

Merged
SandObserver merged 1 commit into
mainfrom
fix/animation-loops
Oct 19, 2026
Merged

SandObserver merged 1 commit into
mainfrom
fix/animation-loops

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Add whileOnScreen(el, onChange) to the widget toolbox: reports whether an element intersects the viewport in a visible tab, through IntersectionObserver and visibilitychange.
  • Gate the Connections map pulse loop and the VPN geo pulse loop on it. A refresh off screen still paints one frame.
  • Store the VPN frame id on every request and clear it at the start of each paint, so a render cancels the running loop instead of starting another.
  • Keep the Analog clock stopped on visibilitychange while its face is off screen.
  • Refresh the cache-busting stamps.

Testing
All green. Added tests for whileOnScreen and for the map pausing off screen and resuming on return.

Changelog

Fixed

  • Stop the Connections VPN view from stacking animation loops while its page is off screen.
  • Pause the Analog clock, Connections map and VPN animations on dashboard pages not shown.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.

Add whileOnScreen to the widget toolbox and gate the Connections map and
VPN animation loops on it. Track the VPN frame id so each render keeps
one loop. Keep the Analog clock stopped on tab return while it is off
screen.
@SandObserver SandObserver added the bug Something isn't working label Oct 19, 2026
@SandObserver
SandObserver merged commit 30a2069 into main Oct 19, 2026
6 checks passed
@SandObserver
SandObserver deleted the fix/animation-loops branch October 19, 2026 05:05
stackyard-release Bot pushed a commit that referenced this pull request Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant