Skip to content

fix(cli): honor HTML attribute casing in frame-rate defaults - #5348

Merged
jrusso1020 merged 4 commits into
heygen-com:mainfrom
user-github-me:fix/composition-fps-html-case
Oct 24, 2026
Merged

jrusso1020 merged 4 commits into
heygen-com:mainfrom
user-github-me:fix/composition-fps-html-case

Conversation

@user-github-me

@user-github-me user-github-me commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

A root with DATA-FPS="24" renders at 30 fps when --fps is omitted, although Chrome reads the declaration as 24. The CLI's linkedom lookups preserve attribute spelling and also select a later duplicate lowercase attribute over an earlier uppercase one.

Read composition IDs, explicit root markers, and frame rates using case-insensitive HTML attribute names, keeping the first duplicate attribute as browsers do. Root selection and frame-rate validation retain the existing precedence from #2008.

Validation:

  • Nine new regression cases fail on main; all 229 tests across the FPS helper, render arguments, render plan, render command, and timeline description pass with the fix.
  • Built CLI, Chrome 152, and FFprobe: a one-second 64×64 composition changes from 30 frames at 30 fps to 24 frames at 24 fps. An explicit --fps 60 produces 60 frames at 60 fps.
  • Native Chrome agrees with the duplicate-attribute and explicit-root cases. The reproduction passes hyperframes lint and hyperframes check with no errors or warnings.
  • CLI build/typecheck, workspace lint, changed-file formatting, comment checks, test reachability, and normal commit hooks pass.

The current-main integration retains the shared cloud-FPS defaults (24, 25, 30 and 60; unsupported declarations warn and fall back to 30). Mixed-case coverage now calls that helper. All 240 FPS/render/timeline/plan tests pass after a full workspace build. Four native Chrome cases agree with the source helper, and rebuilt CLI outputs contain 24 frames at 24 fps or, with explicit --fps 60, 60 frames at 60 fps. Composition lint/check, CLI typecheck, lint, formatting, reachability, final comment checks and normal hooks pass. The GitHub-signed tree matches the tested merge.

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the PR's core claim locally with linkedom: for DATA-FPS="24" data-fps="60" it keeps both attributes with their original case and getAttribute("data-fps") returns 60, while Chrome lowercases names and keeps the first duplicate (24). The new getHtmlAttribute matches names case-insensitively and takes the first duplicate. The root fallback compositions[0] is the same element as the old outermost-composition find, because the first match in document order cannot have a matching ancestor. The explicit-root value check stays case-sensitive (=== "true"), as before. Main's readCompositionFps is unchanged, and the tests exercise both the helper and resolveDefaultFpsArg/defaultCloudFps. Need: yes · Size: ok · Reuse: n/a · Simpler: already minimal.

— Rames

@jrusso1020
jrusso1020 added this pull request to the merge queue Oct 24, 2026
@jrusso1020
jrusso1020 removed this pull request from the merge queue due to a manual request Oct 24, 2026
@jrusso1020
jrusso1020 added this pull request to the merge queue Oct 24, 2026
Merged via the queue into heygen-com:main with commit c00a1bc Oct 24, 2026
111 checks passed
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.

2 participants