馃悰 Keep screenshot properties separate from options - #355
Merged
Conversation
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.
Keep JSON metadata intact in TDD while rejecting unsafe object keys and non-JSON values. Mark Swift requests with the current local format so a user key named properties is not unwrapped. Cover saved local reports and cloud uploads through real CLI runs.
Robdel12
force-pushed
the
rd/fix-screenshot-properties-contract
branch
from
September 8, 2026 06:07
21aadd7 to
468205c
Compare
Robdel12
enabled auto-merge (squash)
September 8, 2026 06:07
Robdel12
disabled auto-merge
September 8, 2026 06:10
Use the flat local request shape already sent by the released stable client. Preserve nested user metadata without guessing at old wrappers; released cloud-format handling remains quarantined in the API compatibility module.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
propertiesis the user-owned metadata bag. Generated viewport fields and reserved-name filtering blurred that contract, deleting legitimate user keys or treating them as Vizzly settings. Local TDD also unwrapped nestedpropertiesobjects and sanitized away user values.Approach
Preserve user JSON metadata and keep comparison settings at the top level. Read identity dimensions from the captured bitmap, stop framework clients from generating viewport metadata, and remove invented browser/dimension defaults from file uploads and SHA checks.
Local SDKs send the same flat request shape as the released stable JavaScript client. There is no screenshot format marker or nested-property guessing. Released cloud payload handling remains isolated in the API's existing compatibility module, selected by CLI User-Agent version and removable when those releases are unsupported.
Local validation retains nested metadata and rejects unsafe object keys and non-JSON values. The merged upload-error tracking remains intact.
Evidence
Real CLI tests exercise saved TDD reports and cloud uploads with nested user properties, including a key literally named
properties. The generated CLI payload also passes through the current API normalizer without losing metadata; released cloud-format compatibility was checked separately.The full CLI suite passes on Node 24: 1,928 passed and six platform skips. Ember, Vitest, Storybook, static-site, Ruby, and Swift unit suites pass, along with the production build, type checks, full lint, and formatting.