Skip to content

Add optional capture-time viewport companions - #1

Merged
mozzie49 merged 6 commits into
mainfrom
feat/viewport-companion
Oct 23, 2026
Merged

mozzie49 merged 6 commits into
mainfrom
feat/viewport-companion

Conversation

@mozzie49

@mozzie49 mozzie49 commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Purpose

A narrowly scoped response to the reported long-phone screenshot / missing-report-image failure in anthropics/claude-code#104618. This is not a reproduction of the macOS cropping bug or a claim of external adoption.

Changes

  • Preserve existing full-page <name>.png captures and default full-page-only behavior.
  • Opt in with viewportCompanion: true to capture <name>.viewport.png directly from the same page and viewport, without post-cropping or intervening interactions.
  • Record dimensions, SHA-256 and framing in snapshots / paired receipts; reject missing or inconsistent proof.
  • Add a synthetic 375×4777 long-page fixture to the existing browser CI. It checks full-page preservation, 375×812 companion dimensions, filenames, actual file hashes and paired receipts.
  • Document sequential (not atomic) captures, manifest-validation limits and legacy snapshot compatibility.

Verification

  • 34/34 local unit tests pass; JavaScript syntax and skill validation pass.
  • Independent source review found no blocking defects.
  • All 34 remote files match the local reviewed tree by Git blob SHA.
  • Both PR CI and push CI passed: 34 unit tests, 4 existing interaction runs, and the long-page regression.
  • Actual full-page and companion PNGs were inspected; hashes/dimensions/frames match the receipts. Detailed artifact verification. Independent agent source and image review found no blockers.

Existing demo HTML, JavaScript, CSS and published baseline evidence are unchanged. No universal no-cropping rule is introduced.

@mozzie49

Copy link
Copy Markdown
Owner Author

Browser proof inspected

PR CI passed: 34/34 unit tests, 4/4 existing interaction runs, and the new long-page regression.

Downloaded the 22-file artifact and verified ZIP SHA-256 07fdf1ed256d01fe088af58c405a3697ee21391f85eb34e6c2914aa18d3c9adc.

  • Actual phone.png: 375×4777, with the bottom END OF PAGE footer visible.
  • Actual phone.viewport.png: 375×812, readable first screen, intentionally no below-fold footer.
  • Default and opt-in full-page captures are byte-identical; all five image hashes match their manifests.
  • Paired receipt passes with matching 375×812 / scroll(0,0) framing.
  • Independent agent source + image review found no blocking defects. It also checked the companion pixels match the first 812 full-page rows.

This proves the static synthetic fixture, not the reported macOS cropping workflow or atomic dynamic-page state. Existing source/demo evidence is unchanged. The separate push check is still installing Chromium; merge will wait for both checks.

@mozzie49
mozzie49 marked this pull request as ready for review October 23, 2026 14:03
@mozzie49
mozzie49 merged commit 57b15e6 into main Oct 23, 2026
2 checks passed
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