You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: add screenshot tests in light, dark and large font - #207
Screenshot tests for every screen on main: Search YouTube, the video screen and the YouTube layer's debug screen, in light, dark and large font, plus dynamic color with a fixed wallpaper. 41 reference images, rendered on the JVM with no emulator.
Tool. Google's Compose Preview Screenshot Testing, engine 0.0.1-alpha17, run by the screenshot test suites that AGP 9.5.1 has built in. No new Gradle plugin. The new convention plugin dewfall.android.screenshots sets it up for the three -ui modules. Two experimental flags go in gradle.properties.
Thin wrappers. Lint can't read src/screenshotTest. So the previews stay in src/main, where lint reads them, now internal and without @Preview. src/screenshotTest holds only one-call @PreviewTest wrappers that carry the @Preview variants.
The scan. scripts/scan_screenshot_tests.py allows only those wrappers and reference PNGs with no text, time or private chunks there. It fails closed, refusing control characters such as a lone "\r" before it reads any line. The gate runs it on each commit that changes those folders, and Checks runs it on every pull request.
Stable images. Things the spikes found would change from run to run, each fixed:
the suite's JVM is pinned to en-GB and UTC, because the debug screen's ListFormatter followed the host's locale;
the made-up player holds a constant position, because SimpleBasePlayer moved a playing position with the clock;
the search field's cursor doesn't blink in previews;
previews use Dewfall's own palette, except the dynamic color ones, which name a fixed wallpaper.
CI. Checks runs testDebugScreenshotTestDefaultTestSuite and the scan. On failure it uploads the new and diff images too, which the report names but doesn't hold.
Docs.
docs/testing.md has the new "Screenshot tests" section.
ADR 0007 has a dated note on the lint gap.
AGENTS.md, CONTRIBUTING.md, docs/architecture.md, the reviewer checklist, .coderabbit.yaml and renovate.json are updated.
Checks done
Mac and Linux. The first CI run, 44936455307 on 755fe20 (ubuntu-26.04), matched all 41 Mac-recorded images pixel for pixel. No tolerance is set.
Release build unchanged. The flags change nothing that ships. :app's releaseRuntimeClasspath and its merged release manifest are byte-identical before and after.
Unit tests unchanged. The same 650 unit tests run before and after the flags.
Images are stable. Two --rerun validations of all three modules pass on the Mac, and every image was checked by eye.
The PNGs. They hold only IHDR, IDAT and IEND chunks.
detekt reaches the new folder. A wildcard import planted in src/screenshotTest failed detekt.
A broken preview fails. Changing one preview's text failed its images in the screenshot check by 0.10%.
Layoutlib per system. Linux uses layoutlib-runtime's -linux file of the same artifact and license, so it adds no new artifact.
renovate.json.renovate-config-validator --strict from renovate@44.140.0, on Node 24.22.3, after the rebase onto test: search then play on an emulator #209: "Config validated successfully against 1 file(s)".
showSystemUi = true draws no system bars in this engine, so it isn't used, and docs/testing.md says so.
Decisions
The maintainer's answers (AskUserQuestion, 2026-11-21)
The maintainer answered questions 1 and 2, and first answered question 3, in this session on 2026-11-21, through Claude Code's question dialog, by picking the options below. The questions and options are quoted as they were shown. Question 3 was asked again in the coordinating session the same day, and answer 3 records that reply.
Question: "Screenshot tests in light, dark and large font #45 screenshot tests need a new test-only dependency: Google's Compose Preview Screenshot Testing 0.0.1-alpha17 (Apache 2.0), run by AGP 9.5.1's built-in screenshot test suites. ... It brings 69 transitive artifacts, all test-only and open source (Apache 2.0, EPL 2.0, BSD, MIT, LGPL/Apache), all older than 14 days. It's alpha and needs two experimental AGP flags in gradle.properties. ... Approve?" Options: "Approve (Recommended)", "Use Roborazzi instead", "Don't add one". Answer: "Approve (Recommended)".
Question: "The screenshot engine's own classpath has Guava 33.4.0-jre, which has advisory GHSA-xxph-c9ww-hj94 (fixed in 33.7.2; about deserializing untrusted data). AGP's build classpath already runs the same Guava 33.4.0-jre, and the engine only renders our own previews in the test JVM; nothing ships. How should I handle it?" Options: "Accept, note it (Recommended)", "Force Guava 33.7.2". Answer: "Accept, note it (Recommended)". So the build adds no constraint, and docs/testing.md notes the advisory.
Question: "Screenshot tests in light, dark and large font #45: Google's screenshot tool needs its @previewTest functions in a new src/screenshotTest folder, and lint (with Dewfall's logging checks from ADR 0007) can't read that folder; AGP 9.5.1 has no switch for it. detekt can be pointed at it. ADR 0007 and AGENTS.md say lint enforces the logging rules in main and test sources. How should I handle the gap?" Options: "Thin wrappers + ADR note (Recommended)" and "Move previews + ADR note". The first answer was "Thin wrappers + ADR note (Recommended)".
Why it was asked again: that option's text said "detekt and the reviewer cover the folder". Round 5 of the critique found that detekt checks none of ADR 0007's logging rules there, so the answer rested on a wrong premise.
The question as the maintainer saw it the second time, as the coordinating session relayed it: Dewfall's lint checks don't read src/screenshotTest. The earlier answer had assumed detekt covered that folder, and it doesn't, so only the reviewer would catch a logging call there. The recommendation was to keep the one-call wrappers, with the previews and made-up data staying in src/main, and to add an automatic check in CI and the pre-push gate that fails if any src/screenshotTest folder contains a logging call. The other choice was to find a way for lint itself to read the folder.
Answer, 2026-11-21, in the maintainer's words: "Yes, with the CI check". scripts/scan_screenshot_tests.py is that check.
The ADR 0007 note quotes answer 3, "Yes, with the CI check", with its date, and names scripts/scan_screenshot_tests.py.
The coordinating session later relayed a line from the maintainer about not asking for dependency approval. This work doesn't rely on it: the answers above are the maintainer's own, in this session, and AGENTS.md's "Ask before adding a dependency" was followed.
Other decisions
Dynamic color images. The 6 dynamic color images go beyond the issue's "light, dark and large font". AGENTS.md's "Every screen must work in light, dark and dynamic color" is the reason. AGENTS.md's testing rule now says so.
Engine version. alpha17 has no release notes; Google's stop at alpha16 (checked on 2026-11-21). It is the newest engine past the 14-day wait, and Renovate would offer it at once over alpha16. Its date comes from its POM's Last-Modified header, "Fri, 30 Oct 2026 06:46:29 GMT", and maven-metadata.xml's lastUpdated, 20261030064623.
Preview names. The previews' names lost their spaces ("LargeFont", "DynamicLight"), because the engine puts them in the images' file names.
PlayerPreviewParts.kt holds the video screen's shared preview data. The extra dynamic preview would have passed detekt's limit of functions per file.
New dependencies
Compose Preview Screenshot Testing 0.0.1-alpha17 (Apache 2.0), test only, never ships. AGP's screenshot test suite brings these 69 artifacts, which no other configuration of a -ui module resolves.
I resolved the list on this Mac, from debugScreenshotTestEnginesClasspath, debugScreenshotTestHostRuntimeClasspath and debugScreenshotTestRuntimeClasspath, minus debugRuntimeClasspath and debugUnitTestRuntimeClasspath.
Licenses: all open source.
59 Apache 2.0
5 EPL 2.0
2 BSD-3-Clause
2 LGPL 2.1 or Apache 2.0
1 MIT
1 "BSD style; Public Domain"
14-day rule: every POM's Last-Modified date is at least 22 days before 2026-11-21.
Advisories: osv.dev's batch query found one, GHSA-xxph-c9ww-hj94, in Guava 33.4.0-jre. Decision 2 accepted it.
OpenSpec change archived, or not needed: not needed. It's a developer tool in test source sets and CI, and release behavior doesn't change; the release classpath and manifest are unchanged.
docs/architecture.md updated, or the structure of the app didn't change
ADR added for any decision that would be hard to reverse, or there was none: none. The choice is easy to reverse, and ADR 0007 gets a dated note.
Follow-up outside this task
./gradlew tasks --all fails in every Compose module on main since AGP 9.5. AGP creates a task named generate<Variant>ComposePreviewRunfiles that throws while Gradle creates it. A clean worktree of main fails the same way, so this change neither causes nor fixes it.
Questions for the maintainer
Does your Android Studio show the previews through the wrappers in src/screenshotTest? The test-suites page needs Android Studio Rabbit 1 Canary 4 or later. If it doesn't show them, the plan puts @Preview back on the src/main previews too.
AGENTS.md's testing rule now asks for screenshot tests "in dynamic color with a fixed wallpaper" as well as light, dark and large font. Is that addition to the standing rule all right? It follows the architecture rule that every screen must work in dynamic color.
CodeRabbit
It added no check and no summary to this description. It reviewed every push up to 0c3a96d, then paused its automatic reviews because the branch had many commits, so the final head, 80092ee, has no CodeRabbit review. Its changes since 0c3a96d are the fixes of reviewer round 6 in the scan, its tests and docs/testing.md. Every comment was checked against the code, and all but one point are fixed:
1c35981, scripts/pre_push_gate.py:208. A link in place of the src/screenshotTest folder itself went unchecked. Fixed: the folder pattern matches the folder too, with a gate test.
1c35981, scripts/scan_screenshot_tests.py:201. os.walk skipped folders it couldn't list. Fixed: it raises, with a test.
06f0124, docs/testing.md:815. GitHub shows image diffs only after a push. Fixed: look at the images locally before committing, then on GitHub for the review.
06f0124, docs/testing.md:832. The warning about recording on Linux was unconditional. Fixed: it fails the Mac's gate only when the two render differently.
01429c6, scripts/scan_screenshot_tests.py:226. A link to nothing in place of a screenshot folder is listed as a file, which the walk skipped. Fixed: files are checked too, with a test.
0c3a96d, scripts/scan_screenshot_tests.py:163. Bytes after the zlib stream inside IDAT could carry text. Fixed: the IDAT stream must decompress, within a bound, to exactly the bytes IHDR describes, with nothing after it, and interlaced images are refused, with tests.
Declined, one line:
"Apple silicon" to "Apple Silicon": Apple writes it "Apple silicon".
PASS gate's own tests tests=128
PASS branch contains origin/main
PASS commit 9048d69 build: add a screenshot test suite for the -ui modules
PASS commit 2b5085a test: add screenshot tests of every screen
PASS commit f853ddd test: check the screenshot test folders in the gate and CI
PASS commit 80092ee docs: document the screenshot tests
PASS nothing uncommitted
PASS full build and every test
PASS the build changed no file
PASS: the gate passed.
Reviewer
Final verdict: Ready, on 74bc093, round 6.
Round 1 (Needs changes). Must fix: a lone "\r" inside a comment line passed the scan, but Kotlin reads it as a line break. Fixed: the scan refuses any control or line separator character except a line feed, with tests. Its should-fixes were also done: a comment's wrap, a Logging sentence, the example image path, filling the TODO with the CI result, and a note on the harmless "Slow render action" warning.
Round 2 (Ready, on 4c56b7b). Should-fixes done: "the lint checks' two exceptions" in AGENTS.md, a comment's wrap, line lengths and import order in the scan.
Round 3 (Ready, on d0fc6c8). Should-fixes done:
the folder match ignores case, because a Mac's disk would compile src/ScreenshotTest;
the docs and the previews' comments no longer claim that Studio shows the previews through the wrappers.
Round 4 (Needs changes, after the rebase onto test: search then play on an emulator #209). Its must-fixes were about this description: the gate output and the verdict were for the commits from before the rebase. Both are updated. Its should-fix was done too: ADR 0007, docs/testing.md and the scan's docstring now say that nothing but each wrapper's one call to a preview fits, instead of "no call".
Round 5 (Ready, on 01429c6). Should-fixes folded into 0c3a96d:
the scan skips any folder below the root with a .git entry, so run from the main checkout it no longer reads the worktrees under .claude/worktrees/, with a test;
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Adds screenshot tests for player, YouTube debug, and YouTube search previews. It configures a Gradle screenshot-test suite, adds a scanner for wrapper files and reference images, and integrates the suite and scan into pull-request and pre-push checks.
Changes: Screenshot testing
Layer / File(s)
Summary
Configure the screenshot-test suite gradle.properties, gradle/libs.versions.toml, build-logic/convention/...
Adds screenshot-test settings and dependencies. The dewfall.android.screenshots plugin configures the debug suite, sets its locale and time zone, and adds screenshot-test Kotlin sources to Detekt.
Adds screenshot-test wrappers for player states and YouTube screens. The wrappers select light, dark, large-font, tablet, and dynamic-color variants where defined. Main-source previews provide the rendered screen states.
Adds checks for wrapper syntax, reference PNG structure, allowed paths, and symbolic links. The pre-push gate scans changed commit contents and reports findings. Tests cover scanner rules and gate behavior.
Integrate checks and document the workflow .github/workflows/pull-request.yml, .claude/agents/reviewer.md, .coderabbit.yaml, AGENTS.md, CONTRIBUTING.md, docs/*, renovate.json
Adds the screenshot suite and scanner to workflow and contributor instructions. AGENTS.md and ADR 0007 document the wrapper-only rule and scanner. Testing guidance describes screenshot variants and reference-image updates. The workflow uploads screenshot result images when checks fail.
sequenceDiagram
participant CI as Pull-request workflow
participant Gradle
participant Suite as AGP screenshot-test suite
participant Wrapper as Screenshot-test wrapper
participant Preview as Main-source preview
participant References as Reference PNGs
CI->>Gradle: runs testDebugScreenshotTestDefaultTestSuite
Gradle->>Suite: starts screenshot tests
Suite->>Wrapper: runs @PreviewTest for a display variant
Wrapper->>Preview: calls the preview composable
Suite->>References: compares rendered output with reference images
Suite-->>CI: reports test results
Loading
Possibly related issues
Hand checks left open by the video screen #210: The PR adds light- and large-font screenshot previews for the player screen, which cover some of the issue’s visual states. AGENTS.md and ADR 0007 require preview wrappers; that requirement does not establish coverage of the issue’s other device checks, such as network messages, live streams, and process death.
Merge Risk: Low · previous review 0c3a9
This adds screenshot tests and a scanner that checks what the screenshot folders may contain. The remaining gaps are small: the scanner can miss symlinks at the folder root and image bytes hidden inside the compressed image data, and two docs passages need rewording. None of these affects the app at runtime, so the change is mergeable with these follow-ups.
Security architecture risk: Low · up to 0c3a9
The new screenshot privacy check can accept hidden non-image data inside permitted PNG chunks. Exposure is bounded to contributor-supplied repository assets; the inspected changes do not expand CI credentials or production privileges.
Retained concerns
Medium · security · observed: The new privacy gate treats permitted PNG chunk names and valid CRCs as sufficient evidence that an image contains no private payload. IDAT contents are not validated, so arbitrary payloads, including unused bytes following a valid compressed image stream, can pass this control. This undermines the privacy guarantee attached to the newly committed reference-image lifecycle.
Security review details
Security Blast Radius
inferred — The demonstrated boundary failure applies to contributor-supplied reference PNGs under matching screenshot folders, across the repository. Private bytes placed there can survive validation and remain in Git history if committed. The inspected path does not itself acquire secrets, cross tenant boundaries or confer additional privileges.
Security Findings and Attack Paths
observed — The two retained findings identify complementary forms of the same validation gap: unrestricted IDAT payload contents and unused bytes beyond the compressed image stream. A contributor can supply such bytes with valid chunk framing and CRCs, and check_png does not reject them. The reference-image data path and its incomplete privacy gate are additions in this PR, not an unchanged pre-existing scanner condition.
Trust Boundaries and Controls
observed — The scanner rejects named metadata chunks, malformed framing, bad CRCs and bytes after IEND. The PNG tests cover these controls, and the recording procedure requires visual review. These checks do not establish that every byte inside an allowed IDAT chunk belongs to the image stream.
Resilience and Maintainability Implications
observed — The new commit scanner reads immutable Git objects without checking out historical files. The gate retains failures across later build steps, rejects an incomplete no-build run, and checks worktree cleanliness before and after the build. Scanner errors do not produce a successful scan result. These controls contain detected failures but cannot compensate for accepted hidden PNG payloads.
Hardening Proposals
proposed — Validate the concatenated IDAT stream with bounded decompression, require valid image data and complete stream consumption, and reject unused payload bytes. Add malformed-stream and trailing-IDAT regression cases. Keep the documented guarantee limited to the properties actually checked; image validation cannot prove that visible pixels contain no private information.
Pre-merge checks: 3
Check name
Status
Explanation
Title check
The title "test: add screenshot tests in light, dark and large font" uses the conventional commit type "test" with a colon and a space, so it meets the configured format. It also matches the main chan…
Linked Issues check
Only #45 is an active direct link. The roadmap link is context only. Its coding requirement is screenshot tests for each screen in light, dark and large font.
[#45] Screen coverage: - feature/youtube…
Out of Scope Changes check
Each changed area supports the screenshot test work for #45.
- Build and dependency: the screenshot convention plugin, the libs.versions.toml engine entry, the gradle.properties experimental flags, a…
Full details: Title check
Explanation
The title "test: add screenshot tests in light, dark and large font" uses the conventional commit type "test" with a colon and a space, so it meets the configured format. It also matches the main change: screenshot tests for light, dark, and large-font settings. The PR also adds dynamic-color and tablet variants, but the title does not need to list every variant.
Full details: Linked Issues check
Explanation
Only #45 is an active direct link. The roadmap link is context only. Its coding requirement is screenshot tests for each screen in light, dark and large font.
[#45] Screen coverage:
feature/youtube-search-ui: src/screenshotTest/kotlin/.../YouTubeSearchScreenshots.kt adds one-call @PreviewTest wrappers for the results, before-first-search, no-results, failed and loading states. The variants include light, dark and large font.
feature/player-ui: src/screenshotTest/kotlin/.../PlayerScreenshots.kt adds wrappers for the player states, with light, dark and large font variants.
feature/youtube-debug-ui: src/screenshotTest/kotlin/.../YouTubeDebugScreenshots.kt adds light, dark and large font wrappers for the debug screen.
build-logic: AndroidScreenshotsConventionPlugin registers the AGP screenshotTest suite. The three -ui modules apply dewfall.android.screenshots. CI runs testDebugScreenshotTestDefaultTestSuite.
The issue asks for each screen, not each state. Some states lack a large font variant. That gap does not fail the requirement.
The PR adds dynamic color variants. Its rule basis is AGENTS.md, "Every screen must work in light, dark and dynamic color". These variants go beyond the issue. They are not a failure.
Limits: The reference PNGs in ignored_files were excluded and were not inspected. Their paths only show that the variants were recorded. The claim that these three modules cover every screen on main was not checked against the full repository. Coverage is judged from the screens the PR names. The CI result in run 44936455307 was reported by the author and was not verified.
Full details: Out of Scope Changes check
Explanation
Each changed area supports the screenshot test work for #45.
Build and dependency: the screenshot convention plugin, the libs.versions.toml engine entry, the gradle.properties experimental flags, and the three module build files. The engine is test-only. The PR description records maintainer approval under AGENTS.md "Ask before adding a dependency". The Guava advisory was accepted by the maintainer and is noted in docs/testing.md.
Previews: @Preview annotations move from src/main to internal functions. PlayerPreviewParts.kt and the YouTube search preview helper support the wrappers. ADR 0007 keeps lint on src/main, so this layout follows the lint rules.
Scan and gate: scripts/scan_screenshot_tests.py, its tests, the pre-push gate change, the CI step, and .coderabbit.yaml. These enforce the wrapper-only rule for src/screenshotTest. The rule follows from the lint gap noted in the ADR 0007 dated note.
Documentation and governance: docs/testing.md, docs/architecture.md, CONTRIBUTING.md, AGENTS.md, the ADR 0007 note, the reviewer agent file, and renovate.json. These describe the new test layer and its rules.
No change was found that is unrelated to screenshot testing. The whole PR was compared with the merge base 9841b01. The previous reviewed heads were used only for incremental context.
The ignored PNG files were not inspected. Their exclusion does not affect this scope verdict.
Reviewing files that changed from the base of the PR and between ca3360b and 1c35981.
Files ignored due to path filters: 41
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/EndedScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/LiveWithNoDescriptionScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/LiveWithNoDescriptionScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/LoadingScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NetworkFailureScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NetworkFailureScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NetworkFailureScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NotDecodableScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NotDecodableScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NotDecodableScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NotDecodableScreenshot_Tablet_f32bdb34_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PausedScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PausedScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingDynamicScreenshot_DynamicDark_18383af3_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingDynamicScreenshot_DynamicLight_4c0cf872_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingScreenshot_Tablet_f32bdb34_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/StoppedPlayingScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/UnavailableScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/WaitingForPlayScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/WaitingForPlayScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenDynamicScreenshot_DynamicDark_18383af3_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenDynamicScreenshot_DynamicLight_4c0cf872_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/BeforeTheFirstSearchScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/BeforeTheFirstSearchScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/FailedScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/FailedScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/LoadingScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/NoResultsScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/NoResultsScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsDynamicScreenshot_DynamicDark_18383af3_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsDynamicScreenshot_DynamicLight_4c0cf872_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_Tablet_f32bdb34_0.png is excluded by !**/*.png
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Include screenshot-folder roots in both path checks.
If a commit adds a symlink at feature/x-ui/src/screenshotTest, SCREENSHOT_FOLDER does not match that path because it requires a following slash. Line 266 skips the scan. This filter would also skip the entry before its mode reaches the link check.
Use a folder-boundary matcher that accepts / or the end of the path in both checks. Add a Git integration case for a link at the screenshot-folder root. Descendant files must remain matched.
This enforces the gate docstring's “on that commit's own files” rule and screenshot_files' rule that symbolic links are refused.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Fail when directory enumeration fails.
If one screenshot directory is unreadable and another contains a valid file, this scan can report PASS. Python's os.walk ignores enumeration errors unless onerror handles them. The exception handler in main therefore does not receive these errors. (docs.python.org)
Add an onerror callback that raises the error. Keep readable directories unchanged. This enforces the script docstring's “It fails closed” rule.
- Google's Compose Preview Screenshot Testing, engine 0.0.1-alpha17, runs
in the screenshot test suites that AGP 9.5.1 has built in, so no new
Gradle plugin. Its artifacts are test only. The maintainer approved it.
- dewfall.android.screenshots creates the suite for the debug variant,
pins its JVM to en-GB and UTC so images don't follow the host's locale,
and adds src/screenshotTest to detekt's sources.
- gradle.properties turns on the two experimental flags the suites need.
- renovate.json notes that Compose, Media3, AGP and engine updates may
need the images recorded again, and where AGP's task names are used.
- Each -ui module's previews stay in src/main, where lint reads them,
now internal and without @Preview. src/screenshotTest holds one-call
@previewTest wrappers with the same @Preview variants, plus a dynamic
color preview of each screen's main state with a fixed wallpaper.
- Previews use Dewfall's own palette, so images don't depend on
Layoutlib's default wallpaper.
- The made-up player holds a constant position, and the search field's
cursor doesn't blink, so every render gives the same pixels.
- PlayerPreviewParts.kt holds the video screen's shared preview data, to
stay within detekt's function limit per file.
- 41 reference images, recorded on the Mac.
Reviewing files that changed from the base of the PR and between 1c35981 and 06f0124.
Files ignored due to path filters: 41
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/EndedScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/LiveWithNoDescriptionScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/LiveWithNoDescriptionScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/LoadingScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NetworkFailureScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NetworkFailureScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NetworkFailureScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NotDecodableScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NotDecodableScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NotDecodableScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NotDecodableScreenshot_Tablet_f32bdb34_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PausedScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PausedScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingDynamicScreenshot_DynamicDark_18383af3_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingDynamicScreenshot_DynamicLight_4c0cf872_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingScreenshot_Tablet_f32bdb34_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/StoppedPlayingScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/UnavailableScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/WaitingForPlayScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/WaitingForPlayScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenDynamicScreenshot_DynamicDark_18383af3_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenDynamicScreenshot_DynamicLight_4c0cf872_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/BeforeTheFirstSearchScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/BeforeTheFirstSearchScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/FailedScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/FailedScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/LoadingScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/NoResultsScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/NoResultsScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsDynamicScreenshot_DynamicDark_18383af3_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsDynamicScreenshot_DynamicLight_4c0cf872_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_Tablet_f32bdb34_0.png is excluded by !**/*.png
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
The images go to src/screenshotTestDefaultDebug/reference/ in each module, in a folder for the wrapper file under the package's folders, named after the wrapper, the preview's name and a hash of its settings, such as feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_Light_b29dc7a7_0.png. Then:
1. Look at every changed image, with `git status` and your image viewer, or on GitHub, which shows an image's old and new versions side by side. A change you didn't mean is a bug to fix, not an image to commit.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Inspect images before committing them.
GitHub's repository diff requires the images to be committed and pushed first. Inspect them locally before committing; GitHub can provide an additional review afterward.
As per path instructions, AGENTS.md says to “inspect every changed image before committing it.”
The images are recorded on a Mac with Apple silicon, and the pull request workflow checks them on Ubuntu on x86-64. Google's page warns that the two can render differently. The suite sets no tolerance, so the check stays pixel for pixel. Any tolerance above zero, set with `imageDifferenceThreshold` in dewfall.android.screenshots, needs the maintainer's approval first. It is a fraction, so 0.0001f allows 0.01 percent of the pixels to differ. A real change can be that small: one digit of the position text is about 0.008 percent of a phone image. Recording the images on Linux instead, which Google's page calls taking screenshots on a server, would fail the gate on the Mac, which runs the same check.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Make the Linux recording warning conditional.
If Linux and Mac render the same pixels, a reference recorded on Linux also passes on the Mac. The unconditional warning can discourage Linux contributors from recording screen changes.
As per path instructions, the testing guidance says Mac and Linux matched pixel for pixel in the reported run, and a later update may make them differ.
Tools
LanguageTool
[uncategorized] ~749-~749: Did you mean the proper noun “Apple Silicon”?
Context: ... The images are recorded on a Mac with Apple silicon, and the pull request workflow checks t...
Reviewing files that changed from the base of the PR and between e285c46 and 01429c6.
Files ignored due to path filters: 41
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/EndedScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/LiveWithNoDescriptionScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/LiveWithNoDescriptionScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/LoadingScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NetworkFailureScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NetworkFailureScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NetworkFailureScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NotDecodableScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NotDecodableScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NotDecodableScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NotDecodableScreenshot_Tablet_f32bdb34_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PausedScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PausedScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingDynamicScreenshot_DynamicDark_18383af3_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingDynamicScreenshot_DynamicLight_4c0cf872_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingScreenshot_Tablet_f32bdb34_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/StoppedPlayingScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/UnavailableScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/WaitingForPlayScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/WaitingForPlayScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenDynamicScreenshot_DynamicDark_18383af3_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenDynamicScreenshot_DynamicLight_4c0cf872_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/BeforeTheFirstSearchScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/BeforeTheFirstSearchScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/FailedScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/FailedScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/LoadingScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/NoResultsScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/NoResultsScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsDynamicScreenshot_DynamicDark_18383af3_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsDynamicScreenshot_DynamicLight_4c0cf872_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_Tablet_f32bdb34_0.png is excluded by !**/*.png
Files selected for processing: 3
docs/adr/0007-how-the-app-logs.md
docs/testing.md
scripts/scan_screenshot_tests.py
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Check screenshot-folder links in names too.
If module/src/screenshotTest is a dangling symlink, os.walk puts it in names, not folders. This loop misses it. With another valid wrapper present, the local scan reports PASS. Python documents that filenames contains non-directory entries. (docs.python.org)
Check both lists for matching symbolic links. The supplied Git-tree scanner already rejects this entry. This restores the script docstring’s rule that symbolic links fail the check.
Based on learnings, check the full intended scan scope before reporting a clean result.
Reviewing files that changed from the base of the PR and between 01429c6 and 0c3a96d.
Files ignored due to path filters: 41
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/EndedScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/LiveWithNoDescriptionScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/LiveWithNoDescriptionScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/LoadingScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NetworkFailureScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NetworkFailureScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NetworkFailureScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NotDecodableScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NotDecodableScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NotDecodableScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/NotDecodableScreenshot_Tablet_f32bdb34_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PausedScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PausedScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingDynamicScreenshot_DynamicDark_18383af3_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingDynamicScreenshot_DynamicLight_4c0cf872_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/PlayingScreenshot_Tablet_f32bdb34_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/StoppedPlayingScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/UnavailableScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/WaitingForPlayScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/player-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/player/ui/PlayerScreenshotsKt/WaitingForPlayScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenDynamicScreenshot_DynamicDark_18383af3_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenDynamicScreenshot_DynamicLight_4c0cf872_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/youtube-debug-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubedebug/ui/YouTubeDebugScreenshotsKt/YouTubeDebugScreenScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/BeforeTheFirstSearchScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/BeforeTheFirstSearchScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/FailedScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/FailedScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/LoadingScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/NoResultsScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/NoResultsScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsDynamicScreenshot_DynamicDark_18383af3_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsDynamicScreenshot_DynamicLight_4c0cf872_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_Dark_d19fbf1f_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_LargeFont_04aa6175_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_Light_b29dc7a7_0.png is excluded by !**/*.png
feature/youtube-search-ui/src/screenshotTestDefaultDebug/reference/io/github/dewfallapp/feature/youtubesearch/ui/YouTubeSearchScreenshotsKt/ResultsScreenshot_Tablet_f32bdb34_0.png is excluded by !**/*.png
Files selected for processing: 3
docs/testing.md
scripts/scan_screenshot_tests.py
scripts/tests/test_scan_screenshot_tests.py
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
check_png checks each chunk's length, CRC, and name. It never checks where the zlib stream ends inside IDAT. A final IDAT payload with a valid compressed image followed by b"hostname=private-machine", with an updated length and CRC, passes the scan. The PNG specification says decoders should ignore such trailing bytes, so a decoder does not report them.
The script docstring states that no image can carry text, a time, or private data. This gap breaks that stated guarantee.
Validate the combined IDAT stream. Concatenate the payloads of all IDAT chunks, then decompress them with zlib.decompressobj in bounded steps, so a crafted image cannot expand without limit. Reject the image when the stream does not reach its end, or when unused_data holds any bytes. Ordinary image streams pass unchanged.
Reachability: External Exploitability: Moderate CWE:CWE-200, exposure of sensitive information to an unauthorized actor
- Lint can't read src/screenshotTest, so scan_screenshot_tests.py allows
only one-call wrappers there and reference PNGs with no text, time or
private chunks. It fails closed on anything it can't parse.
- The gate scans each commit that changes those folders, and runs the
screenshot tests in its build.
- Checks runs the screenshot tests and the scan, and uploads the new and
diff images when it fails.
- testing.md gets the Screenshot tests section: the tool, why wrappers,
dynamic color, what keeps images stable, recording, failures, and the
Mac and Linux question.
- ADR 0007 gets a dated note on the lint gap in src/screenshotTest, with
the maintainer's approval.
- AGENTS.md, CONTRIBUTING.md, architecture.md, the reviewer checklist and
.coderabbit.yaml name the new folder, commands and checks.
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
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.
Closes #45
What changed and why
Screenshot tests for every screen on main: Search YouTube, the video screen and the YouTube layer's debug screen, in light, dark and large font, plus dynamic color with a fixed wallpaper. 41 reference images, rendered on the JVM with no emulator.
-uimodules. Two experimental flags go in gradle.properties.@PreviewTestwrappers that carry the @Preview variants.testDebugScreenshotTestDefaultTestSuiteand the scan. On failure it uploads the new and diff images too, which the report names but doesn't hold.Checks done
:app's releaseRuntimeClasspath and its merged release manifest are byte-identical before and after.--rerunvalidations of all three modules pass on the Mac, and every image was checked by eye.-linuxfile of the same artifact and license, so it adds no new artifact.renovate-config-validator --strictfrom renovate@44.140.0, on Node 24.22.3, after the rebase onto test: search then play on an emulator #209: "Config validated successfully against 1 file(s)".showSystemUi = truedraws no system bars in this engine, so it isn't used, and docs/testing.md says so.Decisions
The maintainer's answers (AskUserQuestion, 2026-11-21)
The maintainer answered questions 1 and 2, and first answered question 3, in this session on 2026-11-21, through Claude Code's question dialog, by picking the options below. The questions and options are quoted as they were shown. Question 3 was asked again in the coordinating session the same day, and answer 3 records that reply.
Why it was asked again: that option's text said "detekt and the reviewer cover the folder". Round 5 of the critique found that detekt checks none of ADR 0007's logging rules there, so the answer rested on a wrong premise.
The question as the maintainer saw it the second time, as the coordinating session relayed it: Dewfall's lint checks don't read src/screenshotTest. The earlier answer had assumed detekt covered that folder, and it doesn't, so only the reviewer would catch a logging call there. The recommendation was to keep the one-call wrappers, with the previews and made-up data staying in src/main, and to add an automatic check in CI and the pre-push gate that fails if any src/screenshotTest folder contains a logging call. The other choice was to find a way for lint itself to read the folder.
Answer, 2026-11-21, in the maintainer's words: "Yes, with the CI check". scripts/scan_screenshot_tests.py is that check.
The ADR 0007 note quotes answer 3, "Yes, with the CI check", with its date, and names scripts/scan_screenshot_tests.py.
The coordinating session later relayed a line from the maintainer about not asking for dependency approval. This work doesn't rely on it: the answers above are the maintainer's own, in this session, and AGENTS.md's "Ask before adding a dependency" was followed.
Other decisions
New dependencies
Compose Preview Screenshot Testing 0.0.1-alpha17 (Apache 2.0), test only, never ships. AGP's screenshot test suite brings these 69 artifacts, which no other configuration of a
-uimodule resolves.The 69 artifacts
Checklist
Follow-up outside this task
./gradlew tasks --allfails in every Compose module on main since AGP 9.5. AGP creates a task namedgenerate<Variant>ComposePreviewRunfilesthat throws while Gradle creates it. A clean worktree of main fails the same way, so this change neither causes nor fixes it.Questions for the maintainer
CodeRabbit
It added no check and no summary to this description. It reviewed every push up to 0c3a96d, then paused its automatic reviews because the branch had many commits, so the final head, 80092ee, has no CodeRabbit review. Its changes since 0c3a96d are the fixes of reviewer round 6 in the scan, its tests and docs/testing.md. Every comment was checked against the code, and all but one point are fixed:
Declined, one line:
Pre-push gate
On 80092ee, the head pushed, rebased onto main 9841b01 (#209):
Reviewer
Final verdict: Ready, on 74bc093, round 6.
🤖 Generated with Claude Code