Skip to content

fix(parsers): read fragment composition metadata - #2536

Closed
tianma-if wants to merge 1 commit into
heygen-com:mainfrom
tianma-if:codex/parser-fragment-metadata
Closed

fix(parsers): read fragment composition metadata#2536
tianma-if wants to merge 1 commit into
heygen-com:mainfrom
tianma-if:codex/parser-fragment-metadata

Conversation

@tianma-if

Copy link
Copy Markdown
Contributor

What changed

  • Resolve composition metadata from the first composition carrier when the synthetic <html> element has no composition attributes.
  • Traverse composition templates so fragment roots inside <template> are supported.
  • Add a regression test covering id, duration, and variables on a template root.

Why

Template and fragment sub-compositions follow the dual-carrier contract introduced in #2081: their metadata may live on the inner [data-composition-id] root rather than <html>. extractCompositionMetadata() only read <html>, so CLI variable validation saw an empty schema for otherwise valid sub-composition files.

Validation

  • bunx oxlint packages/parsers/src/htmlParser.ts packages/parsers/src/htmlParser.test.ts
  • bun run --filter @hyperframes/parsers test -- htmlParser.test.ts
  • bun run --filter @hyperframes/parsers typecheck
  • pre-commit hooks (lint, format, typecheck, fallow)
  • git diff --check

@miga-heygen

Copy link
Copy Markdown
Contributor

Closing — this PR has been inactive for an extended period. Thank you for the contribution! Please feel free to reopen if you'd like to continue.

@miga-heygen miga-heygen closed this Sep 8, 2026
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.

3 participants