Repository navigation
Description
Found while merging main into feature/199-details-adult-filter (PR #210) on 2026-11-18: the merge stopped on conflicts in all 10 screenshots/*.png.
Problem
ci-build-and-preview.yml runs on pull_request to main, and its screenshot step commits the captures back to the PR branch:
git add screenshots/
if git diff --cached --quiet; then
echo "Screenshots unchanged — nothing to commit"
else
git commit -m "CI: Update UI screenshots [skip ci]"
git push
fiSo every PR branch picks up a bot commit that rewrites the same 10 PNGs, and once that PR squash-merges, main has them too. Any other open branch that has its own bot commit and then merges main conflicts on every PNG whose pixels moved. Two things make it worse:
- PNGs are binary, so git can't merge them and every one needs resolving by hand.
- If you merged
mainlocally before pulling, the push is rejected too, because the bot commit is on the remote branch and not local.
The resolution itself doesn't matter. CI regenerates all 10 on the next push, so either side is fine. The conflict is pure friction.
The PR comment step (<!-- ci-ui-screenshots --> marker) builds its image links from the screenshot commit's SHA (SCREENSHOT_SHA), so the committed PNGs are also how the PR comment shows its images. Any option that stops committing them has to replace that.
Options
Settled at kickoff (2026-11-18): B, hosted on per-PR orphan branches ci-screenshots/pr-<N> force-pushed as one commit per run, promoted on merge to ci-screenshots/main (latest/ for the README plus the newest 10 sets under history/). PNGs are quantized before publishing.
A. merge=ours driver for the screenshots. Add screenshots/*.png merge=ours to .gitattributes, and run git config merge.ours.driver true once per clone (worktrees share it). Local merges keep the branch's PNGs silently.
- Small change; CI untouched.
- The driver config isn't versioned, so it needs an AGENTS.md note, and a clone without it falls back to conflicting.
- GitHub's web "Update branch" and conflict editor ignore custom drivers.
- Doesn't help the rejected-push case; you still pull first.
B. Stop committing screenshots to the branch. Publish them another way and drop screenshots/ from the PR's history: an artifact (already uploaded at several steps), an orphan or dedicated branch the comment links into, or images attached to the PR comment.
- Removes the conflicts everywhere, the web UI included, plus the rejected pushes and the bot commits in PR history.
- Bigger change: the PR comment's image hosting has to be rebuilt, since artifact files aren't directly embeddable as images.
- Whether
mainshould still carry current screenshots (e.g. for the README) needs deciding.
C. Leave it, and document the resolution. Resolve with git checkout --ours -- screenshots/, then git add screenshots/ and commit, since CI regenerates on the next push.
- Zero cost.
- Keeps the friction, and agents mid-merge stop and ask about it each time.
Constraint
- The PR comment must keep showing current screenshots for the PR's head. That is how UI changes get reviewed.
- The adult-canary and screenshot steps in the same job (Adult canary renders in every Staff voice role, and the CI canary gate never checks a details page #199) must keep running unchanged.
Related
- Hide 18+ titles in details-page sections, and gate the canary there (#199) #210: the PR where this surfaced.
Activity
zhollis21 commentedon Nov 18, 2026
Verified against
origin/main@d4529c5:.github/workflows/ci-build-and-preview.yml:1354(Commit Screenshots), and the PR comment buildsraw.githubusercontent.com/<sha>/screenshots/...URLs at:1426.mainhas a second consumer of the committed PNGs:README.md:21embeds six of them by relative path.origin/mainhistory holds 442 distinctscreenshots/*.pngblobs, 653 MiB on disk (git rev-list --objects origin/main | grep " screenshots/"summed withcat-file --batch-check=%(objectsize:disk)).delete_branch_on_merge: true,mainhas no branch protection.zhollis21 commentedon Nov 19, 2026
Updated during planning: the Options section said "Not settled"; it now records the choice (B, per-PR orphan branches plus a
ci-screenshots/mainbranch withlatest/and a 10-sethistory/). Per-PR branches beat one shared branch because parallel PR runs would race on a shared one, and compacting it would break other PRs' SHA-based image links. A deletion-only ruleset now protectsci-screenshots/main.Publish CI screenshots to ci-screenshots/* branches instead of PR bra…
Close the publish/close race and fix fork and seed edge cases (#212)
Publish CI screenshots to ci-screenshots/* branches instead of PR bra…
Publish CI screenshots to ci-screenshots/* branches instead of PR bra…
Point skill-file commit citations at the rewritten history (#212) (#216)