Skip to content

blog: turn the index into a Payload guide gateway - #348

Merged
Ducksss merged 1 commit into
devfrom
blog/guide-gateway-dev
Jul 27, 2026
Merged

Ducksss merged 1 commit into
devfrom
blog/guide-gateway-dev

Conversation

@Ducksss

@Ducksss Ducksss commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Re-lands the useful parts of #341, with its undisclosed self-promotion stripped.

Kept

  • Blog index gateway sections routing readers to the Payload guides (src/app/blog/page.tsx)
  • Site copy updates + blog e2e coverage + refreshed blog-index visual baselines

Dropped

This 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 66DC9D instead of the Tailwind-specific bg-[#66DC9D], because #346 attempted the same swatch as an SVG fill="#66DC9D", which the narrower assertion would not have caught.

Verified locally: tsc clean, fumadocs-site.int.spec.ts 30/30.

🤖 Generated with Claude Code

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]>
Copilot AI review requested due to automatic review settings July 27, 2026 05:33
@vercel

vercel Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
payload-components Ready Ready Preview, Comment Jul 27, 2026 5:39am
payload-components-97bf Ready Ready Preview, Comment Jul 27, 2026 5:39am

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b33d7128-d283-40b0-b6ab-fab23d1e01b2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch blog/guide-gateway-dev

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.

❤️ Share

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

@Ducksss
Ducksss merged commit 35e92c6 into dev Jul 27, 2026
12 checks passed
@Ducksss
Ducksss deleted the blog/guide-gateway-dev branch July 27, 2026 05:49
Ducksss added a commit that referenced this pull request Jul 27, 2026
* 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]>

This branch was successfully deployed

2 active deployments
Preview – payload-components — af3cf95c Deployed Jul 27, 2026 by vercel[bot]
Preview – payload-components-97bf — af3cf95c Deployed Jul 27, 2026 by vercel[bot]
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.

2 participants