Repository navigation
Conversation
Capture every Storybook story of native-samples on an iOS simulator and an Android emulator with @natsuneko-laboratory/react-native-visual-regression-test, and compare them with baselines in __vrt__/<platform>. - Start the VRT agent and wrap stories in a VrtBoundary; hold captures until the remote images in each Flex Message have been prefetched. - Render stories in a vertical ScrollView so that carousels keep their natural height, and silence the Reanimated warning whose LogBox toast would show up in Android screenshots. - Point the app entry at .rnstorybook/index.ts, since there is no app/ router. - Add a VRT workflow for pull requests, with a manual mode that uploads new baselines taken on CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
Adds visual regression tests (VRT) for the React Native Storybook app in
packages/native-samples, using@natsuneko-laboratory/react-native-visual-regression-test. Every story is rendered on a real iOS simulator and Android emulator, captured natively, and compared with the baselines inpackages/native-samples/__vrt__/<platform>/.pnpm vrt/vrt:ios/vrt:androidrun the tests while the app is running;pnpm vrt:updateupdates baselines.expected | actual | diffimages as artifacts. Running the workflow manually with update checked uploads baselines taken on CI instead.Changes in the sample app
.rnstorybook/preview.tsxVrtBoundary(withVrt), which captures only the message and not the background.ScrollView, as in a chat. Carousels (horizontalScrollViews) now keep their natural height instead of stretching to the screen..rnstorybook/index.ts__DEV__.mainnow points at.rnstorybook/index.ts. Theexpo-router/entryentry had noapp/routes, so Storybook never started.app.jsongets the iOS bundle ID and Android package name thatexpo run:*added. Change them if you want different identifiers.pnpm ios/pnpm android). Expo Go does not work.Baselines
macos-26runner.Notes for reviewers
workflow_dispatchneeds the file onmain), then commit thevrt-android-baselinesartifact.settleMsfor Android is the next step.gradle/actions/setup-gradlev6 makes caching a proprietary component that requires accepting Gradle's Terms of Use. It is left out; add it if the org accepts those terms.pinact run -u.on-pull_request-ci.ymlreferences a missing.node-versionand an undefinedpnpm lint.be832a5 fix: fixcommit (a one-line change toApparel.stories.tsx), which is not onmainyet.🤖 Generated with Claude Code