Skip to content

fix(cli): respect pointer-transparent text in occlusion checks#2326

Open
miguel-heygen wants to merge 1 commit into
mainfrom
fix/layout-occlusion-pointer-events
Open

fix(cli): respect pointer-transparent text in occlusion checks#2326
miguel-heygen wants to merge 1 commit into
mainfrom
fix/layout-occlusion-pointer-events

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

hyperframes check no longer reports captions as hidden by a background video when the captions are visibly painted above it with pointer-events: none.

Why

The occlusion audit relied on document.elementFromPoint(), which intentionally skips pointer-transparent content. Caption rails commonly disable pointer events, so the audit saw the video underneath and produced a blocking text_occluded false positive despite correct z-index and verified rendered output.

How

During each occlusion probe, pointer-transparent text is made hit-testable just long enough to query the true paint order. Its authored inline value and priority are restored immediately afterward. A regression test covers a video beneath pointer-transparent text and verifies that the original style survives the audit.

Test plan

  • Added a regression test and observed it fail before the fix
  • bun run --cwd packages/cli test -- src/commands/layout-audit.browser.test.ts (39 passed)
  • bun run --cwd packages/cli test (1,650 passed)
  • CLI typecheck, lint, formatting, and commit hooks passed
  • Reproduced with a real video/caption fixture on 0.7.56, then verified the local CLI returns zero layout findings

Compound Engineering
Codex

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