Skip to content

feat(web): add Open Graph and Twitter link previews#69

Merged
RISHII7 merged 2 commits into
mainfrom
develop
Jul 9, 2026
Merged

feat(web): add Open Graph and Twitter link previews#69
RISHII7 merged 2 commits into
mainfrom
develop

Conversation

@RISHII7

@RISHII7 RISHII7 commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

Promotes the Open Graph / Twitter link-preview feature from develop to main.

Shared links to the web app previewed as "404: This page could not be found" because the root redirects into the auth-gated dashboard. This adds:

  • metadataBase + openGraph + twitter metadata on the root layout.
  • A branded 1200×630 preview card generated via next/og (opengraph-image.tsx, re-exported as twitter-image.tsx).
  • /opengraph-image + /twitter-image made public in proxy.ts so crawlers can fetch the image.

See CHANGELOG.md for details.

Summary by CodeRabbit

  • New Features

    • Added branded social share previews for public links, including Open Graph and Twitter image support.
    • Updated preview metadata so shared links display consistent title, description, and image assets.
  • Bug Fixes

    • Made preview image routes publicly accessible so link crawlers can generate rich previews without sign-in issues.

RISHII7 added 2 commits July 9, 2026 12:59
Shared links to the web app previewed as "404: This page could not be
found" because the root redirects into the auth-gated dashboard, so
crawlers never saw real metadata.

- Add metadataBase, openGraph, and twitter metadata to the root layout
- Generate a branded 1200x630 preview card via next/og
  (opengraph-image.tsx, re-exported as twitter-image.tsx) — no static
  asset to maintain
- Make /opengraph-image and /twitter-image public in proxy.ts so
  crawlers can fetch the image without authentication

Public pages (e.g. /sign-in) now render a proper social card.
feat(web): add Open Graph and Twitter link previews
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
echo Ready Ready Preview, Comment Jul 9, 2026 8:00am
echo-widget Ready Ready Preview, Comment Jul 9, 2026 8:00am

@RISHII7
RISHII7 merged commit 2ec3f5d into main Jul 9, 2026
15 of 16 checks passed
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6001401f-4a93-4ce3-bdb0-289c00a4cb1d

📥 Commits

Reviewing files that changed from the base of the PR and between a977d3d and 4abb00f.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • apps/web/app/layout.tsx
  • apps/web/app/opengraph-image.tsx
  • apps/web/app/twitter-image.tsx
  • apps/web/proxy.ts

📝 Walkthrough

Walkthrough

Adds social link preview support: root layout metadata now derives from shared siteUrl/siteTitle/siteDescription constants, new next/og-based routes generate branded 1200×630 Open Graph and Twitter preview images, and the proxy middleware marks these image routes as public/org-free. Changelog updated accordingly.

Changes

Social Link Previews

Layer / File(s) Summary
Root layout metadata constants
apps/web/app/layout.tsx
Adds siteUrl, siteTitle, siteDescription constants and updates metadataBase, title, description, openGraph, and twitter fields to reference them instead of hard-coded literals.
Open Graph/Twitter image generation
apps/web/app/opengraph-image.tsx, apps/web/app/twitter-image.tsx
Adds a new next/og route exporting alt, size, contentType, and a default OpengraphImage handler that renders a branded 1200×630 ImageResponse; twitter-image.tsx re-exports these same values.
Public route exemptions and changelog
apps/web/proxy.ts, CHANGELOG.md
Expands isPublicRoute and isOrgFreeRoute matchers to include opengraph-image(.*) and twitter-image(.*), and documents the feature under Unreleased → Added.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

  • RISHII7/echo#2: Both PRs extend Clerk auth "public route" bypass logic in apps/web/proxy.ts/middleware.ts.
  • RISHII7/echo#31: Both PRs modify apps/web/proxy.ts's Clerk middleware route matcher logic.
  • RISHII7/echo#34: Both PRs adjust apps/web/proxy.ts middleware route matchers, particularly isOrgFreeRoute.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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