Commit Graph
110 Commits
Author SHA1 Message Date
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 Á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
Miguel Ángel 1fca53a81e fix(studio): hold canvas movement from inspector 2026-05-04 14:43:11 -07:00
Miguel Ángel c267407953 fix: copy Studio agent prompts in Safari 2026-05-04 14:43:11 -07:00
Miguel Ángel 71f79816c1 fix(studio): prevent timeline track cutoff 2026-05-04 14:43:11 -07:00
Miguel Ángel bbb7deec92 fix(studio): copy absolute paths in agent prompts 2026-05-04 14:43:11 -07:00
Miguel Ángel 78c3a5e00c fix(studio): improve dom picking and thumbnails 2026-05-04 14:43:11 -07:00
Miguel Ángel 02a08cc6f5 feat(studio): add manual DOM editing inspector (#466)
* fix: stabilize studio preview and runtime sync

* fix: pass selector through timeline thumbnails

* feat: add studio timeline editing

* fix: disambiguate timeline edit targets

* fix: stop timeline auto-scroll in fit mode

* feat: use percentage-based timeline zoom

* fix: sync timeline playhead on zoom changes

* fix: reset timeline scroll when returning to fit

* feat(studio): add manual DOM editing inspector

* docs: update studio manual dom editing guide

* feat(studio): add image asset picker for fills

* feat(studio): add inline image uploads for fills

* fix(studio): use real file input for image fill uploads

* fix(studio): restore toast plumbing after rebase

* fix(studio): explain in-app upload limitation

* fix(studio): reuse asset-tab upload pattern in fills

* feat(studio): refine manual design inspector

* fix(studio): polish manual design inspector

* fix(studio): keep color picker in viewport

* fix(studio): clarify color picker selection

* docs: update manual DOM editing guide

* fix(studio): keep gradient color picker open

* fix(studio): scope text color to text layers

* fix(studio): add agent fallback for immovable layers

* fix(studio): address manual editing review feedback

* fix(studio): make local font selection reliable
2026-05-04 14:41:43 -07:00
Miguel Ángel 26b8e2a985 Revert "feat: Persist Studio manual edits via manifest (#593)"
This reverts commit d0abe90a82.
2026-05-04 09:41:36 -07:00