Skip to content

Fix blog not loading#3895

Merged
TheodoreSpeaks merged 2 commits intostagingfrom
fix/mutiplayer-blog
Apr 2, 2026
Merged

Fix blog not loading#3895
TheodoreSpeaks merged 2 commits intostagingfrom
fix/mutiplayer-blog

Conversation

@TheodoreSpeaks
Copy link
Copy Markdown
Collaborator

Summary

Fix multiplayer blog rendering issues. Also added back icons for linkedin and twitter.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

  • Validated multiplayer blog renders locally

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 2, 2026 4:47am

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 2, 2026

PR Summary

Medium Risk
Moderate risk because it changes Next.js client/server component boundaries for MDX code rendering, which can affect hydration and runtime behavior. UI-only icon additions to the share dropdown are low risk.

Overview
Fixes blog post rendering by making apps/sim/lib/blog/code.tsx a client component ('use client') so the MDX CodeBlock viewer can render correctly.

Updates the blog ShareButton dropdown to include icons for copy, X, and LinkedIn actions (restoring visual affordances without changing share URLs/behavior).

Written by Cursor Bugbot for commit e663ba5. This will update automatically on new commits. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 2, 2026

Greptile Summary

This PR fixes two blog rendering issues: it adds 'use client' to apps/sim/lib/blog/code.tsx so the CodeBlock component properly declares a client boundary (required because Code.Viewer from @/components/emcn is itself a client component), and it restores social share icons (Copy, XIcon, LinkedInIcon) to the blog share dropdown that were previously missing.

  • lib/blog/code.tsx: Added 'use client' directive. This is the correct fix — Next.js App Router requires components that use client-only sub-trees to explicitly opt in to the client boundary, otherwise serialization of the component tree can fail during SSR.
  • share-button.tsx: Icons re-added to all three DropdownMenuItem entries using Copy from lucide-react and LinkedInIcon / xIcon as XIcon from @/components/icons. The alias xIcon as XIcon is necessary because React requires JSX element names to start with an uppercase letter; the underlying export xIcon is a valid SVG component.
  • No logic changes were made — all share handlers (handleCopyLink, handleShareTwitter, handleShareLinkedIn) remain identical.

Confidence Score: 5/5

  • Safe to merge — both changes are targeted, correct, and low-risk bug fixes with no logic alterations.
  • The 'use client' addition is the canonical Next.js App Router fix for client component boundary issues. The icon restoration in the share button is purely additive UI. No new logic, no data paths changed, and no P1/P0 issues found.
  • No files require special attention.

Important Files Changed

Filename Overview
apps/sim/lib/blog/code.tsx Adds 'use client' directive to CodeBlock component, required because Code.Viewer from @/components/emcn is already a client component and needs to be bounded at this level for correct SSR behavior in the blog
apps/sim/app/(landing)/blog/[slug]/share-button.tsx Restores social icons (Copy, X/Twitter, LinkedIn) to share dropdown menu items using lucide-react and @/components/icons; logic unchanged

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["Blog Post Page\n(Server Component)"] --> B["CodeBlock\nlib/blog/code.tsx"]
    B -- "'use client' boundary\n(NEW)" --> C["Code.Viewer\n@/components/emcn\n'use client'"]

    A --> D["ShareButton\nshare-button.tsx\n'use client'"]
    D --> E["DropdownMenuItem: Copy link\n+ Copy icon (NEW)"]
    D --> F["DropdownMenuItem: Share on X\n+ XIcon (NEW)"]
    D --> G["DropdownMenuItem: Share on LinkedIn\n+ LinkedInIcon (NEW)"]
Loading

Reviews (1): Last reviewed commit: "Fix blog not loading" | Re-trigger Greptile

@TheodoreSpeaks TheodoreSpeaks merged commit c016537 into staging Apr 2, 2026
12 checks passed
@TheodoreSpeaks TheodoreSpeaks deleted the fix/mutiplayer-blog branch April 2, 2026 04:53
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