Skip to content

Conversation

@kube
Copy link
Collaborator

@kube kube commented Jan 16, 2026

Simple strokeWidth animation

Kapture.2026-01-19.at.02.37.27.mp4

🌟 What is the purpose of this PR?

Because we do not necessarily show all frames during Playback, we possibly skip the frames where transitions happen, and no transition animation is shown to the user.

This PR solves that by not relying on the current frame only (check if current frames fires a given transition), but instead relying a count of transitions since previous frame.

Arc Animation

This PR leverages the same idea to show a "flow" inside arcs when their linked transition fired.

Because a transition firing is a discrete event (not even happening inside one frame, but between two), we display an animation for a certain amount of time to make it clear to the user that something happened in it.

But because an other firing can happen during the animation of a previous one, we cumulate the remaining of animations so the arc width increases to reflect this accumulation.

Other fixes

  • Fix token count display in PlaceNode inside SDCPNView

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • modifies an npm-publishable library and I have added a changeset file(s)

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

🐾 Next steps

This is just a first step in animating the "flow" inside the Arcs and Transitions.

Many better animations are possible, we'll iterate on that later to make it better.

Currently orchestration of every animation still relies on React, and this can lead to some performance issues.

Though there are many performance bottlenecks to address upstream prior to enhancing this part alone.

@github-actions github-actions bot added area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team labels Jan 16, 2026
@vercel
Copy link

vercel bot commented Jan 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Review Updated (UTC)
ds-theme Ignored Ignored Preview Jan 21, 2026 11:22pm
hashdotdesign Ignored Ignored Preview Jan 21, 2026 11:22pm

Copy link
Collaborator Author

kube commented Jan 16, 2026

@kube kube changed the base branch from cf/petrinaut-remove-zustand to graphite-base/8262 January 19, 2026 20:07
@kube kube force-pushed the cf/h-5982-improve-transition-animation branch from 26b3b2b to c56dfe9 Compare January 20, 2026 00:17
@kube kube force-pushed the graphite-base/8262 branch from bc88dae to bd38d6a Compare January 20, 2026 00:17
@kube kube changed the base branch from graphite-base/8262 to cf/petrinaut-remove-zustand January 20, 2026 00:17
@vilkinsons vilkinsons changed the title Fix token count display in PlaceNode inside SDCPNView FE;204: Fix token count display in PlaceNode inside SDCPNView Jan 20, 2026
kube added 18 commits January 21, 2026 19:05
…roduced useFiringAnimation hook for smoother animations, updated transition styles, and removed deprecated fired state handling.
…roperties to use consistent naming (`timeSinceLastFiringMs` and `firedInThisFrame`). Adjusted related tests and components to reflect these changes, ensuring accurate simulation behavior and improved clarity in the codebase.
… module. Removed redundant type definitions from the simulator module and re-exported necessary types for improved organization and clarity. Added detailed comments to enhance understanding of simulation structures.
kube and others added 2 commits January 21, 2026 23:58
When the component mounts while viewing a later frame, the previous
firingCount ref is null. Previously this defaulted to 0, causing a
large delta and triggering a fake firing animation.

Now we treat null ref as "no delta" and also ignore negative deltas
when scrubbing backwards.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Using a raw <path> instead of BaseEdge drops ReactFlow's built-in edge
interaction handling (e.g., wider hitbox via interactionWidth), making
arcs harder to select/hover.

Now using BaseEdge for the interactive path and keeping the animated
overlay path layered on top.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@kube kube added this pull request to the merge queue Jan 22, 2026
Merged via the queue into main with commit 4ac5c57 Jan 22, 2026
44 checks passed
@kube kube deleted the cf/h-5982-improve-transition-animation branch January 22, 2026 12:08
@hashdotai hashdotai mentioned this pull request Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

3 participants