Serve a fallback for cold profile OG images
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- nextjs, typescript
- Domain
- backend
Research direction
Start at app/[username]/opengraph-image.tsx:43 to see how cachedPng is called without an onMiss, then read lib/og/pngCache.ts:93-99 for the cold-miss 404 path and the x-og-cache header values. Check app/[username]/vs/[opponent]/opengraph-image.tsx for the same pattern and look at how scripts/warm-og.mjs writes real renders so the fallback stays replaceable. Add a fallback asset such as public/og-root.png plus a route test covering cold miss, fallback and warmed hit; done means a never-warmed valid profile returns 200 PNG bytes with x-og-cache: fallback.
Written by the indexing model from the issue text.
Description
Current behavior
A profile with no warmed OG PNG returns 404 from /<login>/opengraph-image. X, Slack, Telegram and other unfurlers then show a blank or text-only card on the first share.
Live probes:
torvalds/opengraph-image 200 x-og-cache: r2-hit
defunkt/opengraph-image 404 x-og-cache: miss-empty
octocat/opengraph-image 404 x-og-cache: miss-empty
Cause
app/[username]/opengraph-image.tsx:43 calls cachedPng without an onMiss callback. lib/og/pngCache.ts:93-99 treats a cold miss as 404 with no-store. scripts/warm-og.mjs fills only handles that are already in the local warm set, and app/api/og/[username]/route.tsx is restricted to a local force flag.
Expected behavior
A valid profile should never return a blank OG response. Serve a branded fallback PNG on a cold miss, for example the existing public/og-root.png or a card-shaped fallback, with x-og-cache: fallback and normal public cache headers. Schedule or request a real render separately; do not do a Satori render on the request path.
Scope
app/[username]/opengraph-image.tsxapp/[username]/vs/[opponent]/opengraph-image.tsxif it shares the pathlib/og/pngCache.tsfor an explicit fallback path- a fallback asset and a route test
Acceptance
- A valid profile that has never been warmed returns
200with PNG bytes, not404. - The response identifies the fallback with
x-og-cache. - A later warm still replaces the fallback through the normal cache path.
- A test covers cold miss, fallback and warmed hit.
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from LangerSword/gitone
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
LangerSword/gitone#7 ·
-
accessibility bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
LangerSword/gitone#6 ·
-
bug help wanted
Difficulty 3/5 1-2 days Newbie friendliness 72/100
LangerSword/gitone#5 ·
-
bug help wanted security
Difficulty 4/5 3-5 days Newbie friendliness 35/100
LangerSword/gitone#3 ·
-
Add a /health endpointPossibly taken @LangerSword claimed this today. Opengood first issue
Difficulty 1/5 1-3 hours Newbie friendliness 45/100
LangerSword/gitone#2 · 1 comment ·
All issues in LangerSword/gitone
Similar issues
-
MCP tool results drop structuredContent when text is only a summaryPossibly taken @Pankaj-bit361 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
inblockio/siwx-oidc-matrix-server#101 ·
Maintainers usually reply within 1 day
-
status:needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pingdotgg/t3code#42253 · 1 comment ·
Maintainers usually reply within 1 day