✨ Align Ruby and Swift SDKs#286
Merged
Merged
Conversation
9deaf1d to
7771992
Compare
90d00ed to
70832ad
Compare
7771992 to
47dde46
Compare
70832ad to
af326b3
Compare
47dde46 to
3d543fa
Compare
1febcd4 to
4f031ba
Compare
4f031ba to
9eb6b78
Compare
This comment has been minimized.
This comment has been minimized.
9eb6b78 to
0e56874
Compare
This comment has been minimized.
This comment has been minimized.
Keep the Ruby option-alignment behavior unchanged while satisfying the SDK unit workflow's RuboCop checks across the Ruby matrix.
Vizzly - Visual Test ResultsCLI Reporter - Waiting for buildNo builds received yet for this pull request.
|
Robdel12
added a commit
that referenced
this pull request
May 31, 2026
## Why
This PR is the docs polish slice for the SDK alignment stack. The code
PRs make the option contract real; this one makes sure the public docs
describe the product users actually get.
The docs had fallen behind in a few important ways. They did not clearly
show the current cloud setup flow. JSON output examples were stale.
Browser flag docs did not include Ember. Some command examples still
used older names or older payload shapes. And, most importantly after
the latest cleanup, the screenshot options docs did not clearly separate
user metadata from SDK/config options.
That separation matters. `properties` is the user key/value metadata
bag. Options like `threshold`, `minClusterSize`, `fullPage`, `buildId`,
and `requestTimeout` are behavior/request options and should stay
top-level. If docs blur that line, users copy the wrong shape and the
SDK has to guess what they meant.
## What changed
### README
- Adds split agent-init flags so users can install only the agent skill
or skip it when they only want config.
- Clarifies the cloud path: `vizzly login`, `vizzly project link`, then
`vizzly run "..." --wait`.
- Updates the JS client screenshot example to show structured viewport
metadata, `fullPage`, and `requestTimeout`.
- Clarifies that `properties` is user metadata.
- Clarifies that SDK/config options stay top-level and that
transport/request fields like `requestTimeout` and `buildId` are not
stored as screenshot metadata.
- Expands upload examples with `--threshold`, `--min-cluster-size`,
`--batch-size`, `--upload-timeout`, `--upload-all`, `--parallel-id`, and
`--allow-no-token`.
### JSON output reference
- Reworks command examples to show the standard `{ status, data }`
wrapper.
- Updates `run`, `run --wait`, TDD commands, builds, comparisons,
config, baselines, API, upload, preview, status, init, and project
examples to match current payload shapes.
- Clarifies that field selection applies before the standard output
envelope is wrapped.
- Updates project command docs from stale `project:*` examples to
current `project link` and `projects` flows.
- Adds current preview fields such as new bytes, reused blob count,
dedupe ratio, and base path.
### Browser flags
- Documents that Ember uses the same sandbox and CI-stability subset as
the browser-based SDKs.
- Adds the Ember launcher path to the source list reviewers should check
when browser flags change.
- Clarifies why Ember uses a smaller subset because Testem owns the rest
of the browser lifecycle.
## Testing and confidence
This is docs-only, so the useful verification is consistency against the
code PRs and diff hygiene. The docs now say the same thing the core/Ruby
changes enforce: user metadata belongs in `properties`; options that
change behavior stay top-level.
The remaining testing gap is not in this docs PR but in the broader
product stack: we still want a focused follow-up with real E2E
visual-diff tests that exercise the CLI/API/dashboard path with an
intentionally changed fixture.
## Review guide
1. Start with `README.md` and check the screenshot/options examples
against #283 and #286.
2. Review `docs/json-output.md` against the JSON output work in #283.
3. Check `docs/browser-flags.md` against the Storybook/static-site/Ember
browser launchers from the SDK PRs.
## Verification
- Docs-only slice.
- `git diff --check` passed after stack cleanup.
- Final stacked branch differs from the original preservation branch
only by intentional docs/code split changes and the removed custom
plugin example.
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
This PR aligns the Ruby and Swift SDKs with the contract established by the core, web, Vitest, and Ember slices.
These SDKs are especially important because users do not see the main JavaScript implementation details. They just call
Vizzly.screenshot(...),client.screenshot(...), orapp.vizzlyScreenshot(...)and expect the same build grouping, metadata, request timeout, comparison, and diff-failure behavior they get elsewhere.Before this pass, Ruby and Swift were close but not fully aligned. Build IDs and request timeouts could be treated like metadata.
failOnDiffwas not consistently available. Swift XCTest helpers duplicated metadata construction across overloads. Ruby accepted flexible option shapes, but the behavior was not crisp enough about what was a real SDK option versus user metadata.The goal is parity without overbuilding: one conceptual contract, expressed idiomatically in Ruby and Swift.
What changed
Ruby SDK
fail_on_diff:and honorsVIZZLY_FAIL_ON_DIFFplus discovered.vizzly/server.jsonsettings.VIZZLY_ENABLED=falseand reports disabled/ready state consistently.min_cluster_size/minClusterSize,full_page/fullPage,build_id/buildId, andrequest_timeout/requestTimeout.buildIdas a request field, not screenshot metadata.request_timeoutto the HTTP read timeout in milliseconds.propertiesas the user metadata bag.properties, promotes them to the correct behavior when no top-level value exists, and emits a warning.Swift SDK
failOnDiffoverride and honorsVIZZLY_FAIL_ON_DIFFplus discovered server config.fullPage,buildId, andrequestTimeout.URLRequest.timeoutInterval.buildIdoutsideproperties.fullPage: falseas an intentional value.Swift XCTest helpers
VizzlyXCTestMetadata.buildIdandrequestTimeoutthrough helper overloads.Docs and package surface
vizzly run "..."command style.Testing
propertieswarnings.The Ruby follow-up for the
propertiescontract was re-run after the stack split. The broader real visual-diff E2E matrix is still intentionally left for a focused follow-up so this already-large SDK slice stays reviewable.Verification
bundle exec rake testinclients/ruby: 21 runs, 64 assertions, 0 failures.swift test --filter VizzlyClientTests: 17 passed.git diff --checkand PR file-list checks for ✨ Align core SDK option contracts #283 through 📝 Document aligned SDK workflows #287.