Skip to content

fix(viewer): keep the flow playing when its speed changes - #63

Merged
hyamero merged 1 commit into
stagingfrom
fix/flow-speed-keeps-playing
Oct 24, 2026
Merged

hyamero merged 1 commit into
stagingfrom
fix/flow-speed-keeps-playing

Conversation

@hyamero

@hyamero hyamero commented Oct 23, 2026

Copy link
Copy Markdown
Member

What and why

Clicking the flow speed button while the flow plays snapped every pulse back to the start of the loop. FlowLayer reads the speed from a ref so that a change carries on without a jump, but ExploreProvider recomputed emphasis on every state change, including speed, playing and reveal. That built a new Flow, and the layer's effect restarted its clock at 0.

emphasis now takes an EmphasisInput (a Pick of the 8 fields it reads), and the memo depends on exactly those fields. Playback toggles no longer rebuild emphasis or the edge layer.

How it was checked

  • New src/explore/ExploreContext.test.tsx:
    • emphasis keeps its identity through togglePlay and cycleSpeed;
    • selecting a node or hiding a type still rebuilds it.
    • The first case fails when the memo is reverted to [draft, graph, state].
  • bun run test, bun run typecheck and bun run build pass.
  • e2e/flow.spec.ts and e2e/explore.spec.ts could not run locally (Chromium is missing system libraries), so CI's e2e job covers them.

@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
stackmap-site Ready Ready Preview Oct 23, 2026 4:42pm UTC

@hyamero
hyamero merged commit 0b1d856 into staging Oct 24, 2026
7 checks passed
@hyamero
hyamero deleted the fix/flow-speed-keeps-playing branch October 24, 2026 04:07
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.6.1-rc.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.6.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

This branch was successfully deployed

1 active deployment
Preview — 69179b23 Deployed Oct 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant