Skip to content

blog(agent-as-yjs-peer): "The Agent Is Just Another Peer" post + live demo - #6268

Merged
waleedlatif1 merged 10 commits into
stagingfrom
blog-agent-as-yjs-peer
Aug 4, 2026
Merged

blog(agent-as-yjs-peer): "The Agent Is Just Another Peer" post + live demo#6268
waleedlatif1 merged 10 commits into
stagingfrom
blog-agent-as-yjs-peer

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • New engineering post, "The Agent Is Just Another Peer" — how we stream an AI agent into a live collaborative (Yjs) document by making it an ordinary peer, and what turned out easy, hard, and surprising.
  • Self-contained interactive demo (AgentPeerDemo): two peers editing one file at once, streamed once on scroll-in, styled entirely from the real editor's design tokens (collaboration caret, code chip, resource chrome). No shadows, no bespoke motion.
  • Blog code blocks + inline code now render on the same surface/tokens as the in-app code editor (Code.Viewer + chipFieldSurfaceClass) instead of a force-dark wrapper — affects all posts.
  • Post marked featured: true, which bumps Sim v0.5 out of the 3-card featured row by date.

Type of Change

  • New feature (content / blog)

Testing

Tested manually: renders locally (post + index 200), typecheck + biome clean, and every technical claim in the post was verified against the actual implementation (apply-streamed-markdown.ts, converter.ts, markdown-parse.ts, and the collab tests).

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)

@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 4, 2026 11:15pm

Request Review

@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Content and landing/blog presentation changes only; no auth, collaboration runtime, or data paths are modified.

Overview
Adds a new featured engineering post "The Agent Is Just Another Peer" (agent-as-yjs-peer) on streaming an AI agent into live Yjs collaboration, with FAQ metadata and a custom AgentPeerDemo MDX component that animates two independent peers (human + agent) typing into one document on scroll-in, using editor design tokens and stable visibility: hidden layout.

Registers the post’s component loader in registry.ts so AgentPeerDemo resolves in MDX.

Blog rendering (all posts): fenced code blocks now use Code.Viewer with chipFieldSurfaceClass instead of a forced-dark wrapper; inline code chips match the rich markdown editor surface; MDX styling switches from clsx to cn from @sim/emcn.

Reviewed by Cursor Bugbot for commit c50247f. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds an engineering post about streaming an AI agent into a collaborative Yjs document, including an interactive two-peer animation. It also registers the post and updates shared MDX code rendering to use editor-aligned surfaces and tokens.

  • Adds the “The Agent Is Just Another Peer” post and cover image.
  • Adds and registers the AgentPeerDemo interactive component.
  • Updates fenced and inline code styling across blog posts.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/content/blog/agent-as-yjs-peer/components/agent-peer-demo.tsx Adds the scroll-triggered two-peer editing demonstration; the previously reported missing-IntersectionObserver fallback is now guarded before animation state is cleared.
apps/sim/content/blog/agent-as-yjs-peer/index.mdx Adds the new featured engineering article and embeds the interactive demonstration.
apps/sim/lib/content/code.tsx Moves blog code blocks onto the shared editor-style surface and token set.
apps/sim/lib/content/mdx.tsx Centralizes language mapping, adopts the shared class-name helper, and aligns inline-code styling with the editor.
apps/sim/lib/blog/registry.ts Registers the new post’s custom component loader.

Reviews (5): Last reviewed commit: "fix(blog): guard agent demo rAF loop aga..." | Re-trigger Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit df54aa1. Configure here.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit c51ece5. Configure here.

@waleedlatif1
waleedlatif1 merged commit bf5abc9 into staging Aug 4, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the blog-agent-as-yjs-peer branch August 4, 2026 23:20
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