hyperframes icon indicating copy to clipboard operation
hyperframes copied to clipboard

format.md:66 host-id rule is ambiguous for multi-mount sub-compositions; scoped selector silently yields static frames

Open JuankCadavid opened this issue 1 month ago • 1 comments

Version: hyperframes 0.8.188.

format.md:66 states the rule "host id = scene id = timeline key". This can't hold when one sub-composition file is mounted several times. In our case, 7 mounts of a single step composition.

What we saw:

  • Distinct host element ids (step-1 … step-7) with a shared data-composition-id="step" work, but only with an unscoped selector such as .sc.
  • A scoped selector [data-composition-id="step"] .sc throws 7 times and silently leaves static frames. check still passes.

Expected:

  • Document the multi-mount case: which id is the timeline key, and how selectors should be scoped per mount.
  • Ideally, make the runtime or check report the failure instead of rendering static frames.

Possibly related: #4334.

JuankCadavid avatar Oct 23 '26 14:10 JuankCadavid

Thanks for raising this. Reproduced on 0.8.193 with one scene file mounted three times:

  • All hosts with data-composition-id="step" and the selector .sc: animates.
  • Same hosts with [data-composition-id="step"] .sc: every mount stays static, and lint and check both pass.
  • Hosts with their own ids (step-a, step-b, step-c), scene root and timeline key still step, selector [data-composition-id="step"] .sc: animates.

When several hosts share a composition id, the compiler gives each mount its own internal id, so a selector that names step directly no longer matches anything inside the scene script. Until that's handled, either use unscoped selectors or give each host its own data-composition-id, keeping step on the scene root and timeline key. The second is the pattern in the "Reuse one composition with different content" section here: https://hyperframes.heygen.com/concepts/compositions#reuse-one-composition-with-different-content

You're right that the skill's format reference contradicts that, and that nothing warns about it today. Both are worth fixing. #6208 is an open attempt at the docs side.

miguel-heygen avatar Oct 24 '26 18:10 miguel-heygen