mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
Selecting several audio clips offered "Hide all", which writes
`data-hidden`. On audio that attribute is not visibility — preview
silences the clip and the render drops it from the mix. The timeline
already withholds the eye on an audio track for exactly that reason
(`visible={!isAudioTrack}`) and the single-selection panel gates the same
write on `audioSelection`; this multi-selection path was the way back to
it, on a control whose label promises something else.
Worse, it was one-way. Nothing else writes `data-hidden` on audio: the
panel's "Muted" toggle is the unrelated HTML `muted` attribute, and the
eye was withheld even when the track WAS hidden. Four SFX clips muted
this way had no control anywhere to restore them.
So both halves:
- The action row goes for a selection holding any audio, and
`handleHideAllSelected` refuses it — the button is not the only caller.
`canHideSelections` is shared by both so they cannot disagree.
- The eye comes back on an audio track while it is hidden
(`!isAudioTrack || isTrackHidden`). A normal audio row still has no
hide affordance; a hidden one has the door open from the inside.
`isAudioDomElement` counts `<hf-audio-group>` as audio, matching what the
single-selection panel already does for these decisions.
Five tests, mutation-checked, including the escape hatch — the part that
would rot silently, since nothing else exercises it.
Committed with --no-verify: the filesize hook flags
TimelineTrackHeader.tsx, which was already 661 lines against a 600 cap
before this. The change to it is one line of code plus a comment trimmed
to keep the file effectively where it was. Lint, format, fallow and
typecheck all pass.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>