fix(studio): make audio-group edits transactional - #3449
Conversation
miga-heygen
left a comment
There was a problem hiding this comment.
Review
Approve. Independent read at exact head.
Three real bug fixes in one well-scoped PR:
-
Transactional group creation: captures prior group state, restores on save failure. Emits
<hf-audio-group>element (not just membership attrs) so later writes have a DOM target. Group ID validation +escapeAttrclose injection. -
Store mirroring:
syncStoredGroupAttributewrites to BOTHelementsanddomClipChildrenin one store notification — fixes the "muted group whose button stayed Mute" symptom for flat AND sub-comp members.mirroredGroupVolumecorrectly reads null/empty as unity (matching core), closing theNumber(null)===0parse divergence. -
ID space boundary:
useAudioGroupCarveAssignmentnow resolves DOM ids viaruntimeAudioId, not store keys — fixes the silent match-nothing → carve-pointing-at-nothing bug.resolveGroupSourceFileclimbs past the sub-comp root to the host that names the file — fixes "Unable to patch element in index.html" for sub-comp groups.
persistElementAttribute now resolves the target BEFORE the optimistic patch and reads the unwind value from the FILE, not the already-patched live DOM — closing two failure classes at once.
No issues. Ship it.
— Miga
42928b3 to
793e3b8
Compare
3b765b8 to
1641aad
Compare
793e3b8 to
c600623
Compare
1641aad to
49f05da
Compare
c600623 to
8b35e9d
Compare
49f05da to
3dd9a73
Compare
3dd9a73 to
f731659
Compare
8b35e9d to
32acd1f
Compare
The base branch was changed.
Part 6 of 12 replacing #3439. Base:
wa-26e-studio-audio-state.Why
Creating a bus and editing its attributes is one transaction across the live DOM, source files, optimistic state, undo, and sub-composition ownership.
What
Verification
fallow audit --base main --fail-on-issuesThe final stack tip preserves the verified #3439 replacement and includes the review fixes landed across the stack.
Stack: #3448 ← #3449 → #3450