Serve a fallback for cold profile OG images
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- nextjs, typescript
- 領域
- backend
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 7
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
LangerSword/gitone のほかの issue
-
bug help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
LangerSword/gitone#7 ·
-
accessibility bug help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
LangerSword/gitone#6 ·
-
bug help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
LangerSword/gitone#5 ·
-
bug help wanted security
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
LangerSword/gitone#3 ·
-
Add a /health endpoint対応中かも @LangerSword が今日担当しました。 オープンgood first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 45/100
LangerSword/gitone#2 · コメント 1 件 ·
LangerSword/gitone の issue をすべて見る
似ている issue
-
MCP tool results drop structuredContent when text is only a summary対応中かも @Pankaj-bit361 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
inblockio/siwx-oidc-matrix-server#101 ·
メンテナーはふだん 1 日以内に返信
-
status:needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pingdotgg/t3code#42253 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信