Skip to content

feat: add interactive notebook app for OpenGenerativeUI demos#81

Open
GeneralJerel wants to merge 6 commits intomainfrom
jerel/sad-johnson
Open

feat: add interactive notebook app for OpenGenerativeUI demos#81
GeneralJerel wants to merge 6 commits intomainfrom
jerel/sad-johnson

Conversation

@GeneralJerel
Copy link
Copy Markdown
Collaborator

Summary

  • Adds a standalone Next.js app (apps/notebook) that explains OpenGenerativeUI concepts in a Jupyter notebook-like format
  • Three cell types: markdown (react-markdown), code (Shiki syntax highlighting), and interactive playground (Sandpack live editor + preview)
  • 6 chapters covering: Introduction, Agent State, Generative UI, CopilotKit Hooks, Frontend Tools, and Widget Renderer
  • Uses the same brand design system (Plus Jakarta Sans, lilac/mint palette, glassmorphism) as the main app
  • Runs on port 3001 via pnpm dev:notebook

Test plan

  • Run pnpm dev:notebook and verify it starts on port 3001
  • Navigate through all 6 chapters via sidebar
  • Verify code cells show syntax highlighting with copy button
  • Edit code in playground cells and confirm live preview updates
  • Test dark mode toggle works across all cell types
  • Test mobile responsive layout (sidebar collapses to hamburger)
  • Run pnpm build --filter='@repo/notebook' to verify production build

🤖 Generated with Claude Code

Adds a standalone Next.js app (apps/notebook) that explains OpenGenerativeUI
concepts in a Jupyter notebook-like format with markdown cells, syntax-
highlighted code cells (Shiki), and interactive playground cells (Sandpack).

6 chapters: Introduction, Agent State, Generative UI, CopilotKit Hooks,
Frontend Tools, and Widget Renderer — each with live editable examples.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GeneralJerel and others added 5 commits April 6, 2026 16:48
Rewrites all 6 chapters to cover the 4 key areas:
- Widget Renderer (iframe assembly, streaming, Idiomorph, bridge JS)
- CopilotKit (hooks, runtime, useAgent, useComponent, provider)
- Deep Agent (create_deep_agent, tools, system prompt, BoundedMemorySaver)
- MCP Skills (skill server, playbooks, design system, assemble_document)
- Full end-to-end flow tracing a user message through all layers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All playground cells now produce real output instead of just describing
what would happen:

- Widget Renderer: real streaming HTML into an iframe with progress bar
  + live bridge demo (sendPrompt/auto-resize via postMessage)
- CopilotKit: working chat stream that renders actual charts (Recharts)
  + bidirectional state sync with a live todo app
- Deep Agent: full pipeline that renders a real animated widget in an
  iframe at the end (not just JSON labels)
- MCP Skills: live design system token explorer rendering real HTML in
  iframes + interactive SVG diagram builder following skill rules
- Full Flow: chat-like demo where you pick a prompt and get a fully
  rendered visualization (dashboard/chart/architecture diagram)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Drops the MCP Skills chapter and removes MCP references from the
introduction and full flow chapters. Notebook now covers 3 core
systems: Widget Renderer, CopilotKit, and Deep Agent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…kills

- Add fullscreen button (expand icon) to all playground cells with
  Escape key to exit; body scroll locked while fullscreen
- Rewrite MCP Skills chapter as "Agent Skills" — focuses on how
  skill documents (SKILL.md) teach the agent to write code: decision
  tree, response format selection, design system tokens
- Reorder chapters: Introduction → Deep Agent → Agent Skills →
  CopilotKit → Widget Renderer → Putting It Together

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ee diagrams

- New MermaidCell type and mermaid-cell.tsx component (lazy-loaded,
  client-only, dark mode reactive via MutationObserver)
- Architecture diagram in Introduction chapter showing User → CopilotKit
  → Deep Agent → Tools → Widget Renderer flow
- Decision tree diagram in Agent Skills chapter showing question type →
  output format mapping from the master playbook skill
- Both diagrams use the existing pastel color palette with style
  directives for consistent theming

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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