feat(core): the audio group model — element, membership, helpers - #3278
Open
vanceingalls wants to merge 1 commit into
Open
feat(core): the audio group model — element, membership, helpers#3278vanceingalls wants to merge 1 commit into
vanceingalls wants to merge 1 commit into
Conversation
Introduces <hf-audio-group> and data-audio-group as the group model B2–B7 and C1 build on: a non-rendering group element carries a label and (later) an FX chain, membership lives on the member's own data-audio-group attribute rather than DOM nesting, so a track removed from the document simply drops out of the group on the next resolve — nothing dangles. Groups do not nest: data-audio-group on the group element itself is ignored. A group with members but no <hf-audio-group> element still resolves, label falling back to the id, so hand-authored HTML degrades gracefully. Audio only in v1 — video members are ignored. Parse-only: nothing routes or sums audio yet (B3/B4). Adds the audio-groups canary at percentage: 0 gating the future Studio UI; the element and attribute parse and play regardless of enrollment. Verified rather than assumed per this plan's standing rule: the timeline's clip-collection selector ([data-start], [data-track-index], [data-composition-id], video, audio, img) already excludes the group element with zero changes, and no lint rule flags unknown elements or data-* attributes, so neither needed touching — confirmed by grep and by running `hyperframes lint` against a fixture containing the element (0 findings referencing it). The step doc's suggested display:none injection point (an existing base stylesheet in the runtime) does not exist in this codebase; skipped rather than inventing new infrastructure, since an empty, childless custom element already renders as a zero-size inline box with no visible output — the same reasoning the lint check above confirms empirically. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<hf-audio-group>+data-audio-group: a non-rendering group element and member-held membership attribute, parse-only foundation for B2–B7 (routing, UI, mute/solo, carve, bus strip) and C1 (timeline FX entry).packages/core/src/audioGroups.ts:resolveAudioGroups(root)andaudioGroupOf(el), pure DOM reads, no state. Groups don't nest (self-referentialdata-audio-groupignored); a group with members but no element still resolves (label = id); removing a member from the DOM drops it on next resolve../audio-groupspackage subpath (mirrors./audio-carve).audio-groupscanary atpercentage: 0,sunsetAfter: 2027-01-15— gates the future Studio UI only.handleDomAttributeLiveCommit) verified to set/removedata-audio-grouplike any other data attribute (new test inuseDomEditCommits.test.tsx).Deviations from the step doc (verified, not guessed — see commit message)
display:noneinjection point (an existing runtime base stylesheet) doesn't exist in this codebase — grepped, confirmed absent. Skipped rather than inventing new infrastructure: an empty, childless custom element already renders as a zero-size inline box, andhyperframes lintagainst a fixture with the element confirms it produces no visible/lint findings.data-*attributes — confirmed by grep, added nothing per the step's own instruction.data-start/data-track-index/data-composition-id, notvideo/audio/img) — confirmed by readingtimeline.ts, zero changes needed.Depends on
Stacked on #3277 (P2) → #3276 (P1) → #3275 (A2) → #3274 (A1). Should merge after all four.
Test plan
bun run buildcleanpackages/coretest: 2352/2352 (newaudioGroups.test.ts: round-trip, group-absent, no-nesting, dangling-member, video-ignored)packages/studiotest: 4245/4245 (new attribute set/remove test)hyperframes linton a fixture containing<hf-audio-group>— 0 findings reference the element or its attributes