Skip to content

fix(producer): probe sub-composition media defaults - #7550

Open
IceCoooola wants to merge 1 commit into
heygen-com:mainfrom
IceCoooola:fix/subcomp-declared-var-src
Open

IceCoooola wants to merge 1 commit into
heygen-com:mainfrom
IceCoooola:fix/subcomp-declared-var-src

Conversation

@IceCoooola

Copy link
Copy Markdown

What

Fix renders using the authored placeholder source when a media element's
data-var-src refers to a default declared on its sub-composition's
<html> element.

Why

Inlining drops that <html> element. The browser-probe gate could no
longer find the declared default and skipped resolving the media source,
even though preview and snapshot used the correct file.

Related work

Fixes #7505.

Extends #6501, which covered mount-level variable values and defaults
declared on the root composition.

How

  • Carry the inliner's merged variablesByComp table through
    CompiledComposition to the probe gate.
  • Consult the nearest composition scope's table entry directly,
    without parsing emitted JavaScript.
  • Assign anonymous mounts distinct runtime scopes and reserve IDs as
    nested mounts are processed, preventing variable values from being
    overwritten by another instance.

Test plan

  • Unit tests added/updated
  • Manual testing performed
  • Documentation updated (if applicable)
  • Comments follow CONTRIBUTING.md (citation checker and comment ratchet passed)

Validation:

  • Core inliner tests: 48 passed.
  • Producer probe-stage tests: 76 passed.
  • FFmpeg-backed compile-path tests: 3 passed before the latest ID
    reservation change.
  • Core and producer typechecks passed during development; core was
    rechecked after the latest change.
  • oxlint and oxfmt checks passed on all six changed files.

The issue's reproduction was rendered with the published version and a
local fix during development, confirming that the resolved default source
replaces the placeholder.

Full workspace validation remains limited by the SDK playground build
error under Node 20.11 and broader test-runner compatibility failures.

Sub-composition defaults declared on <html> disappear from the DOM
during inlining. The browser-probe gate then misses data-var-src
bindings, causing renders to use the authored placeholder source.

Pass the inliner's variablesByComp table through CompiledComposition
and consult the nearest composition scope when checking media bindings.

Give anonymous mounts distinct runtime scopes and reserve IDs as
nested mounts are processed, preserving each instance's variable values.

Add regression coverage for declared defaults, repeated mounts,
nested scopes, and named/anonymous mount collisions.

Fixes heygen-com#7505

This branch has not been deployed

No deployments
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.

data-var-src clip bound to a sub-composition's own declared default renders the authored src

1 participant