Skip to content

Add HTML artifact screenshot provider#570

Merged
chubes4 merged 1 commit into
trunkfrom
feat/html-artifact-screenshot-provider
Jul 6, 2026
Merged

Add HTML artifact screenshot provider#570
chubes4 merged 1 commit into
trunkfrom
feat/html-artifact-screenshot-provider

Conversation

@chubes4

@chubes4 chubes4 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a Playwright-backed screenshot provider for static artifact-origin HTML pages.
  • Writes deterministic PNG files under a caller-provided output directory and emits a JSON manifest on stdout.
  • Documents env and flag usage next to the existing visual-parity DOM-box provider.

Fast path commands

  • Install: npm ci --prefix php-transformer/tools/visual-parity && npm --prefix php-transformer/tools/visual-parity run install:browsers
  • Capture via provider: HOMEBOY_SCREENSHOT_BASE_URL=http://127.0.0.1:7351 HOMEBOY_SCREENSHOT_PAGE_PATHS_JSON='["/workflow-bench/run/index.html"]' HOMEBOY_SCREENSHOT_OUTPUT_DIR=/path/to/screenshots node php-transformer/tools/visual-parity/bin/screenshot-provider.mjs --viewport=1440x900
  • Expected PNG path: /path/to/screenshots/workflow-bench-run-index.html.png
  • Zero-code fallback: npm --prefix php-transformer/tools/visual-parity exec playwright screenshot -- --viewport-size=1440,900 --full-page <artifact-origin-url> /path/to/screenshot.png

Testing

  • npm test from php-transformer/tools/visual-parity

AI assistance

  • AI assistance: Yes
  • Tool(s): gpt-5.5 via OpenCode
  • Used for: Researched the existing visual-parity/Homeboy artifact-origin contracts and drafted the small screenshot provider, docs, and smoke coverage.

@chubes4 chubes4 merged commit e2ecc99 into trunk Jul 6, 2026
1 check passed
@chubes4 chubes4 deleted the feat/html-artifact-screenshot-provider branch July 6, 2026 23:13
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