fix(site): add missing OG image for /compute page#7940
Conversation
The compute page metadata references /og/og-compute.png, but the file was never committed, so the OG image 404s in production. Serve it from a route handler that renders the image at build time, and extract the OG template shared with the blog OG route into src/lib/og-image.tsx. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThis PR consolidates OG image generation into a reusable library. A new ChangesOG Image Library and Route Integration
🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Replace the generated OG route with the designed meta image from the launching-prisma-compute-public-beta blog post, served as a static file from public/og/ like the other product pages. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/site/src/app/og/image.png/route.tsx`:
- Line 3: The route currently exports revalidate = false but isn’t opting into
static generation; update the OG image route by adding export const dynamic =
"force-static" (next to the existing export const revalidate) in
apps/site/src/app/og/image.png/route.tsx so the GET handler is forced to be
statically generated/cached—place the new export at the module top so Next.js
picks it up for this route.
In `@apps/site/src/lib/og-image.tsx`:
- Around line 146-155: In loadGoogleFont, add bounded timeouts and ok-checks for
both outbound fetches: use AbortSignal.timeout(...) when calling fetch for the
CSS URL and when fetching the resource URL, verify response.ok (or
response.status in the 200 range) before calling response.text() or
response.arrayBuffer(), and bail out (return null or throw a clear error)
immediately on non-2xx or aborted responses; update the calls in loadGoogleFont
in both route.tsx files so the CSS fetch uses the AbortSignal.timeout and checks
ok before extracting text, and the resource fetch does the same before calling
arrayBuffer().
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e8ce98dc-e4f8-4f18-8f4e-f747815372b6
📒 Files selected for processing (3)
apps/site/src/app/og/image.png/route.tsxapps/site/src/app/og/og-compute.png/route.tsxapps/site/src/lib/og-image.tsx
Problem
The
/computepage metadata references/og/og-compute.png, but that file was never committed topublic/og/, so the OG image 404s in production (verified: https://www.prisma.io/og/og-compute.png returns 404)./postgresand/ormwere checked as well — their static OG images exist and work correctly.Fix
Reuse the designed meta image from the Launching Prisma Compute in Public Beta blog post (
apps/blog/public/launching-prisma-compute-public-beta/imgs/meta.png) asapps/site/public/og/og-compute.png, served as a static file like the other product pages. It's 1200×630, matching the dimensions declared in the page metadata.No code changes — the page already points at this URL.
🤖 Generated with Claude Code