Repository navigation
fix(desktop): sleep idle pixel egg animation - #88406
Merged
teknium1 merged 1 commit intoAug 17, 2026
Merged
Conversation
frizikk
force-pushed
the
fix/desktop-pixel-egg-idle-raf
branch
from
August 17, 2026 12:37
94b9fe9 to
2b20a95
Compare
frizikk
marked this pull request as ready for review
August 17, 2026 12:37
frizikk
force-pushed
the
fix/desktop-pixel-egg-idle-raf
branch
from
August 17, 2026 13:18
2b20a95 to
d108ad5
Compare
This was referenced Aug 17, 2026
teknium1
added a commit
that referenced
this pull request
Aug 17, 2026
…imations Desktop shipped the same bug class four times in one week: a decorative animation loop that never sleeps (bots face clock #88543, pixel egg #88406, diffusion placeholder #88564, plus the #77651 hidden-renderer wave). Each fix hand-rolled the same four behaviors. This extracts them into one helper in src/lib/budgeted-loop.ts: - fps budget (default 15) on top of rAF - observability pause via the existing createRendererLoopPauseController - idle dormancy: idleWhen() true after a draw parks the loop with zero pending work until wake() — the piece every hand-rolled loop forgot - teardown: dispose() cancels the frame, disposes the controller, and makes wake() a no-op DiffusionCanvas migrates onto it as the first consumer (net -40 lines at the call site); its existing scheduling/budget/instance-cap tests pass unchanged against the migrated implementation. Helper suite covers budget, pause, park/wake, dormancy-survives-focus-churn, and dispose idempotency; sabotage run (budget+dormancy stripped) fails 4/5.
lisajlau
pushed a commit
to lisajlau/hermes-agent
that referenced
this pull request
Aug 20, 2026
…imations Desktop shipped the same bug class four times in one week: a decorative animation loop that never sleeps (bots face clock NousResearch#88543, pixel egg NousResearch#88406, diffusion placeholder NousResearch#88564, plus the NousResearch#77651 hidden-renderer wave). Each fix hand-rolled the same four behaviors. This extracts them into one helper in src/lib/budgeted-loop.ts: - fps budget (default 15) on top of rAF - observability pause via the existing createRendererLoopPauseController - idle dormancy: idleWhen() true after a draw parks the loop with zero pending work until wake() — the piece every hand-rolled loop forgot - teardown: dispose() cancels the frame, disposes the controller, and makes wake() a no-op DiffusionCanvas migrates onto it as the first consumer (net -40 lines at the call site); its existing scheduling/budget/instance-cap tests pass unchanged against the migrated implementation. Helper suite covers budget, pause, park/wake, dormancy-survives-focus-churn, and dispose idempotency; sabotage run (budget+dormancy stripped) fails 4/5.
bobaba76
pushed a commit
to bobaba76/hermes-agent
that referenced
this pull request
Aug 27, 2026
…imations Desktop shipped the same bug class four times in one week: a decorative animation loop that never sleeps (bots face clock NousResearch#88543, pixel egg NousResearch#88406, diffusion placeholder NousResearch#88564, plus the NousResearch#77651 hidden-renderer wave). Each fix hand-rolled the same four behaviors. This extracts them into one helper in src/lib/budgeted-loop.ts: - fps budget (default 15) on top of rAF - observability pause via the existing createRendererLoopPauseController - idle dormancy: idleWhen() true after a draw parks the loop with zero pending work until wake() — the piece every hand-rolled loop forgot - teardown: dispose() cancels the frame, disposes the controller, and makes wake() a no-op DiffusionCanvas migrates onto it as the first consumer (net -40 lines at the call site); its existing scheduling/budget/instance-cap tests pass unchanged against the migrated implementation. Helper suite covers budget, pause, park/wake, dormancy-survives-focus-churn, and dispose idempotency; sabotage run (budget+dormancy stripped) fails 4/5.
melon-xf
added a commit
to melon-xf/hermes-agent
that referenced
this pull request
Sep 3, 2026
…imations Desktop shipped the same bug class four times in one week: a decorative animation loop that never sleeps (bots face clock NousResearch#88543, pixel egg NousResearch#88406, diffusion placeholder NousResearch#88564, plus the NousResearch#77651 hidden-renderer wave). Each fix hand-rolled the same four behaviors. This extracts them into one helper in src/lib/budgeted-loop.ts: - fps budget (default 15) on top of rAF - observability pause via the existing createRendererLoopPauseController - idle dormancy: idleWhen() true after a draw parks the loop with zero pending work until wake() — the piece every hand-rolled loop forgot - teardown: dispose() cancels the frame, disposes the controller, and makes wake() a no-op DiffusionCanvas migrates onto it as the first consumer (net -40 lines at the call site); its existing scheduling/budget/instance-cap tests pass unchanged against the migrated implementation. Helper suite covers budget, pause, park/wake, dormancy-survives-focus-churn, and dispose idempotency; sabotage run (budget+dormancy stripped) fails 4/5.
1 of 39 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Stops
PixelEggSpritefrom waking the Desktop renderer at display cadence while an intact egg is deliberately resting. The component now uses a timeout for the long first/rest gaps and only requests animation frames when a visible frame is due. The hatch sequence renders frames 6–11 once, callsonDoneonce on the final frame, and leaves no pending renderer work afterward.Related Issue
Fixes #88395
Type of Change
Changes Made
apps/desktop/src/components/pet/pixel-egg-sprite.tsx: replace unconditional chained RAF scheduling with cancellable timeout/RAF scheduling.apps/desktop/src/components/pet/pixel-egg-sprite.test.tsx: cover rest sleeping, terminal hatch cleanup, and unmount cleanup.How to Test
NODE_ENV=test NODE_OPTIONS='--max-old-space-size=8192 --localstorage-file=/tmp/hermes-vitest-localstorage.json' npm --workspace apps/desktop exec -- vitest run --environment jsdom src/components/pet/pixel-egg-sprite.test.tsx.npm --workspace apps/desktop run typecheck.npm --workspace apps/desktop run build.Checklist
Code
pytest tests/ -qand all tests pass — N/A: this is an isolated Desktop TypeScript renderer change; focused Vitest, typecheck, ESLint, and production build were run instead.Documentation & Housekeeping
cli-config.yaml.example— N/A.CONTRIBUTING.mdorAGENTS.md— N/A.Screenshots / Logs
Focused test: 3 passed. Desktop typecheck and production build passed. Changed-file ESLint exited successfully with only the repository's existing test-style
no-restricted-globalswarnings fordocument.