Skip to content

fix(terminal): preserve sequencing with animation callbacks - #1118

Open
loshoc wants to merge 1 commit into
magicuidesign:mainfrom
loshoc:fix/terminal-animation-complete
Open

loshoc wants to merge 1 commit into
magicuidesign:mainfrom
loshoc:fix/terminal-animation-complete

Conversation

@loshoc

@loshoc loshoc commented Dec 4, 2026

Copy link
Copy Markdown

Description

Passing onAnimationComplete to an AnimatedSpan inside Terminal stops the sequence: the callback runs, but the next line never starts. The spread props currently replace the internal completion handler.

Changes

  • Call the supplied callback from the internal handler, forwarding Motion's animation definition, before completing the sequence item.
  • Regenerate the Terminal registry JSON and full component reference.

Motivation

Consumers should be able to observe animation completion without interrupting Terminal's sequencing. Standalone AnimatedSpan callbacks continue to work too.

Reproduction:

<Terminal startOnView={false}>
  <AnimatedSpan onAnimationComplete={() => console.log("finished")}>
    first
  </AnimatedSpan>
  <TypingAnimation>NEXT</TypingAnimation>
</Terminal>

Before this change, NEXT never appears. Afterward, the callback runs and the next line types normally.

Breaking Changes

None.

Validation

An isolated Playwright check in Chrome against the real component source fails on the original version and passes with this change. It checks sequencing with and without a callback, standalone callbacks, the forwarded animation definition, and browser errors. The harness is kept outside the repository because it has no component test runner.

Checklist

  • pnpm check passes locally (13 existing lint warnings, no errors)
  • pnpm build passes locally
  • pnpm build:registry was run and the generated files are included
  • PR title follows Conventional Commits

@vercel

vercel Bot commented Dec 4, 2026

Copy link
Copy Markdown

@loshoc is attempting to deploy a commit to the product-studio Team on Vercel.

A member of the Team first needs to authorize it.

@jinho-yeom
jinho-yeom self-requested a review December 4, 2026 13:37

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