Skip to content

chore: ignore the ui-snapshot sweep's OUT/ directory - #1594

Open
timohueser wants to merge 1 commit into
developfrom
chore/ignore-ui-snapshot-sweep-out-dir
Open

chore: ignore the ui-snapshot sweep's OUT/ directory#1594
timohueser wants to merge 1 commit into
developfrom
chore/ignore-ui-snapshot-sweep-out-dir

Conversation

@timohueser

@timohueser timohueser commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Seen on #1592 (finding 5): after a local ci.ui-snapshots run, git add -A stages ~312 PNGs.

Why it happens

The suite command in testing/suites.toml is:

firmware/ui-snapshots.sh OUT && python3 firmware/tools/ui_snapshot_manifest.py check firmware/ui-snapshots.sha256 OUT

ui-snapshots.sh takes its output directory as $1 and does mkdir -p "$OUT" relative to the
working directory. tools/suite_registry.py runs every suite command with the repo root as its
working directory, so the sweep writes into a repo-root OUT/.

.gitignore ignored ui-snapshots/ — the script's default — but not OUT, the name the suite
passes. So the one path a developer actually produces was the one path that was not ignored.

CI is unaffected: .github/workflows/ci.yml writes to $RUNNER_TEMP/ui-snapshots, outside the
repository.

The change

One entry, /OUT/, beside the existing ui-snapshots/ line, with the reason recorded there.
Root-anchored, following /routes/, /tracks/ and /wx-events/, so a legitimate OUT directory
elsewhere in the tree is unaffected.

Verification

The sweep itself was not run: the verification budget caps it at once per pull request and only
for changes that touch rendering, screens or i18n. This change touches none of them. Instead the
exact path the suite writes was materialized directly.

Before (HEAD's .gitignore, OUT/ populated):

$ git status --short
?? OUT/

After:

$ git status --short
 M .gitignore

$ git check-ignore -v OUT/home.png
.gitignore:62:/OUT/     OUT/home.png

$ git add -A --dry-run
add '.gitignore'

python3 tools/suite_registry.py select --base origin/develop reports 0 changed path(s) and
selects no suite, so no test run is warranted. obc suites check was not run: no test source,
validation command, workflow, registry or test policy changed.

No public documentation changed.

Worth a follow-up

OUT is the odd one out. The script documents its default as ui-snapshots/, CI uses
$RUNNER_TEMP/ui-snapshots, and only the suite registry says OUT — an all-caps directory at the
repository root that nothing else asks for. Pointing the suite at ui-snapshots instead would be
the same size of change and would need no ignore rule at all. This PR does the defensive fix that
was asked for and keeps working for anyone who copies the suite command as written; collapsing the
third name is the owner's call.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated project configuration to exclude generated UI snapshot output from version control.

`ci.ui-snapshots` runs `firmware/ui-snapshots.sh OUT`, and suite commands run
with the repo root as their working directory, so the sweep writes ~312 PNGs
into a repo-root `OUT/`. Only the script's own default, `ui-snapshots/`, was
ignored, so `git add -A` after a local suite run staged every frame.

CI is unaffected: it writes to `$RUNNER_TEMP/ui-snapshots`, outside the repo.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 907525fc-042d-42e5-a9ad-01aca07d3a18

📥 Commits

Reviewing files that changed from the base of the PR and between 1d35ea1 and 43f82b3.

📒 Files selected for processing (1)
  • .gitignore

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The .gitignore file documents the UI snapshot script’s configurable output directory and ignores the root-level /OUT/ directory.

Changes

UI snapshot output

Layer / File(s) Summary
Ignore UI snapshot output
.gitignore
The file documents the configurable output directory and adds a root-anchored /OUT/ ignore rule.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 43f82

This change prevents the UI snapshot sweep's generated root-level OUT/ files from being staged accidentally without affecting legitimate OUT directories elsewhere; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: ignoring the UI snapshot sweep's root-level OUT/ directory.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/ignore-ui-snapshot-sweep-out-dir

Comment @coderabbitai help to get the list of available commands.

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.

1 participant