Skip to content

fix(studio): a sealed audio group's undo reads the frame's reply only in its shape - #8291

Merged
miguel-heygen merged 2 commits into
mainfrom
fix/studio-audio-group-undo-reply
Nov 20, 2026
Merged

miguel-heygen merged 2 commits into
mainfrom
fix/studio-audio-group-undo-reply

Conversation

@miguel-heygen

@miguel-heygen miguel-heygen commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

What

Grouping audio clips in a sealed preview now reads the preview's assign-audio-group reply only in the shape Studio asked for. When the save then fails, the undo of the preview change ends cleanly on a reply of the wrong shape, and the save's own error is what the person sees.

Why

The port's replies are data from the frame, and its callers check them (editingPort.ts: "callers validate results"). This one read assigned.previous[i] unchecked, so a reply without a previous array threw Cannot read properties of null inside the undo. That replaced the save's error and skipped the preview re-seek after it.

How

patchSealedGroup keeps the reply only when previous is an array with one entry per member and changed is a boolean; otherwise the undo has nothing to put back and returns. Each entry is still checked where it is used: only a non-empty string goes back as a member's group, anything else as no group (timelineAudioGroupCreate.ts, the undo's members map).

No visible change

Nothing on screen changes: a failed grouping save already shows its error; it now shows the right one.

Test plan

fails without the fix: packages/studio/src/components/nle/audioSealedPreview.test.ts "ends a sealed group's undo cleanly when the frame's reply is not the shape it asked for" fails at f105cf90 (the save rejects with Cannot read properties of null instead of disk full) and passes at 6e36b2f3, three runs in a row.

  • Studio src/hooks and src/components/nle: 1930 of 1930, three runs in a row; the whole build and Studio and core tsc pass (Linux).

What I did NOT exercise

  • A real sealed preview in a browser: the test uses the sealed test frame.

@github-actions

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 271 (base branch 271), smooth 73 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (0)

Unstable (1)

  • seqab-none-center-r0-root-z100: tracking 0.03, pressJump 0, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true / tracking 0.03, pressJump 0, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true / tracking 0.03, pressJump 0, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true

@eddy-heygen eddy-heygen left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Eddy's agent) Reviewed by Eddy's Claude agent at commit 6e36b2f (full diff read by me).

Verdict: approve.

Summary
Creating an audio group in a sealed preview kept the frame's reply as the undo data without looking at it. The reply is now used only if it has the expected shape: a list of previous values exactly as long as the list of members sent, and a true-or-false "changed". Otherwise no undo data is kept and the undo does nothing in the frame.

What I checked

  • The check runs before the undo closure is built, so a malformed reply cannot reach the later request.
  • The undo sends the kept values back to the same frame only; they are not written to a file or to Studio's own page.

Non-blockers

  • The entries of the list are not checked individually. They only travel back to the frame that produced them, so I see no harm; say so in a comment if that ever changes.

CI: 58 pass, 20 skipped, none failing or pending.

@miguel-heygen
miguel-heygen added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 3c735ad Nov 20, 2026
125 checks passed
@miguel-heygen
miguel-heygen deleted the fix/studio-audio-group-undo-reply branch November 20, 2026 15:44
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.

2 participants