✨ Render stock SwiftUI previews with Vizzly - #351
Open
Robdel12 wants to merge 8 commits into
Open
Conversation
Render existing stock #Preview declarations from the built app target through a Simulator-injected Swift runtime. Add the Vizzly CLI plugin, two-preview fixture, manifest output, and repeatable end-to-end coverage.
Select the device automatically when exactly one available iOS Simulator is booted. Keep ambiguous and stale-device cases explicit, actionable, and covered by the real preview capture path.
Harden the native renderer for real app targets, repeatable output, scheme selection, capture timeouts, and explicit compatibility failures. Ship the npm plugin through Swift releases, add CI coverage and complete fixture metadata, and verify package auto-discovery against a real iOS project.
Route native preview captures through the existing screenshot client for local TDD and cloud builds. Record upload outcomes, preserve explicit local-only capture, and cover the real HTTP boundary plus stock-preview naming and metadata.
Tighten managed output and plugin capability checks, run the native preview fixture during Swift releases, and replace duplicated Swift docs with focused XCTest and #Preview guides.
Move preview capture to a normal dynamic Swift Package dependency so Xcode owns building, embedding, and signing the runtime. Remove CLI injection and app mutation, add setup diagnostics, and prove the public integration on Simulator and device builds.
The macos-latest label moved to macOS 26, which no longer includes Xcode 16.2 or 16.4. Keep the existing compatibility matrix on the macOS 15 arm64 image where both toolchains are installed.
Scope the existing metric suppressions to the next class or method so the latest RuboCop no longer rejects the directive pairs. Ruby behavior and test coverage remain unchanged.
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
SwiftUI teams already describe important UI states with stock
#Previewdeclarations. Vizzly should be able to render those states directly instead of asking teams to maintain a second preview API or catalog.What changed
@vizzly-testing/swiftCLI plugin andvizzly previewscommand.Compatibility
The native renderer currently supports Xcode 26.6, arm64 iOS Simulators, iOS 17 or newer, scene-based apps, Debug builds, and previews without traits. The command checks the Xcode version and fails closed because preview interception depends on that release's Swift ABI.
Confidence