Skip to content

fix(studio): make design edits conflict-safe - #2984

Closed
miguel-heygen wants to merge 1 commit into
mainfrom
fix/studio-transform-ownership
Closed

fix(studio): make design edits conflict-safe#2984
miguel-heygen wants to merge 1 commit into
mainfrom
fix/studio-transform-ownership

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What changed

  • Makes GSAP the source of truth for motion-owned transforms. Studio now edits writable GSAP source or stops with a precise Add selector / Unroll / Open Code action; it never reports success after writing competing CSS that GSAP will overwrite.
  • Extends static GSAP analysis through safe helper defaults while treating computed selectors, helper/loop-owned motion, and unresolved keyframes as non-directly-editable.
  • Makes drag, resize, rotation, grouped transforms, and inspector commits transactional: preflight is atomic, failed persistence rolls back, and stale async failures cannot roll back a newer edit.
  • Adds one external-file-change coordinator for Code, Design, timeline, Preview, and SDK flows. It drains pending saves before reload, suppresses only exact Studio write echoes, and blocks reload on conflicts or failed saves.
  • Adds a recovery UI with review, copy, download, take external, overwrite, and retry actions. Recovery snapshots survive reload in IndexedDB.
  • Adds a regression for text-field Backspace routing across save/selection refreshes.

Reproduction matrix

Report Result on current main Change
GSAP x/y owns the same transform channel as Studio drag Reproduced: GSAP restores its pixel component on seek Studio edits GSAP when provenance is directly writable; otherwise it blocks before mutating CSS
#2982 external write during pending Studio edits Reproduced in the file-change/reload path Pending work drains first; conflicts stop Preview/SDK reload and preserve both versions
#2981 second Backspace deletes the selected layer Not reproducible on current main using the reported text-field flow Regression pins both Backspaces to the input and proves a later canvas Backspace still deletes intentionally

Closes #2982. Refs #2981.

Validation

  • Studio: 304 files passed, 1 skipped; 3,262 tests passed, 18 todo
  • Parsers: 33 files passed; 908 tests passed, 4 skipped, 3 todo
  • Focused regression pass after final integration: 17 Studio files / 137 tests and 2 parser files / 35 tests
  • Studio and parser TypeScript checks
  • Oxlint with warnings denied
  • Oxfmt, diff check, filesize, tracked-artifact, large-file, fallow, and commit-message gates

@miguel-heygen

Copy link
Copy Markdown
Collaborator Author

Superseded by reviewable sub-700 LOC PRs: GSAP stack #2985 -> #2986 -> #2987; independent Backspace regression #2988; external-change stack #2989 -> #2990 -> #2991 -> #2992 -> #2993. GitHub reports the largest incremental diff as 650 changed lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Studio: external change to index.html silently discards unsaved editor state (data loss in the documented agent + Studio workflow)

1 participant