Repository navigation
repo(chore): scope ImgBot away from hand-authored art and visual baselines - #424
Conversation
…lines ImgBot PR #390 was closed as unmergeable: its branch carried 34 replayed pre-squash dev commits that resurrected an old tree, so merging would have deleted 158 files from main (109 from dev), including package.json, pnpm-lock.yaml, registry.json and the CLI. ImgBot's own commit was clean. Scope the bot so a future run has less to churn over: - public/blog/** the figure-01 diagrams are hand-authored SVG with embedded CSS. Minifying collapses each to one line for ~0.17 KB gzipped per figure, and each blog post loads exactly one figure — not worth losing diff-ability on maintained source art. - public/favicon.svg already minimal; the only available "saving" is stripping its trailing newline. - tests/e2e/** Playwright visual-regression baselines are golden captures. A bot must never re-encode them. aggressiveCompression stays off (lossless only) and minKBReduced is raised from the default 10 to 50 so trivial PRs are not opened. Raster assets outside those paths (public/docs/admin screenshots) are still optimized normally. Co-Authored-By: Claude Opus 5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdded ChangesImgBot configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds an ImgBot configuration file to reduce bot churn by excluding hand-authored SVG diagrams and Playwright visual-regression baselines from automated “optimization” PRs, keeping the docs site + registry repo stable while still allowing optimization of other raster assets.
Changes:
- Add
.imgbotconfigto ignorepublic/blog/**,public/favicon.svg, andtests/e2e/**from ImgBot runs. - Keep
aggressiveCompressiondisabled and raiseminKBReducedto 50KB to avoid trivial PRs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "ignoredFiles": ["public/blog/**", "public/favicon.svg", "tests/e2e/**"], | ||
| "aggressiveCompression": "false", |
Why
#390 was opened as a 27-file SVG optimization but its diff was 266 files, +67 / −45,165. ImgBot's own commit (
d2bca444) was clean and correct — the damage came from 34 replayed pre-squashdevcommits beneath it that resurrected a pre-July tree.Because
merge-base(main, imgbot)was main's own tip, the deletions were real, not the usual cosmetic squash-promote flag:maindevddd8eb08(2026-07-24)Either way it took out
payload-components/registry.json, thesource/blocks/tree,add.ts/doctor.ts/project.ts, and (into main)package.jsonandpnpm-lock.yaml. #390 is now closed.What this does
Scopes the bot so a future run has less to churn over:
public/blog/**— thefigure-01diagrams are hand-authored SVG with embedded CSS. Minification is technically clean (verified: visible text,<title>/<desc>,viewBox,role, and all ids/refs preserved) but the win is 4.7 KB gzipped across 27 files — ~0.17 KB per figure, and each blog post loads exactly one. Not worth collapsing 26 maintained diagrams to single lines.public/favicon.svg— already minimal at 343 B; the entire advertised "0.29% reduction" was stripping its trailing newline.tests/e2e/**— Playwright visual-regression baselines are golden captures. A bot should never re-encode them.aggressiveCompressionstays off (lossless only), andminKBReducedgoes from the default 10 to 50 so trivial PRs aren't opened. Raster assets elsewhere — e.g. thepublic/docs/adminscreenshots — are still optimized normally.Caveat
ImgBot reads
.imgbotconfigfrom the repository's default branch, so this only takes effect oncedevis promoted tomain. Until then a new ImgBot PR is still possible.Test plan
.imgbotconfigis valid JSONprettier --checkpasses (prettier --check .does match this file, so it needed formatting to clear the gatedformat:check)Summary by CodeRabbit