Skip to content

Surface style-capture failures instead of silent swallow #35

Description

@hungify

What to build

captureStyleIssues in packages/playwright/src/to-match-figma.ts:35-47 catches every error during style capture and returns []. A broken selector, a crashed page.$eval, or any other capture failure is currently indistinguishable from "styles match" — no diagnostic is ever surfaced. Fix this so capture failures produce a visible diagnostic/issue instead of silently returning an empty result.

Acceptance criteria

  • A selector that fails to resolve (not found, detached, etc.) during style capture produces a distinct, surfaced diagnostic — not an empty issues array
  • Existing successful style-capture paths are unaffected (no new false positives on styles that do match)
  • Dashboard/CLI output makes a capture failure visually distinguishable from a clean style-check pass
  • Unit test covering: selector-not-found, DOM eval throwing, and the existing happy path

Blocked by

None — can start immediately.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions