Repository navigation
feat(cli): check warns on a blank stretch between two hard cuts - #9059
Conversation
`blank_span` is a craft warning: 0.5 s or more where nothing is visible, between two cuts with content at full opacity on both sides. It reuses the craft grid's samples and painted value, and confirms each candidate sample in the page: the stage has an opaque colour, nothing under the root renders, and the screenshot matches a frame of the bare stage. Blanks that open or end the film, sit beside a fade, or show a card, cover or off-canvas content never fire; data-layout-allow-blank silences the rest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Edit accuracy: accurate 275 (base branch 273), smooth 80 of thoseThe gate passes. Newly passing (2)
Not banked yet, reported and not gated (bank a full-grid run's baseline.json) (2)
Quarantined, measured but not gated (0) |
jrusso1020
left a comment
There was a problem hiding this comment.
APPROVE at 62284aef95.
blank_span is a conservative, warning-only rule: it never fails a run. I ran the real runAuditGrid + createPageDriver in Chromium on extra cases beyond the PR's 17. My results:
Quietness rules (false positives): I found none.
- Fades on either side stay quiet, because both edges need content at 0.95 or more one grid step out.
- Cards, cover divs, content moved off the canvas, never-loaded images and full-bleed canvases stay quiet, because any rendered element under the root silences the rule.
- An empty
<video>stays quiet too. - The waiver works on any element, not only the root.
False negatives worth knowing:
-
Effective floor is about 0.5 s plus one grid step, not 0.5 s. The length is measured from the first blank sample to the last. Results:
- an exact 0.5 s gap (2.0–2.5) is quiet;
- a 0.56 s gap off the grid (2.06–2.62) is quiet;
- 0.6 s and 0.625 s gaps warn;
- a 0.7 s gap off the grid warns as 2.125–2.75.
The reported range also ends at the last blank sample, so a 2–3.5 s gap reads "2.00 s to 3.38 s". Measuring to
last + step, or documenting the floor as up to 0.625 s, would match the docs. -
A persistent background layer turns the rule off for the whole film. I tested a full-bleed
#111div and a vignette gradient overlay, each across the whole composition, with a 1.5 s hard-cut gap. Both stay quiet, becauserendersAnythingcounts them as content. Many compositions carry a bg, grain or vignette layer. This matches the stated "rather miss than flag" aim, but it limits how often the rule can fire, and it may be worth a line in the docs. -
The waiver is film-wide. One
data-layout-allow-blankanywhere silences every gap in the film, including accidental ones elsewhere. That's as documented.
Seams between clips: a blank at a seam is caught when it lasts about 0.625 s or more and both neighbours hard-cut with text or media at full opacity. Two separate gaps in one film both warn. It misses a seam blank:
- shorter than about 0.5 s plus one step;
- next to any fade;
- where either neighbour is shapes-only.
presencecounts only text and img/video/canvas/svg, so a scene made of plain divs never passes the edge check.
Probe determinism, cost, transparent and video-only frames:
- Deterministic: the same film gave the same finding on repeat runs.
- Cost:
- With no candidate stretch, it takes zero extra screenshots. A film with no gap took 48 craft samples, the grid alone.
- Each candidate adds 2 craft samples, plus one seek and screenshot per blank sample. A 1.5 s gap took 12 screenshots and a 5 s gap took 40.
- When a bg layer silences the rule, it still spends 1 screenshot before the DOM check says no. Checking
rendersAnythingbefore capturing would save that, but it's minor.
- With no opaque stage colour, as in a transparent render, the rule stays quiet. A visible video element always counts as content, so video-only frames are never called blank.
Tests: blankSpan, blankSpan.chromium, craftAudit and check: 265 passed locally. CI: 79 pass, none red.
Need: yes, a timeline gap isn't reported today · Size: right-sized · Reuse: reuses the craft grid, framesDiffer and filmFinding (moved, unchanged) · Simpler: no · Structure: good, the page half and the decision half are split
Risk: low. Warning only, quiet whenever the page can't answer, and no change to existing findings (painted is derived the same way as before).
— Rames
What
hyperframes checkgainsblank_span, a craft warning: 0.5 s or more where nothing is visible, between two hard cuts. It never fails a run,--strictincluded.Why
A gap in the timeline (a clip that ends before the next starts, a mistyped
data-start) renders as a blank stretch, and nothing incheckreports it today:dead_stretchneeds 3 s of no change,first_frame_emptylooks at frame 0 only. The rule is built so it does not warn on a composition that is blank on purpose; it would rather miss a gap than flag a deliberate one.Related work
No open or closed PR covers this (
gh pr list --search blank --state all). It ports the idea of an add-on a downstream agent already runs on its own renders, narrowed to have no false positives.How
paintedvalue): runs of unpainted samples of 0.5 s or more that touch neither end of the grid.blank-span.browser.js): the stage has an opaque colour, no element under the root renders anything (text, pseudo-content, background, media tag), even off the canvas or covered, and the screenshot does not differ from a frame of the bare stage colour (framesDiffer, the motion-signature noise rule).presence, no film facts), the rule stays quiet.data-layout-allow-blankon any element silences it, for the one deliberate case it cannot tell apart: an empty beat held between two hard cuts with nothing rendered.filmFindingandZERO_BBOXmoved unchanged tocraftFinding.tssocraftAuditandblankSpanshare them without an import cycle.paintedis now derived from a newpresencevalue with the same result as before.Deliberately quiet: blanks that open or end the film, a blank beside any fade, a solid card (with or without text), a black cover div, full-bleed media, unloaded assets, content slid off the canvas, a stage with no opaque background. A blank longer than 3 s also raises
dead_stretch; both are kept.Test plan
blankSpan.test.ts(interior vs opening/ending stretches);blankSpan.chromium.test.tsruns the realrunAuditGridwithcreatePageDriver: 1 positive (a 2–3.5 s hard-cut gap) and 16 negatives (under 0.5 s, fade through black, fade out then cut in, cut out then fade in, opening blank plus end padding, card with and without text, black cover, text/pseudo-element/canvas slid off, never-loaded image, full-bleed canvas, paint outside the root, no opaque stage, the waiver). Each branch was mutated in turn and its test failed.check --jsonon GSAP projects: a 1.5 s gap warns at [3, 4.375]; the same gap with fade out/in and a 0.2 s gap are quiet.docs/packages/cli.mdx, thehyperframes-cliandhyperframesskill references,skills-manifest.json.craftAudit,check,checkBrowser,layout-audit.chromium,checkBrowser.chromium,checkSweep.chromium,motion-signature.browser.chromium. Locally,downloadStall.process,snapshotHdrFrame,studioServer.previewAssetsandcheckFindingInspect.chromiumfail on this branch alone; none import the changed files, and I did not run them on a cleanmain.tsc --noEmit,oxlint,oxfmt,fallow audit --base origin/main, the skills checks and the pre-commit hooks pass.🤖 Generated with Claude Code