Skip to content

fix(website): mobile overflow + OG/Twitter preview images#169

Merged
rohitg00 merged 1 commit intomainfrom
fix/website-mobile-og
Apr 18, 2026
Merged

fix(website): mobile overflow + OG/Twitter preview images#169
rohitg00 merged 1 commit intomainfrom
fix/website-mobile-og

Conversation

@rohitg00
Copy link
Copy Markdown
Owner

@rohitg00 rohitg00 commented Apr 18, 2026

Summary

  • Mobile horizontal scroll (375px): body was rendering at ~430px because grid tracks on .cards, .box, .wrap, .split, .chips, .panel were defaulting to min-content and getting pinned wider than the viewport by nowrap copy (install commands, "RUNS ON :3111 · VIEWER ON :3113", "CURL + HASH + PIN VERSION", etc.). Fix: swap 1fr / implicit tracks for minmax(0, 1fr) and add min-width: 0 on the relevant flex/grid containers so overflow: hidden + text-overflow: ellipsis on .cmd can actually clip.
  • Mobile polish (<=640px): tightened padding, font-size, and letter-spacing for Install boxes, AgentInstall snippet header/code/copy row, CommandCenter tabs + launch strip, and Stats tiles so dense uppercase content stops crowding itself.
  • Social previews: layout.tsx declared openGraph and twitter metadata but shipped no image file, so shares rendered as blank cards. Added app/opengraph-image.tsx and app/twitter-image.tsx using next/og ImageResponse. Statically prerendered at build (no runtime = "edge") so Next emits a cacheable 1200x630 PNG.

Before / after

before after
body scrollWidth @ 375px viewport 430px (horizontal scroll) 375px (no overflow)
/opengraph-image (absent) 1200x630 PNG, ~90 KB, static
/twitter-image (absent) 1200x630 PNG, static

Build output confirms both routes are now ○ (Static) rather than ƒ (Dynamic).

Test plan

  • npm run build in website/ — typechecks, 3 static routes generated
  • Dev at 375x812: document.documentElement.scrollWidth === 375
  • Screenshots of hero, stats, Install, CommandCenter, MCP list, Compare, Footer on mobile — no visual regressions, overflow gone
  • curl http://localhost:3000/opengraph-imageimage/png, 1200x630
  • Meta tags render og:image, og:image:width=1200, twitter:image, twitter:card=summary_large_image
  • After deploy: verify with cards-dev.twitter.com/validator and OpenGraph.xyz

Summary by CodeRabbit

  • New Features

    • Added social media preview images for improved sharing across platforms.
  • Style

    • Enhanced responsive layout and grid constraints for better mobile viewing experience.

Mobile (375px) had ~55px horizontal scroll caused by grid tracks
defaulting to min-content across nowrap text in Install, AgentInstall,
and CommandCenter sections. Replace implicit/`1fr` tracks with
`minmax(0, 1fr)` so tracks can shrink below their content and let
`overflow: hidden` / `text-overflow: ellipsis` actually clip.

Also tightens padding, font-size, and letter-spacing at <=640px for
Install boxes, AgentInstall snippet head/code/copy row, CommandCenter
tabs and launch strip, and Stats tiles so dense uppercase content stops
crowding itself at mobile widths.

Adds app/opengraph-image.tsx and app/twitter-image.tsx using
next/og ImageResponse, statically prerendered at build (no edge
runtime) so socials get a real 1200x630 preview instead of the blank
card the site was shipping before.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 18, 2026

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

Project Deployment Actions Updated (UTC)
agentmemory Ready Ready Preview, Comment Apr 18, 2026 11:34pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b85b1fc4-717d-4fab-a6cd-8a0b82fdb62f

📥 Commits

Reviewing files that changed from the base of the PR and between c9aedbf and 197aa8d.

📒 Files selected for processing (6)
  • website/app/opengraph-image.tsx
  • website/app/twitter-image.tsx
  • website/components/AgentInstall.module.css
  • website/components/CommandCenter.module.css
  • website/components/Install.module.css
  • website/components/Stats.module.css

📝 Walkthrough

Walkthrough

The PR introduces Open Graph and Twitter card image generation for the website using Next.js ImageResponse API, along with responsive layout improvements across multiple CSS component modules through minmax grid constraints and mobile breakpoint adjustments.

Changes

Cohort / File(s) Summary
Social Media Image Generation
website/app/opengraph-image.tsx, website/app/twitter-image.tsx
New OG image component with 1200×630 PNG output featuring branded header, typography, and performance stats; Twitter image re-exports the OG implementation.
Responsive CSS Layout Updates
website/components/AgentInstall.module.css, website/components/CommandCenter.module.css, website/components/Install.module.css, website/components/Stats.module.css
Grid column definitions updated to use minmax(0, ...) constraints and min-width: 0 on containers to prevent overflow; mobile breakpoints (640px/960px) adjusted with reduced padding, font sizes, and letter-spacing.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 A rabbit's tale of cards and grids,
Where Open Graph images bid,
And Twitter cards shine bright with pride,
While minmax constraints keep content wide. 🌟
Responsive design hops far and near!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: mobile overflow fixes and addition of OG/Twitter preview images, matching the core modifications across CSS files and new image metadata exports.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 fix/website-mobile-og

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 and usage tips.

@rohitg00 rohitg00 merged commit 14b80db into main Apr 18, 2026
5 checks passed
@rohitg00 rohitg00 deleted the fix/website-mobile-og branch April 18, 2026 23:37
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