Scroll captures
Long-form scrolling captures (one tall PNG that stitches the whole scrollable region) and animated GIFs of the scroll itself, driven through the renderer extension pipeline.
At a glance
| Kinds | render/scroll/long, render/scroll/gif |
| Schema version | n/a (image-only) |
| Modules | :data-scroll-core (pure JVM — planners, stitcher, GIF encoder, axis), :data-scroll-android (the Android AndroidComposeTestRule-bound scroll drivers used by :renderer-android) |
| Render mode | default |
| Cost | medium (extra renders per scroll step) |
| Token usage | Image-only — ~1.5 k tok per render/scroll/* PNG read; payload itself is a path. See token usage. |
| Transport | path (PNG / GIF) |
| Platforms | Android · Desktop · shared |
What it answers
- What does the entire scrollable region look like, end to end, not just the viewport at rest?
- What does the scroll motion look like over time (entry animations, sticky headers settling,
LazyColumnitem placement)? - Does a
nestedScrollcollapse / expand land in the right state at the end of a fling?
data/scroll/core ships the pure-JVM scroll primitives (ScrollAxis,
ScrollLongFramePlan / ScrollGifFramePlan planners,
ScrollSliceStitcher, ScrollGifEncoder, ScrollPreviewExtension).
data/scroll/android ships the AndroidComposeTestRule-bound
ScrollDriver (driveScrollByViewport, driveScrollBy,
driveScrollToStart, driveScrollToEnd, remainingScrollPx) — the
Android renderer composes both. The Compose Desktop renderer pulls
just data-scroll-core and drives the scrollable through
runComposeUiTest directly, sharing the pure-JVM planners and
stitcher with the Android path.
What it does NOT answer
- Scroll is renderer-side only — it produces image artifacts, not a JSON payload, so it has no
kindon the daemon’sinitialize.capabilities.dataProductslist. There is nodata-scroll-connector. It never round-trips throughdata/fetchordata/subscribe; instead the renderer drives it directly viaPreviewPipelineStep/ scenario-driver hooks. - It does not measure scroll performance — for that, instrument
compose/recompositionover the same scrolled frames.
Use cases
- Render a tall settings screen as one PNG for design review.
- GIF a
LazyColumnto verify item-key stability across data changes. - Capture the full scroll of a Wear
ScalingLazyColumnto confirm the curvature target.
Payload shape
Image-only artifacts. Produced via
:data-scroll-core
extensions. Output paths under
build/compose-previews/renders/<id>-long.png and
build/compose-previews/renders/<id>.gif.
Enabling
Annotate the preview with the matching multi-preview annotation (e.g.
@ScrollingPreview) — see
skills/compose-preview/references/capture-modes.md
for the multi-preview / scenario annotations the scroll extension
recognises.
Companion products
- Recomposition —
compose/recompositionto attribute scroll cost to specific composables. - History diff —
history/diff/regionsagainst a long-PNG baseline to catch list-item layout regressions.