Skip to content

fix: unblock prod build — Satori display:flex in OG images#30

Merged
sonpiaz merged 1 commit into
mainfrom
fix/og-image-satori
May 26, 2026
Merged

fix: unblock prod build — Satori display:flex in OG images#30
sonpiaz merged 1 commit into
mainfrom
fix/og-image-satori

Conversation

@sonpiaz
Copy link
Copy Markdown
Member

@sonpiaz sonpiaz commented May 26, 2026

Second of the two pre-existing blockers keeping openaffiliate.dev stuck on a 36-day-old prod build (the first, cacheComponents, was fixed in #29).

Next/og (Satori) aborts the build when a block <div> has >1 child without display:flex:

  • opengraph-image.tsx — title div (text + colored <span> + text) → display:flex + flexWrap, split into spans.
  • rankings/opengraph-image.tsx — subtitle div (text + {programs.length} + text) → flattened to one template-literal child.

programs/[slug]/opengraph-image.tsx uses <span> (inline, fine) so it was unaffected.

Verified: full local prod build green — ✓ Generating static pages (874/874), all OG images render.

⚠️ This repo is synced from the open-affiliate-pro SSOT — mirror both fixes there or the next sync re-breaks the build.

🤖 Generated with Claude Code

Next/og (Satori) errors when a block <div> has more than one child without
explicit display:flex. Two OG routes violated this and aborted the Vercel
production static-generation step (the second of the two blockers keeping
openaffiliate.dev on a 36-day-old build):

- opengraph-image.tsx: title <div> had text + colored <span> + text. Made it
  display:flex + flexWrap and split into spans.
- rankings/opengraph-image.tsx: subtitle <div> had text + {expr} + text.
  Flattened to a single template-literal child.

Verified with a full local production build (874/874 static pages generated,
all OG images included). NOTE: also present in the open-affiliate-pro SSOT —
mirror there or the next sync re-breaks the build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 26, 2026

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

Project Deployment Actions Updated (UTC)
open-affiliate Canceled Canceled May 26, 2026 4:41am

Request Review

@sonpiaz sonpiaz merged commit 4ef1a74 into main May 26, 2026
2 of 4 checks passed
@sonpiaz sonpiaz deleted the fix/og-image-satori branch May 26, 2026 04:41
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