Skip to content

fix(cli): check fails a full-frame element that covers every other clip, naming it - #6572

Merged
miguel-heygen merged 4 commits into
mainfrom
layerbest/canvas-cover
Oct 27, 2026
Merged

miguel-heygen merged 4 commits into
mainfrom
layerbest/canvas-cover

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Problem

A full-frame opaque element placed above every other clip leaves the stage blank, and check passed it unless the covered clips were text. An agent added a full-frame background rect last in DOM order, check said there were no new problems, and the person saw an empty canvas.

Fix

The occlusion audit gets one more finding on the same probe it uses for text_occluded (occluderAt / occlusionCoverage):

  • canvas_covered (error) is raised when an element covers at least 90% of the canvas, is opaque, and every other visible painted element (shape, image, video, canvas, SVG, text) is at least 90% under an opaque element. It names the covering element.
  • Exemptions: the cover's own children paint above it, so a scene card with its content never fires. An unpainted layout box doesn't count as content. data-layout-allow-occlusion marks a deliberate full-frame card.
  • "Most of the film": the finding stays an error only when it holds in at least half the samples. A brief full-frame card or a fade to colour drops to info (tierIssue in layoutAudit.ts).
  • First frame: the craft sample reports the cover, so first_frame_empty says Frame 0 is covered by #bg-rect instead of "shows only the background".
  • Cost: the scan checks elements topmost first, starting with a centre probe, so a backdrop under its content clears on the first clip. The cover's opacity is checked last, so a full-frame video under its content costs no frame read. Timing check on the largest registry example with and without the scan stayed within run-to-run noise.

Text under the cover keeps its text_occluded finding too; it carries the covered fraction and the matte judgement.

Docs and the CLI skill reference list the new finding.

Before / after (built CLI, check)

Fixture main this branch
shape, full-frame rect after it in the DOM passes; first_frame_empty: shows only the background fails: canvas_covered #bg-rect at every sample; first_frame_empty: Frame 0 is covered by #bg-rect
text, full-frame rect after it fails: text_occluded #title inside #bg-rect fails: same, plus canvas_covered #bg-rect
same rect placed before the content passes passes, no canvas_covered

Verification

  • Browser audit tests: a rect above the only shape is named; the same rect below is not; a rect over an empty layout box is not; text under the cover names it; data-layout-allow-occlusion exempts it.
  • Tier test: covered at 5 of 8 samples stays an error; at 2 of 8 it is info.
  • first_frame_empty test: frame 0 names the cover even when content is painted beneath it.
  • Mutations that each fail a test: no finding, unpainted boxes counted as content, a brief cover kept as an error, the first frame ignoring the cover.
  • Full CLI suite (6261 passed), new tests 3 runs green, cli typecheck, oxfmt, oxlint, comment ratchet, fallow, skill mirror and skill lint.

@mintlify

mintlify Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
hyperframes 🟢 Ready View Preview Oct 27, 2026, 3:57 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: REQUEST CHANGES · 1 blocker · 1 important · 0 nits

At 3059d9ce (the only change from 5d2d2203 is the skills-manifest hash). A full-frame <video>/<img> placed over a backdrop div now fails check with an error. ↓ inline

Scope

Read the whole diff. The 3 changed suites pass locally (277 tests). I built the CLI and ran check on a minimal b-roll fixture (it fails) and on all 8 registry examples (none get canvas_covered; kinetic-type gets a new first_frame_empty: Frame 0 is covered by #scene-1, because the scene's text hasn't entered yet at frame 0, which is fair). CI was still running at review time.

Comment thread packages/cli/src/commands/layout-audit.browser.js Outdated
Comment thread packages/cli/src/commands/layout-audit.browser.js Outdated
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 271 (base branch 271), smooth 139 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (0)

Unstable (1)

  • seqplainkeys-none-center-r0-root-z100: tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo false, teleport true / tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: APPROVE: 2 resolved, 0 open, 0 new · 3059d9c → fd481e2

Checked

With the built CLI: the b-roll-over-backdrop repro now passes, and a shape under a full-frame rect still fails with canvas_covered. The 3 suites pass (278 tests) and all Actions runs are green. One non-blocking follow-up from the new filter: an opaque rect over a full-frame <video> (with nothing else on stage) now passes too, because the video spans the canvas and is filtered out. That is no worse than main. Filtering only non-media full-frame elements would catch it, at the cost of a full-frame <img> backdrop under b-roll firing.

@miguel-heygen
miguel-heygen added this pull request to the merge queue Oct 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 27, 2026
@miguel-heygen
miguel-heygen added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 2a0fa7f Oct 27, 2026
72 checks passed
@miguel-heygen
miguel-heygen deleted the layerbest/canvas-cover branch October 27, 2026 18:02
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