feat: updated design for blog and blog details page w dynamic og generation#3625
feat: updated design for blog and blog details page w dynamic og generation#3625adithyaakrishna wants to merge 46 commits intosimstudioai:stagingfrom
Conversation
PR SummaryMedium Risk Overview Adds dynamic Open Graph image generation via a new Refactors changelog fetching/UI by adding an internal Written by Cursor Bugbot for commit b654e7e. This will update automatically on new commits. Configure here. |
|
@adithyaakrishna is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR is a comprehensive visual redesign of the Sim blog ( Key concerns identified:
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User visits /studio] --> B[StudioLayout]
B --> C[StudioSidebar\nserver component]
B --> D[main - children]
C --> C1[getAllPostMeta]
C1 --> C2[Count posts per category\nvia getPrimaryCategory]
C2 --> C3[Render category links\nactiveTag always undefined ⚠️]
D --> E{Route}
E -->|/studio| F[StudioIndex page]
E -->|/studio/slug| G[Article page]
E -->|/studio/og?slug=| H[OG Image route]
F --> F1[StudioHero]
F --> F2[FeaturedGrid\nfeatured posts]
F --> F3[PostGrid\nregular posts]
F2 --> F4[FeaturedLeadCard]
F2 --> F5[PostCard]
G --> G1[AnimatedColorBlocks\nclient animation]
G --> G2[Article MDX content\n+ prose-studio.css]
G --> G3[ArticleSidebar\nauthor / TOC / tags / related]
G --> G4[ShareButtons\nclient component]
H --> H1{slug param?}
H1 -->|No| H2[400 Bad Request]
H1 -->|Yes| H3[getPostBySlug]
H3 -->|Not found| H4[404]
H3 -->|Found| H5[Read font files\nfs.readFile ⚠️ unguarded]
H5 --> H6[ImageResponse\n1200x630 PNG]
G3 --> G3a[TableOfContents\nclient - IntersectionObserver]
Last reviewed commit: 34d3d78 |
0be63c5 to
58fc6cd
Compare
0d97bab to
30ce4ba
Compare
|
@adithyaakrishna please fix merge conflicts issues, and resolve bugbot comments. I think we should be able to get this in soon. |
58bd87f to
3d2d895
Compare
| } | ||
|
|
||
| throw new Error('Failed to load font data') | ||
| } |
There was a problem hiding this comment.
OG font loader only extracts single weight from CSS
Low Severity
loadGoogleFont requests weights 400;500;700 but the regex only matches the first src: url(...) in the returned CSS. This means only one weight's font file is loaded. The ImageResponse then registers this single ArrayBuffer as weight 500, so text rendered at weight 400 or 700 will all appear as weight 500, losing visual hierarchy in the OG image (title, body, and labels all look the same weight).
Additional Locations (1)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| } | ||
|
|
||
| throw new Error('Failed to load font data') | ||
| } |
There was a problem hiding this comment.
OG route crashes when Google Fonts fetch fails
Medium Severity
loadGoogleFont throws an unrecoverable error if the Google Fonts API is unreachable, returns unexpected CSS, or the regex fails to match. Since OG images are now the primary social preview for all blog posts (replacing static ogImage in SEO metadata), a transient Google Fonts outage would cause all blog post share previews to return 500 errors with no fallback, breaking social sharing site-wide.


Summary
Complete redesign of the blog (/studio) pages with 2 column sidebar layout, redesigned post cards, a 3 column blog detail page and added feature for dynamic og image generation
Fixes #(issue)
Type of Change
Testing
/studio/og?slug=<slug>Checklist
Screenshots/Videos
OG Image:
How it looks:
screen-capture.13.webm