Skip to content

fix(studio): make audio-group edits transactional - #3449

Merged
vanceingalls merged 12 commits into
mainfrom
wa-26f-studio-group-editing
Aug 24, 2026
Merged

fix(studio): make audio-group edits transactional#3449
vanceingalls merged 12 commits into
mainfrom
wa-26f-studio-group-editing

Conversation

@vanceingalls

@vanceingalls vanceingalls commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

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

  • create groups in the owning composition and assign members in their own files
  • resolve patch targets before optimistic writes
  • mirror group volume, label, FX, automation, and hidden state after edits
  • keep visibility edits, group deletion, and carve auto-grouping consistent
  • prevent invalid or blocked timeline edits from partially applying

Verification

  • all relevant TypeScript projects pass cumulatively
  • fallow audit --base main --fail-on-issues

The final stack tip preserves the verified #3439 replacement and includes the review fixes landed across the stack.

Stack: #3448#3449#3450

@vanceingalls
vanceingalls marked this pull request as ready for review August 23, 2026 21:41
miga-heygen
miga-heygen previously approved these changes Aug 23, 2026

@miga-heygen miga-heygen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review

Approve. Independent read at exact head.

Three real bug fixes in one well-scoped PR:

  1. 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 + escapeAttr close injection.

  2. Store mirroring: syncStoredGroupAttribute writes to BOTH elements and domClipChildren in one store notification — fixes the "muted group whose button stayed Mute" symptom for flat AND sub-comp members. mirroredGroupVolume correctly reads null/empty as unity (matching core), closing the Number(null)===0 parse divergence.

  3. ID space boundary: useAudioGroupCarveAssignment now resolves DOM ids via runtimeAudioId, not store keys — fixes the silent match-nothing → carve-pointing-at-nothing bug. resolveGroupSourceFile climbs 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

@vanceingalls
vanceingalls force-pushed the wa-26e-studio-audio-state branch from 42928b3 to 793e3b8 Compare August 23, 2026 22:54
@vanceingalls
vanceingalls force-pushed the wa-26f-studio-group-editing branch from 3b765b8 to 1641aad Compare August 23, 2026 22:54
@vanceingalls
vanceingalls force-pushed the wa-26e-studio-audio-state branch from 793e3b8 to c600623 Compare August 23, 2026 23:04
@vanceingalls
vanceingalls force-pushed the wa-26f-studio-group-editing branch from 1641aad to 49f05da Compare August 23, 2026 23:04
@vanceingalls
vanceingalls force-pushed the wa-26e-studio-audio-state branch from c600623 to 8b35e9d Compare August 23, 2026 23:24
@vanceingalls
vanceingalls force-pushed the wa-26f-studio-group-editing branch from 49f05da to 3dd9a73 Compare August 23, 2026 23:24
@vanceingalls
vanceingalls force-pushed the wa-26f-studio-group-editing branch from 3dd9a73 to f731659 Compare August 24, 2026 00:06
@vanceingalls
vanceingalls force-pushed the wa-26e-studio-audio-state branch from 8b35e9d to 32acd1f Compare August 24, 2026 00:06
@vanceingalls
vanceingalls changed the base branch from wa-26e-studio-audio-state to main August 24, 2026 00:58
@vanceingalls
vanceingalls dismissed miga-heygen’s stale review August 24, 2026 00:58

The base branch was changed.

@vanceingalls
vanceingalls merged commit 8e96ccb into main Aug 24, 2026
90 of 126 checks passed
@vanceingalls
vanceingalls deleted the wa-26f-studio-group-editing branch August 24, 2026 01:10
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