Skip to content

fix(check): time a line the next scene repeats in place as one line - #7704

Open
wonjangcloud9 wants to merge 1 commit into
heygen-com:mainfrom
wonjangcloud9:fix/check-line-across-scenes
Open

wonjangcloud9 wants to merge 1 commit into
heygen-com:mainfrom
wonjangcloud9:fix/check-line-across-scenes

Conversation

@wonjangcloud9

Copy link
Copy Markdown
Contributor

Context: I've been using HyperFrames every day for the past two weeks to make Korean Shorts and long-form videos, and it's been great to work with. This PR is one of a batch of fixes for things I ran into along the way, so you'll see several PRs from me at once — sorry for the pile-up, and thanks for your patience. Each one is reproduced on current main, independent of the others, and can be reviewed, merged or closed on its own.

What

line_unread now measures a line that a scene cut carries over (the same words, in the same place, in the next sub-composition) as one line, so its hold runs across the cut instead of stopping at it.

Why

The craft pass tracked each DOM element on its own. A film that keeps an alert on screen across two scene files (scene A ends at 2.1 s, scene B starts at 2.1 s with the same <div> text in the same place) showed the alert for 7 s, yet check reported the first copy only:

line_unread | compositions/a0.html #h-a0 > div:nth-of-type(1) > div:nth-of-type(1) |
"BALLISTIC MISSILE THREAT INBOUND TO HAWAII. SEEK IMMEDIAT..." (14 words) is on screen 2.10 s (±0.01 s), under its 3.53 s floor

This came from a real Short whose alert card continues from its cold open into the next scene.

Related work

How

  • trackBlocks (packages/cli/src/utils/craftAudit.ts): when a block is seen for the first time, and a block in the previous sample showed the same text in an overlapping box, the new block joins that block's track. A track now holds a set of block keys.
  • The edge re-measuring probe (refineWindow) and measuredAround check any of the track's keys.
  • The same words somewhere else on screen still count as a separate line (the boxes have to overlap).
  • Docs: docs/packages/cli.mdx craft table and skills/hyperframes-cli/references/lint-validate-inspect.md (manifest regenerated).

Test plan

  • New unit test measures a line the next scene repeats in place as one line fails on main (expected [ { code: 'line_unread', … } ] to deeply equal []) and passes with the fix; a control test keeps the same words placed elsewhere as their own line.
  • bunx vitest run src/utils/craftAudit.test.ts: 29 passed.
  • Real CLI on a three-scene repro (scene a0 0–2.1 s and n1 2.1–7 s show the same 14-word alert, e1 shows "THE END"), hyperframes check --no-cache --json:
    • main (0.9.43): 1 line_unread finding, the alert at 2.10 s under its 3.53 s floor.
    • this branch: 0 craft findings.
  • On the original project (alert carried across a0.html → n1.html), the two carried-over lines (BALLISTIC MISSILE…, THE REAL ALERT · JAN 13, 2018…) no longer warn.
  • oxlint, oxfmt, fallow audit --base origin/main, comment ratchet, typecheck (pre-commit).

🤖 Generated with Claude Code

line_unread tracked each element on its own, so a line that a scene cut
carries over (the same words, in the same place, in the next sub-composition)
was measured once per scene: an alert held 7 s across two scene files was
reported as on screen 2.10 s, under its 3.53 s floor.

A block that first appears where another block showed the same text one
sample earlier now continues that line, so its hold is measured across the
cut. The same words elsewhere on screen are still a separate line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mintlify

mintlify Bot commented Nov 14, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 03231db.

Approve preview

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.

1 participant