Commit Graph

166 Commits

Author SHA1 Message Date
Jordan Ritter e2a6cc2bfe Regenerate shell-dojo registry at build and expand CI trigger paths
The dojo app was missing items under the langgraph column because
shell-dojo shipped a stale committed registry.json. The generator
only wrote to shell/, the dojo Dockerfile didn't run the generator
at build, and the CI path filter didn't rebuild the dojo when
manifest files changed.

Fix: emit from generate-registry.ts to shell, shell-dojo, and
shell-docs; add the generator step to shell-dojo's Dockerfile;
expand the deploy workflow's path filter to include packages/**
and shared/**; and refresh the committed registry/demo-content
JSON so files on disk match what the generator produces today.
2026-04-21 13:10:52 -07:00
Jordan Ritter 22b9050608 fix(showcase/shell): next.config throws on corrupt registry in production; logs in dev
A bare catch swallowed JSON.parse failures, silently returning [] and
making every /<slug> framework redirect disappear. Throw in production
(registry is a required build-time artifact) and console.warn in dev
(so a transient mid-write doesn't kill the dev loop). Also throw if
the file is missing in production for the same reason.
2026-04-20 17:49:57 -07:00
Jordan Ritter c298fe2ae2 fix(showcase/shell-docs): move 4085-added unselected/prebuilt-components content into shell-docs
These files were added in #4085 but landed in showcase/shell/src/content/docs/
after the MDX-docs extraction had already moved the rest of content/docs into
shell-docs. Follow The Rule (MDX docs content belongs in shell-docs) and
relocate them so they render correctly on docs.showcase.copilotkit.ai.
2026-04-20 14:00:57 -07:00
Jordan Ritter c6e4b809e9 feat(showcase/shell): add 301 redirects from /docs /ag-ui /reference /[framework] to docs.showcase.copilotkit.ai
Shell no longer hosts MDX docs routes — they live on shell-docs
(docs.showcase.copilotkit.ai). Add permanent redirects from the legacy
shell paths so old URLs and SEO authority carry over to the new host.

Framework slugs are enumerated from registry.json at build time (not a
:slug* wildcard) so /integrations and /matrix — both still owned by
shell — are NOT caught by the redirect. Fixed routes (/docs, /ag-ui,
/reference) cover the three other docs catch-alls.
2026-04-20 14:00:28 -07:00
Jordan Ritter fc80501048 feat(showcase): move MDX docs routes + components + libs + content into shell-docs
Extracts everything that exists to render MDX documentation (docs/[[...slug]],
[framework]/[[...slug]], ag-ui/[[...slug]], reference/[...slug]) out of shell
into the new shell-docs package that will serve docs.showcase.copilotkit.ai.

Moves (git mv preserves history):
  - App routes: /docs, /[framework], /ag-ui, /reference
  - Docs-only components: docs-page-view, docs-callout, docs-steps, docs-tabs,
    mdx-components, framework-tabs, framework-selector, sidebar-*, snippet,
    property-reference, router-pivot, stored-framework-highlight, react/*
  - Docs-only libs: lib/docs-render, lib/mdx-registry
  - All content: content/docs, content/ag-ui, content/reference, content/snippets
  - .docs-sync-sha marker (follows the content)

Duplicates into shell-docs (both shells need them):
  - brand-nav, search-modal, search-trigger, copy-button, framework-provider
  - lib/registry.ts, data/registry.json, data/demo-content.json,
    data/search-index.json
  - app/layout.tsx + globals.css + public/{images,logos}

shell-docs gets its own minimal middleware (PostHog-only — no SEO redirect
table, docs host never served legacy URLs). shell keeps seo-redirects.ts
for the legacy-URL migration table; framework-scope protection in its
middleware is now effectively dead but harmless (next.config.ts redirects
fire before middleware ever sees /<framework>/ paths).

InlineDemo updated for cross-host context: 'Open full demo' link points
at the shell host (showcase.copilotkit.ai) since the integration profile
route only exists there.
2026-04-20 14:00:28 -07:00
Atai Barkai 7644f180a6 fix(showcase): restore shared-state-read-write scaffolds + regen starters
Post-merge CI caught two regressions:

1. shared-state-read-write demo directories were on disk but never
   committed — 16 packages' manifests reference the demo but the
   page.tsx scaffolds weren't tracked. This failed validate-parity,
   bundle-demo-content tests, and drift-check transitively.

2. langgraph-python starter templates drifted after main added
   docstring region markers to weather-tool-backend; regenerating
   via `npx tsx generate-starters.ts` syncs the 17 starters.

Bundle (showcase/shell/src/data/demo-content.json) regenerated to
pick up the new demo content.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 21:34:13 -07:00
Atai Barkai 9eddb3004e docs(showcase/shell): unselected/prebuilt-components — folder with sub-pages
Convert unselected/prebuilt-components.mdx single-file into a folder
matching the main /docs/prebuilt-components/ structure:
  index.mdx, chat.mdx, sidebar.mdx, popup.mdx, meta.json

This way the nav builder creates a GROUP with CopilotChat /
CopilotSidebar / CopilotPopup children in the Built-in Agent sidebar
section, not just a single page link.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 21:07:33 -07:00
Atai Barkai 319d2fac19 fix(showcase/shell): prebuilt-components customization ladder — avoid nested <p> hydration error
MDX wraps inline text inside HTML elements in <p> tags. Using <p> as
the outer wrapper for each card's description causes <p><p>text</p></p>
which breaks hydration. Switch to <div> as the outer wrapper.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 20:56:21 -07:00
Atai Barkai a425ffc273 chore(showcase): regenerate registry after gen-ui-agent reorder 2026-04-19 20:50:18 -07:00
Atai Barkai bed8081340 chore(showcase): regenerate bundles after HITL row rename
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 20:32:53 -07:00
Atai Barkai 52b9b2012a docs(showcase/shell): custom-look-and-feel — CSS first, Slots (Subcomponents), align unselected tree
- Reorder meta.json so CSS is the first sub-page (easiest rung of the
  customization ladder), then Slots, Headless UI, Reasoning Messages.
- Retitle slots.mdx frontmatter to "Slots (Subcomponents)" so the sidebar
  nav reads the user-facing term people actually search for.
- css.mdx: demonstrate the new file+lines Snippet by pulling the
  user/assistant bubble block straight from the cell's theme.css.
- headless-ui.mdx: expand from a bare IntegrationGrid stub into a full
  page with minimal + complete examples, the three core hooks, and
  Snippet pulls from both headless-simple and headless-complete cells.
- Mirror the css/slots changes into unselected/custom-look-and-feel/ so
  the framework-agnostic tree stays in step (add css.mdx, reorder
  meta.json, retitle slots nav).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 20:30:53 -07:00
Atai Barkai 384a803935 docs(showcase/shell): prebuilt-components — customization spectrum + per-component sub-pages
- Rewrite overview to present the 4-level customization ladder (drop-in →
  CSS → slots → headless), with a 2x2 card grid linking out to each rung.
- Add a new chat.mdx sub-page for CopilotChat with intro, InlineDemo,
  the CopilotChat GIF, provider-setup snippet, and the standard code
  example from docs.copilotkit.ai.
- Reorder meta.json to chat → sidebar → popup.
- Add gif embeds to sidebar.mdx and popup.mdx (matching docs.copilotkit.ai).
- Point stale /prebuilt-components cross-links at the new
  /prebuilt-components/chat page.
- Align unselected/prebuilt-components.mdx with the ladder framing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 20:30:38 -07:00
Atai Barkai e01168e5ef feat(showcase/shell): add Snippet file+lines support for arbitrary-file inclusion
<Snippet> now supports a second lookup mode alongside the existing
region="..." marker: file="..." lines="A-B" pulls a line range (or
the whole file when lines is omitted) from any file in the cell's
bundled files[]. Region lookup wins when both are passed, preserving
all existing call sites.

Parses dash ("10-20"), en-dash, and single-line ("12") ranges.
Surfaces the same graceful WarningBox on missing files / bad ranges
as the region path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 20:30:24 -07:00
Atai Barkai 4bc956346f fix(showcase): null out hallucinated docs-links entries (wrong framework, wrong shell path)
Prior 4085 port blindly copied 4084 docs-links.json patterns, producing many
entries that pointed at wrong-framework docs (e.g. crewai-crews → crewai-flows),
nonexistent shell paths (e.g. /claude-sdk-typescript/... prefix doubled into
/claude-sdk-typescript/claude-sdk-typescript/...), or the wrong field name
(mastra used `shell_docs_url` with absolute http://localhost:3000 URLs).

Audit against live docs.copilotkit.ai and the 4085 shell at :4010 surfaced:
- 9 og_docs_url 404s (8 on claude-sdk-typescript under a nonexistent
  /claude-sdk-typescript/* slug, 1 on /ag2/multi-agent/subagents)
- 24 shell_docs_path 404s (8 claude-sdk-typescript, 6 pydantic-ai, 4 strands,
  4 mastra, 2 langgraph-python)
- crewai-crews pointing entirely at /crewai-flows/... (different product)

Fix: point each entry at a real docs.copilotkit.ai page scoped to the correct
framework OR null it out; normalize shell_docs_path to leading-slash form
that composes with the DocsRow `${shellUrl}/${slug}/unselected${path}` scheme;
null google-adk shell paths (no google-adk-scoped shell docs exist, better to
show ✗ than mislead). Regenerated registry + docs-status bundles.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 16:11:52 -07:00
Atai Barkai dfaae83bcf refactor(showcase/langgraph-python): promote gen-ui-agent to primary via useCoAgentStateRender
- Backend: rewrite `gen_ui_agent.py` as a custom StateGraph that plans a
  3-5 step list via an LLM, then walks through pending->running->completed
  transitions for each step, publishing updates via copilotkit_emit_state.
  The planner LLM call uses copilotkit_customize_config(emit_messages=False)
  so its raw JSON plan never leaks into the chat transcript.
- Frontend: replace the v2 messageView.children + useAgent subscription
  with v1 useCoAgentStateRender from @copilotkit/react-core. The v1
  CopilotKit provider wraps v2 internally, so v2 CopilotChat still works
  inside it. The render prop receives {state, nodeName, status} and
  inlines an InlineAgentStateCard reading the agent's `steps` list.
- InlineAgentStateCard: refactor from a generic key/value dump to a
  proper stepwise tracker with per-step marker (pending number, running
  spinner, completed check) and completion headline.
- Registry: drop `kind: testing` from gen-ui-agent in feature-registry
  and polish its description to highlight the canonical pattern; also
  tighten the manifest.yaml demo description for the same reason.
- Regenerated showcase bundles (registry.json, demo-content.json,
  constraints.json) via `pnpm --filter @copilotkit/showcase-scripts run
  generate-registry && bundle-content`.

Validation (Playwright against localhost:4100/demos/gen-ui-agent):
- Initial: clean welcome screen + three suggestion pills.
- Mid-run: "Step 2 of 5" with first step checkmarked, second spinning,
  rest numbered -- planner JSON no longer leaking as raw text.
- Final: "All 5 steps complete" card + 1-2 sentence LLM summary.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 16:06:00 -07:00
Atai Barkai 1935abd120 feat(showcase/langgraph-python): add Frontend Tools (Async) cell demonstrating async useFrontendTool handler
Introduces the "Frontend Tools (Async)" showcase cell — the async sibling
to the in-app-actions "Frontend Tools" cell. Demonstrates the canonical
async useFrontendTool pattern where the handler awaits a real client-side
async operation and RETURNS A RESULT the agent uses.

Concept: a simulated client-side "notes database" query. The frontend
registers a `query_notes` tool whose async handler sleeps 500ms (emulating
IndexedDB / localStorage / local-cache latency) then filters an in-browser
notes array by keyword and returns matching notes. The agent awaits the
result and summarizes matches for the user.

Files:
- src/agents/frontend_tools_async.py — helpful-assistant graph with no
  backend tools; system prompt instructs the model to call `query_notes`
  for note searches (schema is injected at runtime from the frontend via
  CopilotKitMiddleware)
- src/app/demos/frontend-tools-async/page.tsx — CopilotKit provider +
  CopilotChat, `useFrontendTool({ handler: async (...) => { await sleep;
  return matches; } })` + per-tool render hook that shows a branded
  NotesCard, `useConfigureSuggestions` with three prompts
- src/app/demos/frontend-tools-async/notes-card.tsx — emerald/teal
  gradient card listing matched notes with tag chips
- langgraph.json — register `frontend_tools_async` graph
- manifest.yaml — features list + demos entry
- feature-registry.json — expanded description + docs URLs point to the
  canonical /frontend-tools docs (shared with the sibling cell)
- constraints.yaml — added to all three generative_ui profiles
- docs-links.json — langgraph-python override pointing at /frontend-tools

Validated end-to-end: agent successfully calls `query_notes` with keywords
extracted from natural-language prompts, awaits the async handler, and
summarizes the returned notes for the user.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 16:00:02 -07:00
Atai Barkai 3d16f0e85b refactor(showcase): rename open-gen-ui-advanced to emphasize frontend function calling
The advanced variant's distinguishing feature is that the agent-authored,
sandboxed UI can invoke frontend-registered sandbox functions via
Websandbox.connection.remote.<name>(args). The old label "(Advanced)"
did not convey this. Rename to "Open-Ended Gen UI (Advanced: with
frontend function calling)" in both the feature registry and the
langgraph-python manifest, and update descriptions to match. The id
stays `open-gen-ui-advanced` so URLs remain stable.

Regenerate derived bundles (registry.json, demo-content.json,
docs-status.json).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 15:47:46 -07:00
Atai Barkai 7cb19385b6 chore(showcase): delete declarative-gen-ui-hardcoded testing cell
The "Declarative Generative UI (A2UI — Custom Catalog)" single-file
prototype variant was a testing-only companion to the canonical
declarative-gen-ui 3-file BYOC pattern. Drop it everywhere:

- Delete src/app/demos/declarative-gen-ui-hardcoded/ cell directory
- Delete src/agents/a2ui_dynamic_hardcoded.py
- Remove from langgraph-python manifest.yaml (features + demos) and
  langgraph.json graphs
- Remove from docs-links.json, route.ts (agent entry + a2ui agents
  list), shared/feature-registry.json, shared/constraints.yaml
- Drop the Callout promoting it from a2ui/dynamic-schema.mdx
- Bump expected langgraph-python count 32 → 31 in generate-registry
  test; regenerate all bundles

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 15:33:43 -07:00
Atai Barkai 1b9b7ab0e6 chore(showcase): remove redundant prebuilt-chat row
Pre-Built: Chat was redundant with Pre-Built: CopilotChat — both rows
referred to the same CopilotChat surface with slightly different
framing. Drop prebuilt-chat everywhere:

- Delete src/app/demos/prebuilt-chat/ cell directory
- Remove from langgraph-python manifest.yaml features + demos
- Remove from shared/feature-registry.json features + chat-ui allowlist
- Remove from shared/constraints.yaml constrained-explicit
- Remove from src/app/api/copilotkit/route.ts neutral-fallthrough list
- Update expected counts in bundle-demo-content + generate-registry
  tests (langgraph now exposes 32 features, down from 33)
- Fix stale src/agents/main.py test expectation to
  src/agents/agentic_chat.py (main.py was split into a neutral assistant
  by an earlier Phase-1 fix commit)
- Regenerate shell/src/data/{registry,constraints,demo-content,
  docs-status}.json

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 15:22:51 -07:00
Atai Barkai 8f51a4ecf1 chore(showcase): regenerate demo-content bundle after highlight slim
Regenerated via `pnpm --filter @copilotkit/showcase-scripts run bundle-content`
after trimming the `highlight:` lists on langgraph-python cells so the
"show all files" toggle in the code viewer exposes materially more files
than the default "core" view.

Spot-check (core / all):
  beautiful-chat               9 / 31
  headless-complete            5 / 13
  tool-rendering               5 / 7
  tool-rendering-reasoning-chain  5 / 7
  chat-slots                   4 / 6
  gen-ui-tool-based            4 / 5
  open-gen-ui-advanced         4 / 5

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 15:14:28 -07:00
Atai Barkai 614927a809 chore(showcase): regenerate demo-content bundle after highlight expansion
Re-runs `pnpm --filter @copilotkit/showcase-scripts run bundle-content`
to repopulate `showcase/shell/src/data/demo-content.json` with the
expanded `highlight:` file lists from the previous commit. Affects only
`langgraph-python::*` entries; all other framework demos are unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 14:52:17 -07:00
Atai Barkai 39740ac135 fix(showcase/shell): kill per-line gray rectangles in code viewer
The oneLight SyntaxHighlighter theme sets a near-white background on
both <pre> and the inner <code>. customStyle overrides the <pre>, but
the <code> child keeps its own background — and since <code> renders
inline, that bg hugs each line of text and shows as a pale per-line
rectangle against the dark page chrome, making untouched code look
like it's text-selected. Unset the <code> background so the chosen
<pre> background reads as a flat block.

Same fix 4084 already landed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 14:50:04 -07:00
Atai Barkai 9733146552 fix(showcase/shell): redirect /<framework>/unselected/<path> → /<framework>/<path>
A framework-scoped URL asserting "unselected" in its path is
incoherent — you can't be both on langgraph-python AND in the
no-framework state. Collapse the redundant segment: if the framework
catch-all receives a slug that starts with unselected/, permanent-
redirect to the same path without that prefix (the framework-scoped
version serves the same content, just with Snippets resolved against
the selected framework's cells).

/docs/unselected/<path> remains a valid framework-agnostic URL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 14:32:28 -07:00
Atai Barkai 6751bce773 refactor(showcase/shell): rename docs/built-in-agent → docs/unselected
The /built-in-agent/<page> URL prefix in 4085's docs was a holdover from
an early misnomer in the original 4084 work. 4084 has since renamed the
content directory to unselected/ to reflect what the route actually is:
the no-framework / "no agentic backend selected" docs view. "Built-in
Agent" is reserved for an upcoming integration COLUMN in the showcase
matrix and shouldn't share a name with this docs route.

- Rename content/docs/built-in-agent/ → content/docs/unselected/
- Update docs-render.tsx subpath fallback (built-in-agent/ → unselected/)
- Update seo-redirects.ts wildcards
- Update internal MDX link references in learn/, backend/, faq.mdx,
  meta.json, snippets/shared/

The integrations/built-in-agent/ legacy directory is preserved
unchanged (it's a separate concept).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 14:29:42 -07:00
Atai Barkai 66c917b592 docs(showcase/shell): merge 4084 code examples into prebuilt-components
The built-in-agent tree exists only in 4085, but 4084's top-level
prebuilt-components.mdx had richer content (per-variant code examples
for CopilotChat/Sidebar/Popup with labels, customization block with
slot props, Setup section). Merge those into the 4085 page while
keeping its modern Snippet-based provider-setup + suggestions pulls
from the live cell.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 14:16:33 -07:00
Atai Barkai d40907e050 chore(showcase): regenerate demo-content bundle after region additions
Bundler picks up the new region markers plus the extended manifest
highlights — each of the 7 affected docs pages (subagents,
shared-state-streaming, open-generative-ui, mcp-apps, a2ui dynamic and
built-in) now resolves its <Snippet> tags to a real region.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 14:15:54 -07:00
Atai Barkai feb0882cf8 chore(showcase): regenerate registry + docs-status bundles
Regenerates shell/src/data/registry.json and shell/src/data/docs-status.json
after the docs-links pipeline port so the shell-internal dashboard picks up
per-column docs overrides and live probe state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 14:10:19 -07:00
Atai Barkai f8ceb9ac4f chore(showcase): regenerate data bundles after registry sync
Rerun generate-registry + bundle-content so shell/src/data/*.json reflects
the prebuilt-chat feature addition and the langgraph-python manifest
copy-alignment.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 14:02:52 -07:00
Atai Barkai c3d105ae00 feat(showcase/langgraph-python): port 4084 cells into 4085 demos layout
Port 15+ cells from PR 4084 (per-demo workspace) into PR 4085's
shared-column layout (src/agents/*.py + src/app/demos/<cell>/*.tsx).

New cells:
- beautiful-chat (port scaffold — full component tree deferred)
- declarative-gen-ui-hardcoded (single-file catalog variant)
- interrupt-headless (useHeadlessInterrupt from primitives)
- open-gen-ui-advanced (sandbox functions + app-tool-calling)
- readonly-state-agent-context (useAgentContext one-way channel)
- reasoning-default-render (built-in CopilotChatReasoningMessage)
- shared-state-read-write (preferences write + notes read)
- tool-rendering-reasoning-chain (reasoning emitter + chaining loop)

Restructured cells:
- declarative-gen-ui: BYOC with 3-file a2ui/{definitions,renderers,catalog}
- a2ui-fixed-schema: compositional tree with Title/Airport/Arrow/
  AirlineBadge/PriceTag + 3-file catalog; search_flight renamed
  display_flight
- mcp-apps: simplified to mcpApps.servers runtime config targeting
  Excalidraw; drops custom MCPAppsStubMiddleware
- open-gen-ui: minimal provider + openGenerativeUI runtime flag
- tool-rendering + 3 variants: per-tool WeatherCard + FlightListCard
  plus useDefaultRenderTool wildcard

Runtime wiring:
- /api/copilotkit: registers new agents + a2ui.injectA2UITool for
  declarative + fixed-schema cells
- /api/copilotkit-ogui: adds open-gen-ui-advanced
- /api/copilotkit-mcp-apps: NEW dedicated endpoint for mcpApps

Backend graphs:
- shared_state_read_write.py (PreferencesInjectorMiddleware + set_notes)
- readonly_state_agent_context.py
- hitl_in_chat_agent.py (tools=[] + tailored prompt)
- a2ui_dynamic_hardcoded.py (secondary-LLM dynamic schema)
- open_gen_ui_advanced_agent.py
- tool_rendering_reasoning_chain_agent.py (reason→tool loop)

Flight fixed-schema JSON now assembles Card>Column>[Title,Row,Row,Button].

All `@region[...]` markers ported to drive docs <Snippet> resolution.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 11:45:21 -07:00
Atai Barkai 5eb4da7db9 chore(showcase): regenerate shell/src/data bundles after port
Regenerate registry.json (41 features, 11 categories, 17 integrations),
demo-content.json (152 demos bundled with region markers support +
dual-path highlight resolution), constraints.json (new allowlists),
and status.json (no variants field) so the shell + shell-internal
dashboards render the ported state without stale cached inputs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 11:25:29 -07:00
Atai Barkai beb42019d4 docs(showcase/shell): port ~70 MDX pages from 4084 into shell
Port the MDX content delta between the 4085 base branch
(atai/2026-04-18/feature-port-no-docker-restructure) and the 4084
follow-ups branch (atai/2026-04-17/internal-showcase-followups):

- built-in-agent tree (ag-ui, coding-agents, copilot-runtime,
  frontend-tools, inspector, prebuilt-components, programmatic-control,
  custom-look-and-feel/{headless-ui,slots}, generative-ui/{a2ui,
  tool-rendering,your-components/{display-only,interactive}},
  premium/{headless-ui,observability,overview},
  troubleshooting/{common-issues,error-debugging,migrate-to-*})
- top-level feature docs (agentic-chat-ui, frontend-tools, headless,
  human-in-the-loop, inspector, shared-state, programmatic-control,
  ag-ui-middleware, coding-agents, coding-agent-setup)
- custom-look-and-feel (css, reasoning-messages, slots)
- generative-ui (a2ui, a2ui/dynamic-schema, a2ui/fixed-schema,
  mcp-apps, open-generative-ui, reasoning, tool-based, tool-rendering)
- human-in-the-loop (headless, useInterrupt)
- prebuilt-components (index, popup, sidebar) — replaces the single
  prebuilt-components.mdx
- shared-state (agent-readonly, streaming)
- troubleshooting (common-issues, debug-mode, error-debugging,
  migrate-to-*, observability-connectors)
- learn (connect-mcp-servers)
- multi-agent/subagents
- integrations/built-in-agent/custom-agent,
  integrations/langgraph/generative-ui/tool-rendering
- meta.json updates across backend, custom-look-and-feel,
  generative-ui, generative-ui/a2ui, prebuilt-components,
  troubleshooting, root docs

These pages use the new Snippet / InlineDemo / FrameworkTabs
components shipped in the preceding infrastructure commit, plus the
FrameworkGuardedContent pattern that only applies when a page has a
defaultCell frontmatter. Framework-agnostic pages (/learn/*,
/troubleshooting/*, /premium/*) keep rendering their body
unconditionally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 11:22:57 -07:00
Atai Barkai c1b595596e feat(showcase/shell): port /docs routing + framework-scoped routes from 4084
Port the full docs routing + rendering infrastructure from the 4084
branch (atai/2026-04-17/internal-showcase-followups):

- New [framework]/[[...slug]] catch-all that validates the first
  segment against the registry and renders framework-scoped docs
  with a "not available for this framework" banner when the page's
  defaultCell is not tagged in the framework's cells.
- FrameworkProvider + selector: framework is strictly URL-derived,
  storedFramework is an advisory localStorage signal. No
  auto-redirect from localStorage.
- /docs/[[...slug]] rewritten as a thin wrapper around DocsPageView
  with a new DocsOverview landing: framework picker + topic cards.
- New lib/docs-render.tsx centralising snippet inlining,
  frontmatter parsing, nav tree + breadcrumb builders.
- New lib/mdx-registry.tsx consolidating the ~700-line component
  shim used by both routes.
- Server <Snippet> component with demo-content regions + syntax
  highlighting via highlight.js.
- Per-feature <InlineDemo> iframe embedder pointing at the
  integration's backend (single-container shape
  http://localhost:3100/demos/<cell>).
- FrameworkTabs, docs-callout, docs-steps, docs-tabs, router-pivot,
  stored-framework-highlight components for the MDX registry.
- Global typography + color pivot in globals.css: Plus Jakarta
  Sans body, Spline Sans Mono code, cool-gray background, purple
  accent.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 11:22:28 -07:00
Atai Barkai 218a356256 feat(showcase/shell-internal): port enriched cell chrome + command cell from 4084
- Drop the 5 experimental variant-presentation routes + SingleCell helper;
  the variant layouts no longer match the enriched cell chrome.
- Rename variant-pieces.tsx -> cell-pieces.tsx; expose a shared
  <CellStatus ctx={ctx} /> that renders the docs-og/docs-shell row +
  E2E/Smoke/QA/health badges so both the runnable-demo cell and the
  informational CommandCell share the same bottom section.
- Add CommandCell (client component): takes the full CellContext, renders
  <code> + Copy button for ctx.demo.command, then the same CellStatus row.
- page.tsx branches on ctx.demo.command so the CLI Start row renders a
  copy-pasteable command in place of Demo/Code links while keeping the
  matrix visually consistent.
- registry.ts: Feature gains kind + og_docs_url/shell_docs_url; Demo.route
  is optional and Demo.command is the new informational field. Feature-grid
  passes the full demo onto CellContext.
- status.ts: drop variant helpers / types (no longer used).
- Add docs-status.ts reader + a stub docs-status.json so the enriched
  DocsRow renders without blowing up the build before the schema agent
  lands the generated bundle.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 11:22:02 -07:00
Atai Barkai 6a5daea433 chore(showcase): regenerate registry + demo-content bundles
Pick up the split generative-ui categories, new cells (chat-customization-css,
tool-rendering-default/custom-catchall, tool-rendering-frontend-tools), and
the flat `files` shape (backend files merged in from manifest highlight:).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 18:23:17 -07:00
Atai Barkai 2121d1d386 feat(showcase): shell /code viewer + strict bundle-demo-content
- Shell /code viewer now builds a recursive file tree with core-only
  (★ highlighted) and show-all-files toggle via ?view=all; collapses the
  legacy flat files + backend_files arrays into one tree
- bundle-demo-content: strict mode — errors on missing highlight paths;
  drop backend_files field; pull in external backend files referenced
  by highlight: (column-relative paths) alongside demo-folder contents;
  stable page-first ordering
- Update tests to reflect new column-relative filename shape

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 18:22:04 -07:00
Atai Barkai 1b1f92de90 chore(showcase): feature-registry + manifest updates
Split generative-ui category into 4 (controlled/declarative/open/
operational), add chat-customization-css + tool-rendering-frontend-tools,
replace old tool-rendering-status/-result IDs with default-catchall /
custom-catchall. Port langgraph-python manifest features + highlight:
paths (column-relative to preserve pre-existing Docker structure).
Update tests for new category/feature counts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 18:11:06 -07:00
Atai Barkai 163bfe8263 feat(showcase/shell-internal): variant presentations at 5 experimental routes
To support exhaustive E2E testing via multiple variants per feature ×
framework, extend the status model with an optional `variants[]` array
per demo (each variant has the same demo/code/E2E/Smoke/QA/health
breakdown) and mount five different visual treatments so we can compare
side-by-side before committing to one:

- `/variants-stack`      — each variant rendered as its own mini-row
                           in the cell; tall cells, all info visible.
- `/variants-tabs`       — tabs at the cell top, click to switch
                           variant; cell stays compact.
- `/variants-aggregate`  — pass/total rollups per signal +
                           "N variants ▾" expand button to drill down.
- `/variants-grid`       — mini-matrix: rows = variants, cols =
                           demo/code/E2E/Smoke/QA/health.
- `/variants-strip`      — one colored chip per variant per signal;
                           hover chip for variant name, click for URL.

Refactor: the grid chrome moves to `components/feature-grid.tsx`
(accepts a `renderCell` callback). Main `/` keeps the existing
single-variant layout via `components/cell-single.tsx`. Shared badge /
links helpers live in `components/badges.tsx` and
`components/variant-pieces.tsx`.

Mock variant data is seeded on 4 demos (langgraph-python's
agentic-chat, gen-ui-tool-based, hitl-in-chat; langgraph-typescript's
agentic-chat) so each option shows variants in context alongside
ordinary cells.

Variant-specific deep links append `?variant=<name>` to the shell
preview / code / hosted URLs — the shell routes can pick that up
later to highlight variant-specific files or payloads.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 09:37:53 -07:00
Atai Barkai 6e16befaff feat(showcase): wire real health probes + clickable health badge
- New `scripts/generate-status.ts` — probes every
  `integration.backend_url + demo.route` in parallel (~166 URLs) and
  writes health status per demo to `shell/src/data/status.json`. E2E,
  Smoke, and QA stay mock with explicit `TODO(wire-*)` comments; real
  readers for those ingest from `showcase_aimock-e2e.yml`,
  `showcase_smoke-monitor.yml`, and `showcase_qa-sync.yml` later.
  `GENERATE_STATUS_MOCK_HEALTH=1` offline override for dev.
- Health badge in the feature-matrix cell is now clickable — opens the
  hosted URL (`integration.backend_url + demo.route`) in a new tab,
  with a tooltip noting the last probe time + status.
- Ran the probe once against Railway: 10/22 langgraph-python demos up
  (pre-merge features), 12/22 down (new demos on this branch, not yet
  deployed). Other 16 integrations fully live.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 09:29:48 -07:00
Atai Barkai 09b29916a6 feat(showcase/shell-internal): rich status cell (E2E/Smoke/QA/health)
Each grid cell now renders a two-row readiness rollup:

  demo · code
  E2E ✓  Smoke ✓  QA 3d  ● up

Signals:
- E2E / Smoke — pass/fail + freshness (green <6h, amber older, red fail
  or no suite, gray when bundle itself is stale)
- QA — days since human sign-off (green <7d, amber <30d, red otherwise
  or never)
- Health — live probe dot (up/down/unknown)

Cells with no demo show a single centered ✗ (unsupported) or `—`
(supported but no demo yet). Client-side staleness check: if
`status.json.generated_at` is older than 24h, every signal degrades
to a gray `?` and the header shows a stale-bundle warning — so a
failed cron visibly announces itself instead of silently serving
green badges.

Data layer (`src/lib/status.ts`) is a single source of truth for the
badge color/label logic. The cell component is pure presentation.

Status data is currently mock (deterministic per slug+demo) so the
visuals can be reviewed; the CI/Notion/health-probe pipeline that
writes the real `status.json` is out of scope for this commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 09:24:56 -07:00
Atai Barkai e44afa29d6 fix(showcase): per-demo backend file scoping in the code viewer
Problem: shell's /code viewer was showing every `.py` file under
`src/agents/` for every demo of a package. Visually contaminating:
opening gen-ui-tool-based (Controlled Gen-UI Display) showed
a2ui_dynamic, a2ui_fixed, mcp_apps_agent, open_gen_ui_agent,
reasoning_agent, interrupt_agent, and tool_rendering_agent in the
file picker even though none of them are relevant to that demo.

Root cause: `bundle-demo-content.ts` ran `discoverBackendFiles()` once
per package and attached the same union of all agent files to every
demo. This was fine when all demos shared one graph, but since we
split demos into dedicated graphs the bundle stopped matching reality.

Fix:
- `manifest.schema.json`: add optional `backend_files` field per demo
  (string array, paths relative to the package root).
- `bundle-demo-content.ts`: when `demo.backend_files` is present, bundle
  exactly those. Otherwise fall back to the legacy full-package scan
  so packages that haven't adopted the field still work as before.
- `langgraph-python/manifest.yaml`: populate `backend_files` for every
  demo. Each demo bundles `src/agent_server.py` plus only the agent
  file its graph routes to (main.py for shared-graph demos;
  reasoning_agent.py / interrupt_agent.py / a2ui_dynamic.py /
  a2ui_fixed.py / mcp_apps_agent.py / open_gen_ui_agent.py /
  tool_rendering_agent.py for demos with dedicated graphs).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 09:10:27 -07:00
Atai Barkai 3332928321 refactor(showcase/langgraph-python): extract view components per demo
Review pass across all 18 langgraph-python demo columns. For each
demo, verified strict minimality (no cross-contamination from other
features) and extracted any inline view JSX >= 15 lines into dedicated
sibling files. All 18 demos validated end-to-end via Playwright
screenshot + visual review.

View components extracted to dedicated files:

- `a2ui-fixed-schema/flight-card.tsx` + `catalog.ts`
- `agentic-chat-reasoning/reasoning-block.tsx`
- `chat-slots/custom-welcome-screen.tsx`, `custom-assistant-message.tsx`,
  `custom-disclaimer.tsx`
- `gen-ui-agent/InlineAgentStateCard.tsx`
- `gen-ui-interrupt/InterruptCard.tsx`
- `headless-complete/message-list.tsx`, `user-bubble.tsx`,
  `assistant-bubble.tsx`, `input-bar.tsx`, `typing-indicator.tsx`
- `hitl-in-chat/approval-card.tsx`
- `open-gen-ui/sandbox-functions.ts`, `suggestions.ts`
- `tool-rendering/weather-card.tsx`

Backend fixes:

- `mcp_apps_agent.py`: tighten system prompt to prevent the LLM from
  hallucinating unrelated framework names in its reply.
- `open_gen_ui_agent.py`: short-circuit subsequent runs when a
  `ToolMessage` is already in state. `generateSandboxedUi` is
  registered with `followUp: true` by the provider, which caused the
  agent to re-emit the tool call in a loop after each sandbox handler
  response.

`agentic-chat/README.md`: removed stale references to tools that no
longer exist in the minimized demo.

Regenerated `shell/src/data/demo-content.json`.

Each demo's page.tsx is now pure composition; presentational code lives
in dedicated sibling files. Zero cross-contamination between demos
(audited via grep for forbidden-feature imports).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 06:55:36 -07:00
Atai Barkai 938dde15f4 chore(showcase): move Reasoning under Generative UI + rename
- Move `agentic-chat-reasoning` from `chat-ui` category to
  `generative-ui`, positioned after `tool-rendering`.
- Rename display "Agentic Chat (Reasoning)" -> "Reasoning".
- Update langgraph-python manifest demo entry's name, description,
  and tag to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 06:27:32 -07:00
Atai Barkai dabd936727 chore(showcase): remove phantom mobile/web-framework rows from registry
These 7 feature ids had zero manifest references, zero demo dirs, and
zero matching packages backing them in the showcase. They added noise
to the feature matrix without carrying substance:

- mobile-react-native
- mobile-swiftui
- mobile-android
- web-svelte
- web-vue
- web-tanstack — conceptually misplaced anyway; TanStack Start is a
  React meta-framework, not a React alternative
- web-angular — `packages/angular/` exists as a published SDK, but the
  showcase has zero integration for it. Angular support is really its
  own matrix/story; removing this placeholder row until there's a real
  showcase integration.

Also drops the `mobile` and `web-frameworks` categories now that they
have no members. Regenerates registry.json + constraints.json.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 06:24:53 -07:00
Atai Barkai 10e6922dc9 chore(showcase): regenerate registry + demo-content bundle
Generated via `generate-registry.ts` and `bundle-demo-content.ts` from
the new manifest + feature-registry + demo sources.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 05:48:09 -07:00
Jordan Ritter 150bb151aa fix(showcase-docs): add TailoredContent component + harden upstream (#4056)
## Summary
Two showcase MDX files reference `<TailoredContent>` +
`<TailoredContentOption>` from
`@/components/react/tailored-content.tsx`, but the component file was
missing in showcase. This PR:

- Adds `showcase/shell/src/components/react/tailored-content.tsx`
(copied from upstream `docs/components/`)
- Inlines a tiny `cn()` helper to avoid pulling `classnames` into
showcase/shell deps
- Hardens BOTH copies (docs + showcase, kept byte-identical) against
real bugs found in CR review

## Bugs fixed in TailoredContent (both copies)
- **Build-breaker:** `useSearchParams()` in Next.js 14+ App Router
requires `<Suspense>` wrapper or `next build` fails. Added internal
Suspense wrapper so consumers don't need to add one.
- **State/URL desync:** `selectedIndex` was stored in useState
initialized once — back/forward nav didn't update. Now derived from
`searchParams` each render.
- **Keyboard a11y broken:** `role="tab"` + `tabIndex={0}` with no
keyboard handler. Added standard ARIA tab pattern: `role="tablist"`,
`role="tabpanel"`, Enter/Space to select, ArrowLeft/Right + Home/End to
navigate, roving tabindex.
- **`cloneElement` clobbered caller's icon className:** now merges via
`cn()`.
- **`TailoredContentOption` rendered `<div>` despite JSDoc saying "won't
render":** now returns `null`.
- **Unvalidated `defaultOptionIndex`:** clamped to `[0, options.length -
1]`.
- **Empty options silently produced broken UI:** now `return null`
(hooks-rules-safe; no throw mid-render).
- **Duplicate option IDs silently collided:** `console.warn` in dev mode
(via `useEffect`, not render body).
- **Hooks rules violation:** conditional hook ordering under state
changes (fixed by running all hooks unconditionally).
- **Side effects during render:** `console.warn` mutation moved to
`useEffect`.
- **`options`/`optionIds` unstable identities:** memoized via `useMemo`.

## Known remaining (non-blocking)
- The 2 copies of `tailored-content.tsx` must be kept in sync manually.
Proper fix is a shared package — out of scope for this PR.
- Stale `searchParams` race on rapid concurrent clicks across multiple
TailoredContent widgets on the same page (pre-existing upstream).
- `useMemo([children])` is ineffective since React.Children identity
changes per parent render (minor perf).

## Test plan
- [ ] CI green
- [ ] showcase-shell builds without Suspense errors
- [ ] Visit docs pages with `<TailoredContent>` — tabs render, keyboard
nav works, URL reflects selection
2026-04-17 22:29:43 -07:00
Jordan Ritter c8276ee923 feat(showcase): internal feature-matrix shell + canonical demo/code routes (#4039)
## Summary

Adds a new internal-facing showcase app — `showcase/shell-internal` —
that renders a **feature × integration grid**. Each cell links to one of
two new **canonical standalone routes** on the main `shell` app, or
shows a red ✗ when the feature isn't supported.

## What's new

### 1. Two canonical standalone routes in `showcase/shell`

These give every (integration × feature) pair a single, embeddable URL
for each artifact — useful for docs, marketing, and tooling.

- **`/integrations/[slug]/[demo]/preview`** — iframe-only hosted demo,
no chrome
- **`/integrations/[slug]/[demo]/code`** — code viewer only. Supports
URL params for future refinements:
  - `?file=<filename>` — which file tab to show
  - `?lines=10-20` or `?lines=10-20,35` — highlight specific line ranges

Example:
`/integrations/langgraph-python/agentic-chat/code?file=page.tsx&lines=15-22`

### 2. `showcase/shell-internal` — a new Next.js app on port 3002

- Single grid page: **rows = features**, **columns =
integrations/frameworks** (transpose of shell's existing `/matrix` page,
which has integrations as rows)
- Each cell has **two mini-links** — green `▶ demo` and blue `</> code`
— pointing at the canonical `shell` routes, or a red `✗` if not
supported
- Reads `showcase/shell/src/data/registry.json` directly via relative
import — single source of truth, no duplicate data
- `NEXT_PUBLIC_SHELL_URL` env var (default `http://localhost:3000`) to
point the cells at a deployed `shell` in non-local environments

### 3. Small fix: drop `--turbopack` from shell's dev script

`showcase/shell`'s Next.js 15.4.10 turbopack panics (`"Next.js package
not found"`) on this repo's multi-lockfile layout. Switching to webpack
dev resolves it; production builds (which don't use turbopack) are
unaffected.

## Why two apps instead of one

`shell-internal` could have hosted the demo and code pages itself, but
keeping them in `shell`:

- Makes the canonical URLs reusable outside internal ops (docs,
marketing, linking into product)
- Avoids duplicating the demo-rendering and code-viewer plumbing across
two apps

Internal shell stays a pure overview.

## Test plan

- [ ] `cd showcase/shell && npm run dev` — confirm shell starts on :3000
(webpack, no turbopack panic)
- [ ] `cd showcase/shell-internal && npm install && npm run dev` —
confirm shell-internal starts on :3002
- [ ] Open http://localhost:3002 — verify the feature × integration grid
renders
- [ ] Click a `▶ demo` cell — verify it opens
`http://localhost:3000/integrations/<slug>/<feature>/preview` with only
the iframe demo
- [ ] Click a `</> code` cell — verify it opens
`http://localhost:3000/integrations/<slug>/<feature>/code` with the code
viewer
- [ ] In the code route, try `?file=<name>` and `?lines=10-20` URL
params — verify file switches and lines highlight
- [ ] Verify red ✗ shows for unsupported (integration × feature)
combinations

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-04-17 19:18:59 -07:00
Martha Kelly Schumann e14b1cc487 docs-sync(needs-review): sync from main (3b8e457a1) [NEEDS REVIEW] (#4051)
⚠️ **Docs sync — MANUAL REVIEW REQUIRED**

This PR was auto-opened because the docs-sync script detected
showcase-local modifications overlapping with upstream changes.

The script attempted a best-effort 3-way merge:

- Where `git merge-file` produced a clean merge, the merged content was
written.
- Where `git merge-file` produced conflict markers, **upstream content
was written as-is** and showcase-local modifications were overridden.
**Manual review required.**

### Review items

```
Files where 3-way merge FAILED — upstream content written as-is, local modifications overridden. Manual review REQUIRED before merging this PR:
  - docs/content/docs/integrations/agent-spec/quickstart.mdx
  - docs/content/docs/integrations/aws-strands/generative-ui/state-rendering.mdx

Files auto-merged via 3-way merge (clean, no conflict markers — still worth a glance):
  - docs/content/docs/integrations/aws-strands/shared-state/in-app-agent-read.mdx
```

### Source

- Upstream ref:
[`3b8e457a1`](https://github.com/CopilotKit/CopilotKit/commit/3b8e457a1)
- Workflow run:
https://github.com/CopilotKit/CopilotKit/actions/runs/24593085026

**Review before merging.** Auto-merge is intentionally disabled
for `needs-review` PRs — confirm the upstream-wins sections
preserve any intentional showcase-local divergence you want to
keep, then merge manually.
2026-04-17 18:45:47 -07:00
claudebot ef78561281 Apply PR #3710 2026-04-17 18:36:05 -07:00
github-actions[bot] 930c10fb26 style: auto-fix formatting 2026-04-18 01:34:14 +00:00
Jordan Ritter 10c24ff1d7 fix(tailored-content): obey hooks rules, move warn to effect, memoize derived arrays 2026-04-17 18:32:12 -07:00