Skip to content

fix(core): resolve stopped delayed and paused starts - #2658

Open
peterolkhov wants to merge 1 commit into
pmndrs:nextfrom
peterolkhov:codex/fix-stopped-pending-starts
Open

peterolkhov wants to merge 1 commit into
pmndrs:nextfrom
peterolkhov:codex/fix-stopped-pending-starts

Conversation

@peterolkhov

Copy link
Copy Markdown

Why

Stopping a delayed or paused animation can leave its start() promise pending. A later resume can also restart work that was already stopped. Controller child callbacks expose the same gap when they call stop() before the parent has registered the update.

What

Settle waiting schedules when stopped, remove their own pending callbacks, and register update ownership before synchronous child callbacks run. Keep cancellation results distinct from ordinary stops, preserve fresh nested starts, and stop interrupted loop iterations from restarting.

Added regressions for delayed/paused starts, Controller and SpringValue callbacks, keyed stops, cancellation predicates, nested starts and callback errors. Includes a core patch changeset.

Validation

  • Hosted unit/browser run: 548 unit tests passed on Node24 and Node22; 13 E2E tests passed. Build, package checks, types, lint and formatting passed. Lint retains existing warnings.
  • Compiler matrix: build, repository types and 50 type tests passed with actual TypeScript5.7.3,5.9.3,6.0.3 and7.0.2.
  • Frozen cases fail on the unchanged base and pass with this patch. Tests use the project's existing clock helpers.

Checklist

  • Ready to be merged

AI-assisted patch with independent automated review and hosted test verification.

@changeset-bot

changeset-bot Bot commented Nov 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 84a0299

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@react-spring/core Patch
@react-spring/animated Patch
@react-spring/parallax Patch
@react-spring/rafz Patch
@react-spring/shared Patch
@react-spring/types Patch
@react-spring/three Patch
@react-spring/web Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
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