Skip to content

fix(ui): pause mascot animation while hidden or reduced-motion is requested - #8435

Closed
AmirrezaFarnamTaheri wants to merge 3 commits into
tinyhumansai:mainfrom
AmirrezaFarnamTaheri:upstream/fix-mascot-hidden-animation-20261027
Closed

AmirrezaFarnamTaheri wants to merge 3 commits into
tinyhumansai:mainfrom
AmirrezaFarnamTaheri:upstream/fix-mascot-hidden-animation-20261027

Conversation

@AmirrezaFarnamTaheri

Copy link
Copy Markdown

Problem

The mascot RAF clock continuously runs when the page is hidden or the user requests reduced motion, wasting work and creating jumps when visibility changes.

Change

Introduce a shared useAnimationActivity external-store hook for visibility and the prefers-reduced-motion media query. Accumulate active elapsed time in useMascotClock, stopping RAF while hidden or reduced-motion and resuming without resetting or jumping.

Tests

New deterministic hook tests stub requestAnimationFrame, performance.now, page visibility, and media query changes, including pause/resume and cleanup.

No model/provider or fork-only functionality. Draft pending upstream CI.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Author

Closing as a duplicate of #8438: superseded by broader motion and WebGL fix; the deterministic mascot-clock tests were transferred to the canonical PR. Keeping one upstream review thread avoids redundant CI and conflicting merges. The canonical PR remains draft pending review and CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant