Repository navigation
blog: turn the index into a Payload guide gateway - #348
Conversation
Re-lands #341's blog gateway work without its undisclosed self-promotion. Kept: the blog index gateway sections, site copy, blog e2e coverage, and the refreshed blog-index visual baselines. Dropped: the 'Growth by Tin' backlink to https://tin.computer (+ #66DC9D swatch) added to SiteFooter, and the inversion of the 'community-owned' guard test that exists to keep that backlink out. Footer restored to dev state. Also hardens the guard to match a bare '66DC9D' rather than the Tailwind-specific 'bg-[#66DC9D]', so an equivalent SVG fill= swatch can't slip past it. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
* test: re-mint the darwin blog-index visual baselines 35e92c6 ("blog: turn the index into a Payload guide gateway", #348) redesigned /blog but its snapshot update only refreshed the linux baselines, so the darwin pair kept the pre-redesign rendering. CI is linux, so pr-gate stayed green while local macOS `pnpm test:release` failed both blog-index cases (~35% pixel diff on desktop). Re-minted with `--update-snapshots=changed` against the production server, so only the two mismatching darwin files were rewritten — the blog-article baselines and every `*-linux.png` are untouched. Verified the new PNGs depict the current guide-gateway index (eyebrow, dark installation card, two guide cards) and that the suite passes clean. Co-Authored-By: Claude Opus 5 <[email protected]> * test: share the platform-baseline guards across the visual specs components-visual, templates-visual, and blog-visual each carried their own copy of the same dance: derive the `-<project>-<platform>.png` suffix, treat `all`/`changed` as updating, skip a case whose current-platform baseline is absent, and fail the coverage guard once the platform is minted. Three copies, three slightly different messages, and the shared rationale duplicated in three header comments. Extract `expectCompletePlatformBaselines` and `skipWithoutPlatformBaseline` into tests/e2e/support/visual-baselines.ts and give each spec a `VisualBaselines` descriptor instead. Behaviour is unchanged: blog keeps its `requireMinted` escalation (linux CI must fail rather than skip an empty baseline set), and the other two keep skipping. Each spec now derives its screenshot name and its guarded stem from one `baselineStem` helper, so the name the guard checks can't drift from the name Playwright writes. The helper's doc comment also records what neither guard can catch — a baseline that exists but is stale, which is how the blog index kept a pre-redesign darwin image through a green pr-gate. Two knock-on updates: - tests/int/blog-visual-system.int.spec.ts pinned the old inline `requiresMintedBaselines` line. Re-pinned to both halves of the moved behaviour (the spec declaring `requireMinted`, the helper acting on it) rather than dropped. - The Field Journal figure for visual-regression-component-registry embeds a live 14-line excerpt of components-visual, so it was regenerated with `pnpm blog:visuals:figures`. Only the hidden data-evidence attribute moved; the visible figure and the article prose are unchanged, and the other 26 figures regenerated byte-identically. Verified: lint, tsc, test:int (341 passed), and all three visual specs (69 + 62 + 5 passed, same counts as before). Also forced the missing- baseline path by holding one PNG back — the coverage guard failed naming the stem and the affected case skipped, so the guards still guard. Co-Authored-By: Claude Opus 5 <[email protected]> * docs: require paired darwin/linux baseline mints Nothing in CI can catch a half-minted visual change: the specs' coverage guard fails on a missing baseline but never a stale one, and pr-gate only renders linux. A linux-only mint therefore leaves the darwin image showing the old design — green on every PR, failing only for whoever next runs the gate on a Mac (exactly what 35e92c6 did to the blog index). Add a "Visual baselines" section to CONTRIBUTING.md stating the rule, how to mint each platform, and the reviewer heuristic: a diff touching `*-chromium-linux.png` without the matching `*-chromium-darwin.png` (or vice versa) is suspect. Add the paired update to the pull-request checklist. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
Re-lands the useful parts of #341, with its undisclosed self-promotion stripped.
Kept
src/app/blog/page.tsx)Dropped
#66DC9Dswatch) injected intoSiteFooter.tsx— undisclosed by the PR title "Turn the blog into a Payload guide gateway" and unrelated to itcommunity-ownedguard test, which exists specifically to assert the footer does not carry that backlinkThis is the second time this backlink has been proposed (see #337 → #338). Footer and guard restored to dev state.
Hardening
The guard now matches a bare
66DC9Dinstead of the Tailwind-specificbg-[#66DC9D], because #346 attempted the same swatch as an SVGfill="#66DC9D", which the narrower assertion would not have caught.Verified locally:
tscclean,fumadocs-site.int.spec.ts30/30.🤖 Generated with Claude Code