Skip to content

Update roborazzi to v1.75.0 - #1933

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/roborazzi
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/roborazzi

Conversation

@renovate

@renovate renovate Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
io.github.takahirom.roborazzi:roborazzi-junit-rule 1.74.0 → 1.75.0 age confidence
io.github.takahirom.roborazzi:roborazzi-compose 1.74.0 → 1.75.0 age confidence
io.github.takahirom.roborazzi:roborazzi 1.74.0 → 1.75.0 age confidence
io.github.takahirom.roborazzi:roborazzi-gradle-plugin 1.74.0 → 1.75.0 age confidence

Release Notes

takahirom/roborazzi (io.github.takahirom.roborazzi:roborazzi-junit-rule)

v1.75.0

Compare Source

Preview screenshots are 1.6x faster, and up to 3.7x with the new renderScale

Two changes to generated preview tests, plus a determinism fix for UI tree dumps.

1. Generated preview tests are 1.6x faster per preview — nothing to configure

Generated Compose Preview tests no longer recreate the Activity and Compose configuration for every preview.

per preview goldens
1.74.0 153.5 ms 736 KB
1.75.0 96.0 ms 736 KB
The same change can alter what you record

Reusing that setup meant fixing the order it runs in. Generated Android preview tests used to launch their Activity first and apply the preview's device, night mode and font scale afterwards, so startup saw the wrong environment. The configuration is now applied before the Activity is launched (#​932), along with two related lifecycle fixes: cached Compose rules are released after the test (#​930) and the Compose configuration, including fontScale, is restored after the capture scenario closes (#​931).

This is a fix, but it can change what you record. Anything whose rendering depends on when composition starts relative to Activity startup may come out differently. In this repository's 26-preview sample, one screenshot changed: a focused BasicTextField now draws its text cursor, which matches what Android Studio's preview shows. Re-record and review your goldens after upgrading; previews with focused text fields, or with work started at composition time, are the ones to look at.

2. New: renderScale trades fidelity for up to 3.7x (experimental)

renderScale scales rendering density while each preview's logical dp dimensions stay the same, so the layout is unchanged and only the pixel count drops.

roborazzi {
  generateComposePreviewRobolectricTests {
    enable = true
    packages = listOf("com.example.previews")
    renderScale = 0.5
  }
}
renderScale per preview vs default scale vs 1.74.0 pixels recorded goldens
1.0 (default) 96.0 ms — 1.60x faster 100% 736 KB
0.5 49.0 ms 1.96x faster 3.13x faster 25% 292 KB
1.0 / 3.0 41.0 ms 2.34x faster 3.74x faster 11% 184 KB

The vs 1.74.0 column is what you actually see when you upgrade and set the value in the same step.

Three things to weigh before lowering it:

  • Your screenshots hold fewer pixels, so a small visual regression can fall below the resolution you record at. Re-record your goldens when you change this value.
  • Anything sized in raw pixels does not scale with it. dp and sp follow the density and keep their proportions, but a value given in pixels — drawLine(..., strokeWidth = 1f), a px offset — stays that many pixels in a smaller image, so it comes out relatively thicker and in a different place. Previews built on px measurements are not simply a smaller version of the original.
  • Returns fall off quickly. Going from 0.5 to 1/3 cuts the pixels by more than half but buys only 1.2x more speed, because what remains is per-preview setup rather than rendering. 0.5 is a reasonable starting point.

Only the rendering shrinks: launching the Activity, composing and writing the file cost the same at any scale. A preview that renders a lot of pixels can nearly halve its time, while a small component is mostly setup and barely moves — in this repository's sample that setup floor is about 35 ms of the 96 ms. Measure before committing to a value.

ComposePreviewTester.Options gained a renderScale parameter. Source-compatible, but the JVM signatures of its constructor and copy changed, so a custom ComposePreviewTester shipped as a prebuilt artifact has to be recompiled against 1.75.0. Testers built from source with the rest of your project need nothing.

Thanks to @​sergio-sastre for reviewing this before it shipped and for suggesting an option to change the render scale per preview, which is what @RoboComposePreviewOptions(renderScale = ...) does.

This is @ExperimentalRoborazziApi: the name and behaviour may still change, and we are looking for feedback on it. If you try it, tell us what you measured and whether the trade-off worked for your suite in #​929.

How these numbers were measured

From this repository's own sample-generate-preview-tests module (26 Compose previews). Its sources and Gradle configuration are byte-identical between tag 1.74.0 and 1.75.0, so every configuration renders exactly the same previews.

  • Task: :sample-generate-preview-tests:recordRoborazziDebug only — record, no compare
  • Output images and test results deleted before every run
  • maxParallelForks = 1 (the Gradle default)
  • 2 warm-up runs, then 10 measured runs per configuration, configurations interleaved
  • Per-preview figures are the median of 250 samples (25 previews x 10 runs), read from the JUnit XML <testcase time>, with the first preview of each run excluded: it absorbs JVM, Robolectric and Compose initialisation (2.9-3.2 s in every configuration, ranges overlapping) and would otherwise hide the per-preview cost entirely
  • Apple M4 Max / 64 GB / macOS 26.3, JDK 21.0.8, Gradle 9.5.1, Robolectric 4.14.1

Whole-task times, for reference — these include Gradle and JVM start-up and are not comparable to the per-preview figures above:

configuration JUnit suite Gradle invocation (warm daemon)
1.74.0 7.76 s 9.6 s
1.75.0, renderScale = 1.0 6.33 s 8.2 s
1.75.0, renderScale = 0.5 4.68 s 6.2 s
1.75.0, renderScale = 1.0 / 3.0 4.10 s 5.7 s

Also: UI tree dumps no longer change on their own between runs

A semantics value whose type does not override toString() was written to the dump as androidx.compose.foundation.VerticalScrollableClipShape@5fb48f31. The hash half is the JVM's identity hash, so it changed on every run and the dump differed even when nothing in the UI did. Only the class name is recorded now, and whether the default toString() is in play is decided by reflection, so a custom toString() that merely looks like the default is left alone. Dumps holding such a value change once, the next time you record. This is the same trap #​911 fixed for CustomAccessibilityAction, reached through a different type.

Thanks to @​ryancfogarty for finding and fixing it in #​924.

What's Changed

New Contributors

Full Changelog: takahirom/roborazzi@1.74.0...1.75.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

github-actions Bot added a commit that referenced this pull request Sep 21, 2026
@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Preview Changes

Note

Compared against the baseline rendered from 050a661f, which is 1 commit(s) behind this PR's base (ae95e1d4) — the newest baseline published when this ran. Any preview those commits changed is attributed to this PR below. Re-run this check once the baseline for ae95e1d4 has published to see only this PR's own changes.

Changed (1 variant(s) across 1 function(s))

SessionDetailViewLoadedPreview (shared)

Before After
Unchanged (141 function(s), 280 variant(s))
  • AccountIconSignedInPreview
  • AccountIconSignedOutPreview
  • AccountScreenPreview
  • AccountViewSignedInPreview
  • AccountViewSignedOutPreview
  • Android Dark theme
  • Android Light theme
  • AndroidMakers Dark theme
  • AndroidMakers Light theme
  • AndroidMakers theme
  • AndroidSessionDetailPreview
  • AndroidSpeakerDetailsPreview
  • AssistantConversationPreview
  • BackgroundAndroid
  • BackgroundDefault
  • BackgroundDynamic
  • BookmarkAddPreview
  • BookmarkOnPreview
  • BookmarksPreview
  • BookmarksPreviewEmpty
  • BookmarksPreviewError
  • BookmarksPreviewErrorLong
  • BookmarksPreviewLoading
  • BookmarksPreviewLong
  • BookmarksTilePreview
  • BookmarksViewEmptyPreview
  • BookmarksViewLoadedPreview
  • BookmarksViewLoadingPreview
  • ColorSchemeSpecimenPreview
  • Color_0x000080
  • Color_0x000080Swatches
  • Color_0x008000
  • Color_0x008000Swatches
  • Color_0x800000
  • Color_0x800000Swatches
  • ConferenceCardPreview
  • ConferenceHomeScreen
  • ConferenceHomeScreenLoading
  • ConferenceHomeScreenWithBookmarks
  • ConferenceListViewLoadedPreview
  • ConferenceListViewLoadingPreview
  • ConferenceSelectionPreview
  • ConferencesViewCuratedPreview
  • ConferencesViewErrorPreview
  • ConferencesViewLongPreview
  • ConferencesViewPreview
  • Confetti (default) theme
  • Confetti brand Dark theme
  • Confetti brand Light theme
  • ConfettiHeaderPreview
  • DayChipPreview
  • Defaults
  • DefaultsSwatches
  • DevFest Dark theme
  • DevFest Light theme
  • DevFest theme
  • Droidcon Dark theme
  • Droidcon Light theme
  • Droidcon theme
  • Dynamic Dark theme
  • Dynamic Light theme
  • EmptyViewPreview
  • ErrorViewNoRetryPreview
  • ErrorViewWithRetryPreview
  • HazeBottomNavigationDetailPreview
  • HazeBottomNavigationPreview
  • HomeListViewAndroidMakers
  • HomeListViewDevFest
  • HomeListViewDroidcon
  • HomeListViewKotlinConf
  • HomeListViewLongPreview
  • HomeListViewPreview
  • KotlinConf Dark theme
  • KotlinConf Light theme
  • KotlinConf theme
  • LoadingViewPreview
  • LoadingViewWithMessagePreview
  • LoginTilePreview
  • MainActivity
  • NoConferenceTilePreview
  • NotSet
  • NotSetSwatches
  • OnboardingHazePreview
  • OnboardingSignInStepPreview
  • PlaceholderButtonPreview
  • ScheduleScreenPreview
  • ScreenHeaderPreview
  • SearchViewEmptyQueryPreview
  • SearchViewLoadedPreview
  • SearchViewLoadingPreview
  • SectionHeaderPreview
  • SessionCardBookmarkedPreview
  • SessionCardLoadingPreview
  • SessionCardPopulatedPreview
  • SessionDetailViewEmptyPreview
  • SessionDetailViewLoadedPreview
  • SessionDetailViewPreview
  • SessionDetailsPreview
  • SessionDetailsScreen
  • SessionDetailsScreenPreview
  • SessionItemBreakPreview
  • SessionItemLightningPreview
  • SessionItemPopulatedPreview
  • SessionItemViewBreakPreview
  • SessionItemViewLightningPreview
  • SessionItemViewLoadedPreview
  • SessionListGridViewLoadedPreview
  • SessionListGridViewLoadingPreview
  • SessionListViewErrorPreview
  • SessionListViewLoadedPreview
  • SessionListViewLoadingPreview
  • SessionListViewLongPreview
  • SessionListViewPreview
  • SessionSpeakerChipPreview
  • SettingsListViewLongPreview
  • SettingsListViewPreview
  • SettingsScreenPreview
  • SocialIconPreview
  • SpeakerDetailsScreen
  • SpeakerDetailsScreenPreview
  • SpeakerDetailsViewAlternateSpeakerPreview
  • SpeakerDetailsViewLoadedPreview
  • SpeakerDetailsViewPreview
  • SpeakerGridViewEmptyPreview
  • SpeakerGridViewLoadedPreview
  • SpeakerItemPreview
  • SpeakerItemViewLoadedPreview
  • SpeakerItemViewNoTaglinePreview
  • ThemeFoundationAndroidMakersPreview
  • ThemeFoundationAndroidPreview
  • ThemeFoundationConferenceSeedPreview
  • ThemeFoundationConfettiPreview
  • ThemeFoundationCurrentPreview
  • ThemeFoundationDefaultPreview
  • ThemeFoundationDevFestPreview
  • ThemeFoundationDroidconPreview
  • ThemeFoundationDynamicPreview
  • ThemeFoundationKotlinConfPreview
  • TypographySpecimenPreview
  • VenueViewLoadedPreview
  • VenueViewWithFloorPlanPreview

@renovate
renovate Bot force-pushed the renovate/roborazzi branch from b88f330 to 69d177c Compare September 24, 2026 16:38
github-actions Bot added a commit that referenced this pull request Sep 24, 2026

This branch has not been deployed

No deployments
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.

0 participants