feat: redirect browser fallback to farcaster.xyz/~/snap-preview#77
feat: redirect browser fallback to farcaster.xyz/~/snap-preview#77bob-obringer wants to merge 1 commit intomainfrom
Conversation
Replace inline HTML rendering with a redirect to farcaster.xyz where the snap renders with real React components via SnapView. The redirect page still serves OG meta tags for social media crawlers (they don't follow meta refresh redirects). Browsers get redirected immediately via <meta http-equiv="refresh"> + JS fallback. Exports extractPageMeta, buildOgMeta, and esc from renderSnapPage.ts for reuse. renderSnapPage.ts kept as fallback for options.fallbackHtml. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This is a meaningful UX improvement — the inline HTML fallback was a static dead end for users who opened a snap URL in a browser, while the redirect to On the OG meta tags serving for crawlers: Smart approach — keeping the OG tags in the initial HTML response while using a On Dependency note: The PR says it depends on On the redirect URL construction: Should Looks good overall. Once the monorepo dependency is resolved, this should be ready to merge. |
Summary
farcaster.xyz/~/snap-preview?url={snapUrl}where the snap renders with real React components via SnapViewrenderSnapPage.tskept as fallback foroptions.fallbackHtmloverrideDepends on: merkle-team/monorepo snap-preview-page branch
Test plan
curl -sS snap-url→ HTML with OG meta + redirect URLcurl -sS -H 'Accept: application/vnd.farcaster.snap+json' snap-url→ snap JSON (unchanged)🤖 Generated with Claude Code