Skip to content

feat(share): per-transition share pages with generated composite OG cards#9

Open
rohram04 wants to merge 1 commit into
feat/frontend-design-refreshfrom
feat/shareable-transitions
Open

feat(share): per-transition share pages with generated composite OG cards#9
rohram04 wants to merge 1 commit into
feat/frontend-design-refreshfrom
feat/shareable-transitions

Conversation

@rohram04

Copy link
Copy Markdown
Owner

Stacked on top of feat/frontend-design-refresh. Adds a real shareable surface so each transition unfurls as its own rich link preview instead of the generic site card.

What's included

  • /transition/[id] route — server component resolves the transition by id (getTransition) and renders a single-item, playable TransitionPlayer view with a back-to-feed control. Anonymous/guest accessible.
  • generateMetadata — per-transition title/description + Open Graph / Twitter tags ("Track A → Track B …"); 404s on a missing id.
  • Generated composite card (opengraph-image.js) — 1200×630 ImageResponse: both album covers split by the signature amber cut marker, the wordmark, and each track's title (Syne) + artist (Space Mono), with a "shared by" credit. Fonts fetched from Google as TrueType (Satori can't parse woff2); falls back to a branded card if data/fonts are unavailable. twitter-image.js re-exports the same generator.
  • Share control in the player dock — native share sheet where available, else copy-to-clipboard (async API with execCommand fallback) and a brief "Link copied" amber check.

Crawler-safe: metadata + image are resolved server-side on the Node runtime, so previews work without running the client player.

Verification

  • npm run build + npm run lint clean; all three routes registered.
  • curl /transition/1 returns correct per-transition OG/Twitter meta.
  • Rendered the actual 1200×630 PNG and confirmed layout; confirmed the playable page and the share button's "Link copied" state.

Note: base is feat/frontend-design-refresh. Merge that PR first (or retarget this to main after it lands).

🤖 Generated with Claude Code

…ards

Adds a real shareable surface so each transition unfurls as its own rich
link preview instead of the generic site card.

- New /transition/[id] route: server component resolves the transition by id
  (getTransition) and renders a single-item, playable TransitionPlayer view
  with a back-to-feed control. Anonymous/guest accessible.
- generateMetadata produces per-transition title/description + OG/Twitter
  tags ("Track A → Track B …"); 404s on a missing id.
- opengraph-image.js generates a 1200x630 composite via ImageResponse: both
  album covers split by the signature amber "cut" marker, the wordmark, and
  each track's title (Syne) + artist (Space Mono), with a "shared by" credit.
  Fonts are fetched from Google as truetype (Satori can't parse woff2);
  falls back to a branded card if data or fonts are unavailable.
  twitter-image.js re-exports the same generator.
- Share control in the player dock: native share sheet where available, else
  copy-to-clipboard (async API with execCommand fallback) and a brief
  "Link copied" amber check.

Crawler-safe: metadata + image are resolved server-side on the Node runtime,
so previews work without running the client player.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
transitions Ready Ready Preview, Comment Jun 22, 2026 7:30pm

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