Commit Graph
117 Commits
Author SHA1 Message Date
Miguel ÁngelandClaude Opus 4.6 b726afcda8 feat(studio): add drag-and-drop from Blocks panel to Timeline
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-10 20:53:47 +00:00
Miguel ÁngelandClaude Opus 4.6 4fff683d2f feat(studio): add Blocks panel for browsing and adding registry blocks
Visual, color-coded block browser with 52 blocks across 5 categories
(VFX, Transitions, Social, Data, Scenes). Search, filter by category,
and one-click add to project compositions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-09 23:40:19 +00:00
Miguel ÁngelandClaude Opus 4.6 e0e11acec6 fix(studio): block element selection while composition is loading
Prevent users from selecting elements in the preview while the
composition is still loading (showing "Loading composition" overlay).
Selection and hover highlighting are suppressed until the player fires
the ready event.

Also reverts motion panel and manual drag editing defaults to false —
these were accidentally set to true during the PR #693 merge.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-09 21:50:30 +00:00
Miguel Ángel 4730f1db4b chore: merge next into feat/studio-inspector-selection-ux 2026-05-09 20:06:25 +00:00
Miguel ÁngelandClaude Opus 4.6 45adf4805f fix(studio): prevent read-only property crash in manual edit wrappers
The seek/play/applyAfter wrapper functions in manualEdits.ts crashed
with "Cannot set property X which has only a getter" when the player
or timeline objects define seek/play as getter-only properties. This
prevented ALL manual edits (position, rotation, size) from persisting
to disk — the error thrown during applyCurrentStudioManualEditsToPreview
aborted the save queue.

Wrapped all three property assignments in try/catch so wrapping
gracefully degrades when the target object is non-configurable.

Verified: position edit (X=42px) now persists to
.hyperframes/studio-manual-edits.json and survives page refresh.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-09 20:01:43 +00:00
Miguel ÁngelandClaude Opus 4.6 75bc3b4925 fix(studio): revert motion panel default to false
Motion panel stays opt-in via env var per product direction. Only
the Design panel is enabled by default.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-09 19:44:52 +00:00
Miguel ÁngelandClaude Opus 4.6 f3e2caf687 fix(studio): stale selection, rotation control, design panel polish
Fixes and improvements based on power-user testing feedback:

1. Fix stale selection after style edits — handleDomStyleCommit now
   calls refreshDomEditSelectionFromPreview after persisting, matching
   every other commit handler. Without this, the PropertyPanel showed
   frozen computedStyles after color/radius/shadow edits, making it
   look like editing "didn't work." Also adds error handling around
   the persist call.

2. Add rotation field to the Design panel Layout section — reads the
   current rotation angle from the manual edit manifest and commits
   via the existing handleDomRotationCommit handler.

3. Enable motion panel by default — STUDIO_MOTION_PANEL_ENABLED now
   defaults to true so the Motion tab is discoverable without env vars.

4. Color controls only when element has color — fill color section now
   only shows when the element has an explicit non-transparent
   background-color. Text color shows only when the element has a
   color style. Prevents showing color pickers on elements where
   color edits have no visible effect.

5. Exclude canvas from selection — added "canvas" to
   DOM_LAYER_IGNORED_TAGS so canvas elements are not selectable in the
   preview or listed in the layer panel.

6. Multi-selection feedback — shows "N elements selected" with
   guidance instead of the generic empty state when multiple elements
   are selected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-09 18:41:58 +00:00
Miguel ÁngelandClaude Opus 4.6 1e0ca35fd6 fix(studio): thumbnail crash, feature defaults, multi-select UX, fps selector
Power-user audit fixes for the alpha studio:

- vite.config.ts: wrap thumbnail generation in try/catch so Puppeteer
  TimeoutError doesn't crash the entire vite dev server as an uncaught
  rejection. Close the page on error to prevent browser session leaks.

- manualEditingAvailability.ts: enable motion panel and manual canvas
  drag editing by default (were both false, undiscoverable without
  knowing the env vars).

- PropertyPanel.tsx: show "N elements selected" feedback when multiple
  elements are selected instead of the generic "Select an element"
  empty state.

- RenderQueue.tsx + App.tsx: add FPS selector (24/30/60) to the render
  export bar instead of hardcoding 30fps. Pass the user's choice
  through to startRender.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-09 18:08:45 +00:00
Miguel Ángel d34a5ed2cf fix(studio): handle raster inspector clicks 2026-05-09 02:24:35 -07:00
Miguel Ángel de876a4fcc fix(studio): keep notion preview playback moving 2026-05-09 00:34:43 -07:00
Miguel Ángel 5ddf0285f5 feat(studio): simplify inspector selection ux 2026-05-08 21:40:12 -07:00
Miguel Ángel c29c159a1e chore: merge main into next 2026-05-09 02:56:24 +00:00
Miguel Ángel e47dad0dbf Merge pull request #687 from heygen-com/feat/studio-shader-loading-state
feat: show composition loading in Studio
2026-05-09 04:51:02 +02:00
Miguel Ángel ef79a2b14d feat: disable Studio timeline while composition loads 2026-05-08 19:40:49 -07:00
Miguel Ángel ba29781c56 feat: auto-open timeline clip layers 2026-05-08 18:23:49 -07:00
Miguel Ángel 48341aa776 feat: show composition loading in studio 2026-05-08 17:59:50 -07:00
Miguel Ángel 7c9648a143 fix(studio): keep motion panel opt-in 2026-05-08 17:30:21 -07:00
Miguel Ángel 6eee626980 feat(studio): enable inspector panels by default 2026-05-08 17:27:08 -07:00
Miguel Ángel e51c11c6f9 feat(studio): add alpha editor layer inspector 2026-05-08 23:24:25 +00:00
James 2b2281d490 refactor: dedupe resolution presets and clean up 4k stack 2026-05-07 16:58:26 +00:00
James bc02b8810c fix(studio): exhaustively type RESOLUTION_OPTIONS and document layout coupling 2026-05-07 16:58:26 +00:00
James 25edba803a feat(studio): add resolution selector to render export bar 2026-05-07 16:58:26 +00:00
Vance Ingalls a7b308b667 feat: cache shader transition preview frames (#634)
* feat: cache shader transition preview frames

* fix: move shader transition loading to player
2026-05-06 01:25:09 -07:00
Vance Ingalls 296d3d1980 fix: share manual edit render runtime 2026-05-04 14:46:05 -07:00
Vance Ingalls 7cc2067c71 fix: harden manual edit refresh apply 2026-05-04 14:44:31 -07:00
Vance Ingalls 381d00fe14 fix: persist manual preview edits on refresh 2026-05-04 14:44:31 -07:00
Vance Ingalls e3158c2388 fix: commit drag offsets from gesture math 2026-05-04 14:44:31 -07:00
Vance Ingalls 74df11cc0c fix: apply nested manual edits in drilled previews 2026-05-04 14:44:31 -07:00
Vance Ingalls ec4ed0bcbc fix: address studio manual edit review feedback 2026-05-04 14:44:31 -07:00
Vance Ingalls 2e11dd9a4f fix: harden studio group overlay events 2026-05-04 14:44:31 -07:00
Vance Ingalls 31a45065cc fix: select studio groups on pointerdown 2026-05-04 14:44:31 -07:00
Vance Ingalls 7f275f76f9 fix: seed additive studio selection groups 2026-05-04 14:44:30 -07:00
Vance Ingalls fa501b4830 fix: preserve studio group selections 2026-05-04 14:44:30 -07:00
Vance Ingalls e2b2885a03 feat: add studio group repositioning 2026-05-04 14:44:30 -07:00
Vance Ingalls 62b83a0e2b fix(studio): route inspector geometry through manual edits 2026-05-04 14:44:30 -07:00
Vance Ingalls d17288fc70 feat(studio): reset selected manual edits 2026-05-04 14:44:30 -07:00
Vance Ingalls d76d067f2e fix(studio): connect rotate handle line to selection 2026-05-04 14:44:30 -07:00
Vance Ingalls 259824e94f fix(studio): match rotate handle size to resize handle 2026-05-04 14:44:30 -07:00
Vance Ingalls d72feacd13 fix(studio): allow small rotation adjustments 2026-05-04 14:44:30 -07:00
Vance Ingalls 39f99d8bab fix(studio): keep rotate handle aligned while dragging 2026-05-04 14:44:30 -07:00
Vance Ingalls def8dad980 fix(studio): rotate manual edits around center 2026-05-04 14:44:30 -07:00
Vance Ingalls fd6be1b96a fix(studio): drag hovered canvas targets immediately 2026-05-04 14:44:30 -07:00
Vance Ingalls e1b20d3501 feat(studio): highlight hovered canvas target 2026-05-04 14:44:29 -07:00
Vance Ingalls 62cf498602 fix(studio): keep rotation edit base stable 2026-05-04 14:44:29 -07:00
Vance Ingalls f3d5fe9368 fix(studio): reapply manual edits during playback 2026-05-04 14:44:29 -07:00
Vance Ingalls a088be9adb fix(studio): scale master edits in source coordinates 2026-05-04 14:44:29 -07:00
Vance Ingalls dc7baa6ddf fix(studio): allow master canvas layer selection 2026-05-04 14:44:29 -07:00
Vance Ingalls dfe9c2293c fix(studio): stabilize manual edit manifest rendering 2026-05-04 14:44:29 -07:00
Vance Ingalls 02de2819f2 feat: persist studio manual edits via manifest 2026-05-04 14:44:29 -07:00
Miguel Ángel eeace2994d feat(studio): add persistent undo redo (#537)
Studio manual editing and timeline editing mutate project files directly, but those edits had no reliable undo/redo path. Before releasing manual editing, users need a way to recover from visual property changes, source-editor saves, timeline moves/resizes/deletes, and timeline asset drops.

The history also needs to survive a page refresh. A refresh should not erase the only way back from a bad manual edit.

- Adds a persistent per-project edit-history model for file snapshots.
- Stores undo/redo stacks in IndexedDB so history survives Studio refreshes.
- Records source editor saves, manual DOM edits, and timeline mutations.
- Adds toolbar undo/redo buttons with standard keyboard shortcuts: `Cmd/Ctrl+Z`, `Cmd/Ctrl+Shift+Z`, and `Ctrl+Y`.
- Validates current file hashes before applying undo/redo so external file changes do not silently overwrite newer content.
- Keeps history available in memory if IndexedDB persistence fails during a session.
- Adds focused unit coverage for the pure history model, storage adapter, controller/hook behavior, and project-file save helper.

Studio previously treated every editor mutation as an immediate file write. Manual DOM editing, timeline updates, and source-editor saves each had separate write paths, so there was no common transaction boundary where Studio could capture the file contents before and after an edit.

Undo/redo needed to sit above those write paths as a file-level transaction system: capture changed files before saving, write the new contents, persist the history entry by project, then apply undo/redo only when the current file content still matches the expected snapshot.

- `bun --filter @hyperframes/studio test src/utils/editHistory.test.ts src/utils/editHistoryStorage.test.ts src/hooks/usePersistentEditHistory.test.ts src/utils/studioFileHistory.test.ts` -> 4 files pass, 15 tests pass
- `bun --filter @hyperframes/studio test` -> 26 files pass, 289 tests pass
- `bun --filter @hyperframes/studio typecheck`
- `bunx oxlint packages/studio/src/App.tsx packages/studio/src/icons/SystemIcons.tsx packages/studio/src/hooks/usePersistentEditHistory.ts packages/studio/src/hooks/usePersistentEditHistory.test.ts packages/studio/src/utils/editHistory.ts packages/studio/src/utils/editHistory.test.ts packages/studio/src/utils/editHistoryStorage.ts packages/studio/src/utils/editHistoryStorage.test.ts packages/studio/src/utils/studioFileHistory.ts packages/studio/src/utils/studioFileHistory.test.ts` -> 0 warnings, 0 errors
- `bunx oxfmt --check packages/studio/src/App.tsx packages/studio/src/icons/SystemIcons.tsx packages/studio/src/hooks/usePersistentEditHistory.ts packages/studio/src/hooks/usePersistentEditHistory.test.ts packages/studio/src/utils/editHistory.ts packages/studio/src/utils/editHistory.test.ts packages/studio/src/utils/editHistoryStorage.ts packages/studio/src/utils/editHistoryStorage.test.ts packages/studio/src/utils/studioFileHistory.ts packages/studio/src/utils/studioFileHistory.test.ts`
- `git diff --check`
- `bun run --filter @hyperframes/core build:hyperframes-runtime` before commit hook, because the clean worktree needed the ignored runtime-inline artifact for typecheck
- Lefthook pre-commit -> lint, format, typecheck pass
- Lefthook commit-msg -> commitlint pass

- Started Studio locally at `http://127.0.0.1:5190/#project/undo-redo-sample`.
- Used `agent-browser` to select a preview element in the Inspector and change `#hero-card` from `left: 220px` to `left: 260px`.
- Refreshed Studio and verified Undo stayed enabled.
- Clicked Undo and verified the project file returned to `left: 220px`; clicked Redo and verified the inline `left: 260px` returned.
- Used `agent-browser` to drag the `side-card` timeline clip, refreshed Studio, then verified Undo restored the previous timeline attributes and Redo reapplied the timeline move.
- Recorded the tested undo/redo flow with `agent-browser`: `qa-artifacts/studio-undo-redo-2026-04-28/studio-undo-redo-flow.webm`.

- Local screenshots and recordings are kept under `qa-artifacts/studio-undo-redo-2026-04-28/` and are intentionally not committed.
- The scratch Studio project used for browser proof is local-only under `packages/studio/data/projects/undo-redo-sample/` and is intentionally not committed.
- The PR intentionally excludes the earlier PRD/TDD planning notes under `docs/superpowers/`; those remain local-only per request.
2026-05-04 14:43:11 -07:00