mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 12:54:29 +00:00
Review findings 15 and 14. **15 — the unwind restored the value it was supposed to undo.** `previousValue` came from `readLive()`, but every live-write caller patches the DOM BEFORE committing: a fader drag is `setLive` per frame, hovering a preset auditions the whole chain. So by commit time the live DOM already held the in-progress value, `previousValue === value`, and the unwind was a no-op — and `setQuiet`'s catch, which deliberately re-mirrors the store off the live DOM, then mirrored that same never-saved value. The group audibly had the preset, the panel agreed, and a reload dropped it. It reads the value out of `before` — the file content the target check just fetched — with `readAttributeByTarget`, which is file truth. `readLive` is gone from the input shape: it existed only for this, and leaving it would invite the same mistake back. Both callers drop it. **14 — the mirror was a no-op for a group declared in a sub-composition.** Those members never enter the flat store (`childGroupState` keeps them out), so their `audioGroup*` fields come from the `DomClipChild` record — and `syncStoredGroupAttribute` only mapped `elements`. The header kept the pre-write chain, its FX button showed the old count, and `laneCount` stayed 0 so the lane disclosure never appeared for automation that now existed. Verbatim the symptom that function's own docblock claims to have fixed, fixed only for flat members. It now writes both, and only touches `domClipChildren` when the group actually has one (no notification for the common flat case). Two tests, each verified against a revert. studio: 390 files, 4389 tests. fallow clean.
@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