Skip to content

馃悰 Keep screenshot properties separate from options - #355

Open
Robdel12 wants to merge 1 commit into
mainfrom
rd/fix-screenshot-properties-contract
Open

馃悰 Keep screenshot properties separate from options#355
Robdel12 wants to merge 1 commit into
mainfrom
rd/fix-screenshot-properties-contract

Conversation

@Robdel12

@Robdel12 Robdel12 commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Why

properties is the user-owned metadata bag. The CLI and framework clients were generating viewport fields inside it, while a broad reserved-name filter could delete legitimate user keys such as threshold, component, or deviceScaleFactor. That blurred the public contract and made the API guess which values were user data versus Vizzly settings.

The uploaded image already gives Vizzly the dimensions it needs. Sending CSS viewport values adds another conflicting source of truth without improving comparison identity.

Approach

  • Preserve every key passed inside properties; no property name is promoted, filtered, or interpreted as a Vizzly option.
  • Keep the supported top-level options explicit: threshold, minClusterSize, fullPage, requestTimeout, and buildId. Framework-specific capture fields remain internal transport data.
  • Stop Ember, Vitest, Storybook, and static-site clients from generating viewport metadata. User-supplied viewport-shaped properties still pass through untouched.
  • Build local comparison dimensions from the captured bitmap. File uploads and SHA checks no longer invent Chrome or 1920脳1080 defaults.
  • Isolate the released double-properties local request shape in one compatibility file. Current clients send a small format version so even a user key literally named properties is preserved; the compatibility file can be deleted after those older clients are unsupported.
  • Update public examples and types to show the supported contract directly.

Compatibility

The current stable package is 0.35.2 and remains supported by the API-side compatibility path. The 0.35.3 beta formats are handled at their exact behavior boundaries, while new clients use the clean property/options split.

Confidence

The complete CLI suite passes 1,942 tests with 5 expected platform skips. The Ember, Vitest, and Ruby client suites also pass, and the production build, type checks, and lint are clean.

Stop generating viewport metadata and stop filtering option-shaped property names. Keep released local request handling isolated behind an explicit format version so current property bags remain untouched.
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