mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-17 07:05:28 +00:00
Two bugs in the hover-audition that shipped in the commit before this, both invisible to its tests because a static mount never re-renders and never moves the pointer between two entries. **It reverted itself about thirty times a second.** The teardown that puts the chain back was keyed on `onChainPreview`, which the group passes as an inline arrow — and the group re-renders on every playhead tick to move the automation readouts. So React tore the effect down and re-ran it on every tick, and each teardown saw an audition in progress and undid it. The preset was heard for one frame and then silently reverted with the pointer still on the button, during playback, which is the only time there is anything to audition at all. The handler moves into a ref and the effect gets empty deps, so it runs on teardown and at no other time. **Moving to the effect beside it left a measurement in flight.** The levelling audition was only called off by leaving the whole shelf, so sliding from Even Out Levels to Reverb kept the decode running — and when it finished it wrote a levelled version of the chain as it had been, on top of the reverb being auditioned, through the channel the document never sees. Exactly the failure the run counter was added to prevent, one gesture to its left. Every entry in the shelf now calls its neighbours' auditions off: the effects cancel levelling, levelling cancels the chain audition, and Tone cancels both despite having none of its own. The keyboard path was already right — `focusout` bubbles, so a move within the menu fires the shelf's own handler. Only the mouse leaked. Falsified: restoring the dep array fails the re-render test, and dropping the effect buttons' cancel fails the sideways-move one. studio 3685 passing, 18 todo.
@hyperframes/studio
Browser-based composition editor UI for Hyperframes. Provides a visual timeline, code editor, and live preview for building video compositions.
Install
npm install @hyperframes/studio
What it does
The studio is a React application with:
- Visual timeline — drag, resize, and arrange elements on tracks
- Code editor — edit HTML and GSAP scripts with CodeMirror (syntax highlighting, autocomplete)
- Live preview — see changes in real time as you edit
- Composition inspector — view and modify element properties
Development
The studio is embedded in the hyperframes preview command. To develop the studio UI itself:
cd packages/studio
bun run dev # Start Vite dev server
bun run build # Build for production
bun run typecheck # Type-check
Tech stack
- React 18/19, Zustand (state management)
- CodeMirror 6 (editor)
- Tailwind CSS (styling)
- Vite (bundler)
- Phosphor Icons
Documentation
Full documentation: hyperframes.heygen.com/packages/studio
Related packages
@hyperframes/core— types and parsers used by the editorhyperframes— CLI that serves the studio viahyperframes preview