Repository navigation
Finish the grid: #4085 + shell platform restructure (shell-docs, shell-dashboard, shell-dojo) - #4109
Merged
Merged
Conversation
Adds rows for the demos being built in this branch: - Split `chat-prebuilt` into `prebuilt-chat`, `prebuilt-sidebar`, `prebuilt-popup` (CopilotChat / CopilotSidebar / CopilotPopup). - Reorder `generative-ui` rows and add: `hitl-in-chat` (In-Chat HITL), `gen-ui-interrupt`, `declarative-gen-ui` (Dynamic Schema), `a2ui-fixed-schema` (new), `mcp-apps`, `open-gen-ui`, `gen-ui-agent`, `tool-rendering`. - `constraints.yaml`: expand `constrained-explicit` allowlist so the langgraph-python manifest validates against the new feature ids. - Bump expected langgraph-python feature/demo count in `generate-registry.test.ts` from 10 -> 22 to match the manifest. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…for demo fleet
- manifest.yaml: add 12 new demo entries (chat-slots, headless-simple,
headless-complete, agentic-chat-reasoning, hitl-in-chat,
gen-ui-interrupt, declarative-gen-ui, a2ui-fixed-schema, mcp-apps,
open-gen-ui, prebuilt-chat/sidebar/popup).
- langgraph.json: register dedicated graphs for demos that need a
non-default backend (tool_rendering, interrupt_agent, reasoning_agent,
a2ui_dynamic, a2ui_fixed, mcp_apps, open_gen_ui).
- route.ts: register each new agent name; demos with dedicated graphs
are mapped explicitly outside the shared-graph loop. A2UI runtime
middleware scoped to `declarative-gen-ui` + `a2ui-fixed-schema` so
non-A2UI demos keep their `useComponent` renderers intact. MCP Apps
middleware wraps only the `mcp-apps` agent and synthesizes an
`ACTIVITY_SNAPSHOT` event when the backend `show_mcp_app` tool fires.
- New `/api/copilotkit-ogui/route.ts`: dedicated isolated runtime for
the `open-gen-ui` demo. `openGenerativeUI: {...}` advertises the
`openGenerativeUIEnabled` flag globally on the probe response, which
causes the CopilotKit provider's setTools effect to wipe per-demo
`useFrontendTool`/`useComponent` registrations; isolating to its own
endpoint keeps the default runtime clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Minimal demo pages covering the Chat & UI category: - `agentic-chat/page.tsx` — stripped to pure chat (CopilotKit + CopilotChat, single "Write a sonnet" suggestion). No tool calls. - `chat-slots/page.tsx` — three slot overrides: custom welcome screen, custom disclaimer (input sub-slot), and a custom assistant message bubble so the slot is visible during active chat. - `headless-simple/page.tsx` — bare-bones custom chat built on `useAgent` (no CopilotChat) + a single `useComponent` for inline card rendering. - `headless-complete/page.tsx` — fuller custom chat: scrollable message list, user/assistant bubbles, auto-scroll, disabled state while running, inline tool-call rendering, cancel button. - `agentic-chat-reasoning/page.tsx` — custom `messageView.reasoningMessage` slot renders an amber "Reasoning" block when the agent emits `role: "reasoning"` messages. - `prebuilt-chat/page.tsx` — minimal `<CopilotChat />`. - `prebuilt-sidebar/page.tsx` — dummy main content + `<CopilotSidebar />` (defaultOpen). - `prebuilt-popup/page.tsx` — dummy main content + `<CopilotPopup />` (defaultOpen). Each outer function wraps provider + layout; inner `Chat` holds only the registrations for that demo's feature. No cross-contamination (no a2ui/HITL/interrupt/tool-rendering in demos that don't demonstrate them). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ends Minimal frontends + minimal dedicated langgraph graphs for each Generative UI / interactivity demo: - `hitl-in-chat/` — `useHumanInTheLoop` confirm-destructive-action flow; shared `sample_agent`. - `gen-ui-interrupt/` + `interrupt_agent.py` — `ask_confirmation` tool that calls langgraph `interrupt()`; frontend uses `useInterrupt` with `renderInChat: true`. - `declarative-gen-ui/` + `a2ui_dynamic.py` — emits A2UI `a2ui_operations` at runtime; frontend uses `createA2UIMessageRenderer`. - `a2ui-fixed-schema/` + `a2ui_fixed.py` — `search_flight` tool emits A2UI ops against a client-side fixed `FlightCard` catalog. - `mcp-apps/` + `mcp_apps_agent.py` — `show_mcp_app` stub tool; the TS `MCPAppsStubMiddleware` in route.ts synthesizes the activity + handles the `__proxiedMCPRequest` round-trip with a pre-baked HTML resource. - `open-gen-ui/` + `open_gen_ui_agent.py` — dispatches `copilotkit_manually_emit_tool_call` for `generateSandboxedUi`; frontend uses `openGenerativeUI` runtime config on the isolated `/api/copilotkit-ogui` endpoint. - `gen-ui-agent/page.tsx` — `useAgent` + `messageView.children` slot; inline agent-state card between messages and interrupts. - `tool-rendering/page.tsx` + `tool_rendering_agent.py` — `get_weather` backend tool; `useRenderTool` renders a weather card inline. - `reasoning_agent.py` — dedicated graph that manually streams a reasoning chunk via a synthetic `BaseChatModel` before delegating to gpt-4o-mini, so the v2 `messageView.reasoningMessage` slot populates reliably regardless of the underlying model. Each demo touches only its own feature's hooks/components. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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) <[email protected]>
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) <[email protected]>
- 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) <[email protected]>
Parallel review subagents each need a fresh showcase-langgraph-python build to screenshot. Running `dev-local.sh up langgraph-python` N times in parallel serializes on Docker and wastes time rebuilding identical source. `scripts/agent-notes/rebuild-coord.sh` aligns rebuild attempts to a 30-second clock tick with 0-5s jitter. First agent on a tick acquires a `mkdir`-based lock, rebuilds, and writes a per-tick done marker at `/tmp/showcase-rebuild.done-<tick>`. Peers on the same tick skip their own build and wait up to 30s for that marker. If no marker appears, they retry the next tick (up to 3 ticks). Agents call `bash scripts/agent-notes/rebuild-coord.sh` instead of `./scripts/dev-local.sh up langgraph-python` when they need the live container refreshed. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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) <[email protected]>
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) <[email protected]>
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) <[email protected]>
- 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) <[email protected]>
…l 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) <[email protected]>
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) <[email protected]>
- a2ui_fixed: load schemas from JSON via a2ui.load_schema (schemas in src/agents/a2ui_schemas/); adds search_flight tool with airline + price - a2ui_dynamic: secondary-LLM bind_tools([render_a2ui], tool_choice=...) pattern; primary LLM only decides when to render - tool_rendering_agent: expand to 4 mock tools (get_weather, search_flights, get_stock_price, roll_dice) — shared by all 3 tool-rendering variants - interrupt_agent: port schedule_meeting(topic, attendee) time-picker interrupt payload Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…g, HITL time-picker, A2UI - tool-rendering: per-tool WeatherCard + FlightListCard + wildcard CustomCatchallRenderer (primary variant of 3) - NEW tool-rendering-default-catchall: no frontend renderers, relies on CopilotKit's built-in default catch-all - NEW tool-rendering-custom-catchall: single wildcard renderer via useDefaultRenderTool - NEW tool-rendering-frontend-tools: useFrontendTool defines get_weather client-side; render callback uses `args` (not `parameters`) - NEW chat-customization-css cell: page.tsx + scoped theme.css - hitl-in-chat: time-picker-card.tsx + page.tsx using useHumanInTheLoop with book_call + topic/attendee args - gen-ui-interrupt: time-picker-card.tsx + page.tsx using useInterrupt against the schedule_meeting interrupt payload - a2ui-fixed-schema: update page.tsx comment to point at new backend - Delete old hitl/ folder - Update api/copilotkit/route.ts to register new agent names Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
- 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) <[email protected]>
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) <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ll 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) <[email protected]>
…om 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) <[email protected]>
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) <[email protected]>
Port the 4084 internal-showcase-followups state of the shared showcase schema to 4085 (no Docker restructure): - feature-registry.json: new Dev Ex category, category reorder (Dev Ex → Chat & UI → Platform → Controlled → Declarative → Open → Operational → Interactivity → Agent State → Multi-Agent → BYOC); +8 new features (beautiful-chat, cli-start, interrupt-headless, reasoning-default-render, tool-rendering-reasoning-chain, open-gen-ui-advanced, declarative-gen-ui-hardcoded, readonly-state-agent-context); renames (shared-state-write → shared-state-read-write, shared-state-agent-readonly → readonly-state-agent-context); removals (shared-state-read, state-rendering, a2ui-*, shared-state-io, shared-state, readables, a2a-chat, deep-agents, vnext-chat, byoc-a2ui, byoc-tambo); gen-ui-agent → kind: testing. - constraints.yaml: allowlists updated to reference the new IDs. - manifest.schema.json: `route` is optional; `command` field added for informational demos (e.g. cli-start). - All 17 column manifests: shared-state-read removed, shared-state-write renamed to shared-state-read-write. - langgraph-python manifest: full 4084 features list + demos entries with 4085-appropriate highlight paths (src/agents/*.py + src/app/demos/<cell>/* rather than backend/ + frontend/). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Port the 4084 scripts-layer enhancements so 4085's showcase toolchain
matches the new feature shape:
- lib/manifest.ts: ManifestDemo gains optional `command` field; parser
accepts + validates it (non-empty string, frozen).
- bundle-demo-content.ts: inline `@region[name]` / `@endregion[name]`
comment-marker extraction; informational-only demos (no route, e.g.
cli-start) are skipped; markers stripped from bundled content;
regions: { file, startLine, endLine, code, language } emitted per
demo. External-highlight-file merging (4085-specific) preserved, so
backend agents under src/agents/*.py still flow into the bundle.
- validate-parity.ts: accepts demos at BOTH demos/<cell>/ (4084 layout)
and src/app/demos/<cell>/ (4085 layout); informational demos
(command field) are excluded from the parity audit.
- tests: bundle-demo-content.test.ts expectedDemos updated for the
shared-state rename; generate-registry.test.ts feature count 25→32;
validate-parity.test.ts missing-demo-dir message updated to match
the new dual-location wording.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Port the 4084 simplification of the status generator: remove the MOCK_VARIANTS seeding table + mockVariantTest / mockVariantQA / mockVariantHealth helpers + Variant type. Informational demos (no route) are skipped from health probing. The status JSON no longer carries per-demo `variants[]` — the shell-internal dashboard renders one row per demo without variant expansion. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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) <[email protected]>
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) <[email protected]>
Ports 4084 backend agents for shared-state-streaming, subagents, and headless-complete into 4085's consolidated src/agents/ layout, registers the new graphs in langgraph.json, wires them into the main and copilotkit-mcp-apps routes. - shared_state_streaming: StateStreamingMiddleware write_document tool - subagents: supervisor + research/writing/critique sub-agents with delegation log shared state - headless-complete: get_weather + get_stock_price + MCP Apps routing; routed through /api/copilotkit-mcp-apps to match 4084 pedagogy Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…tead of sample_agent fallthrough Before this commit, main.py carried the Tool-Based Generative UI chart system prompt, and a long list of cells (agentic-chat, frontend-tools, gen-ui-agent, tool-rendering-frontend-tools, gen-ui-tool-based) fell through to that graph — so they all inherited the wrong "data visualization assistant" prompt. Split each cell into its own dedicated graph, mirroring 4084's per-cell backends. main.py is now a neutral "helpful, concise assistant" used only by UI/chrome demos (prebuilt-sidebar, chat-slots, headless-simple, beautiful-chat, prebuilt-chat, etc.). - agentic_chat, frontend_tools, gen_ui_agent: neutral variants with minor system-prompt tweaks from 4084 - tool_rendering_frontend_tools: weather-assistant prompt; frontend owns the tool via useFrontendTool - gen_ui_tool_based: chart-viz system prompt (moved out of main.py) Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…lt-chat wiring - mcp-apps page.tsx: route through /api/copilotkit-mcp-apps (split runtime that has Excalidraw MCP wired) and drop the manual useRenderActivityMessage + renderActivityMessages registration — CopilotKitProvider auto-registers MCPAppsActivityRenderer; plain <CopilotChat /> is enough. Replace generic suggestions with 4084's Excalidraw-specific ones. - a2ui-fixed-schema page.tsx: fix the stale `./catalog` import to `./a2ui/catalog`, and delete the orphaned top-level catalog.ts + flight-card.tsx (the authoritative versions live under ./a2ui/). - prebuilt-chat: add to features list + demos list in manifest.yaml so the shell surfaces it (runtime wiring already landed in the previous commit as a neutral-assistant cell). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced Apr 21, 2026
Closed
jpr5
added a commit
that referenced
this pull request
Apr 21, 2026
## Summary Tech-debt follow-up to #4109. This PR fixes a batch of production-relevant issues across the shell-docs runtime, the shared showcase deploy workflow, and the content bundler scripts — MDX rendering correctness, XSS hardening on author-controlled sinks, UI component invariants under edge cases, route-level content handling, and CI reliability. ## Why #4109 restructured shell-docs and landed a lot of new shared surface area. Reviewing that landing surfaced real bugs that weren't in scope to fix inline: Slack failure alerts that silently never posted, MDX regex bugs that mangled nested `<Tabs>`, XSS vectors via `javascript:` hrefs, iframe sandboxes that negated themselves, undeployed integrations rendered as clickable dead links, a framework-selector that trapped users in redirect loops, and a few bundler correctness bugs that produced captions pointing at the wrong file. All of it is user-visible or deploy-visible, so none of it can stay deferred. ## What changed ### CI workflow (`showcase_deploy.yml`) Hygiene on the shared deploy pipeline so failures are reported and concurrent runs don't race. - Slack failure notification was gated on a step-local `env:` it couldn't read from its own `if:`, so alerts never posted. Promoted `SLACK_WEBHOOK_URL` to job-level env. - Concurrency group included the service name, so a push event and a manual `workflow_dispatch service=all` run could race on the same Railway service. Dropped the suffix. - Shared-module copy step ran for every service context and polluted build contexts for shell-family services that already have the full repo. Scoped to a `showcase/packages/*` allowlist. - `shell-dashboard` and `shell-docs` path filters didn't watch `showcase/shared/**` or `showcase/scripts/**`, so shared-code changes rebuilt `shell` but not its siblings. Extended the filters. - Dropped a redundant `fromJSON()` on an already-numeric matrix value and a dead `HTTP_CODE="000"` sentinel. ### MDX renderer correctness (`showcase/shell-docs/src/lib/docs-render.tsx` + friends) Regex and rendering bugs that either mangled output or opened XSS holes. - `convertTablesInJSX` used non-backref alternation on close tags, and JS alternation is leftmost-first — so `<Tabs>…</Tab>` closed the outer container with the inner tag. Added a backref and sorted the tag alternation longest-first. - `inlineSnippets` matched `components=` props with `[^}]*`, truncating doubled-brace MDX object literals. Replaced with an explicit `\{\{…\}\}` match. - Frontmatter H1 fallback ran against the raw file including the YAML block, so a `# comment` line inside frontmatter could become the page title. Moved the match to `matter(raw).content` and surfaced the previously-silent parse catch as a log. - XSS: `<A>` and `<Link>` rendered any href scheme verbatim, making `javascript:` / `data:text/html` a live vector from MDX. Added a scheme allowlist; unsafe schemes render as inert text. - Iframe sandboxes in `InlineDemo`, `IframeSwitcher`, and `YouTubeVideo` combined `allow-scripts` with `allow-same-origin`, which per MDN lets the iframe remove its own sandbox. Dropped `allow-same-origin`. - `<InlineDemo>` piped registry `backend_url` into `src` without running it through `validateIframeSrc` like the other iframe sinks do. Harmonized. - `<img>` and `<video>` style-prop handling spread caller props and then clobbered `style` wholesale, dropping author-supplied keys. Now merges, with component-enforced layout overrides winning. - `docs-page-view` rendered the FM title as an `<h1>` and then let the MDX body's duplicate `# Title` render again, producing stacked H1s. Strips the body H1 only when it matches the FM title after whitespace normalization; CRLF-safe. ### Component invariants Tabs, framework-tabs, framework-provider, framework-selector — edge cases around duplicate labels, mismatched lengths, and stale state. - `docs-tabs` picked the active panel via `.filter(label === active)`, which double-rendered on duplicate labels and blanked out when `items` length diverged from children. Replaced with a positional `findIndex` so pairing is strictly by index. - `framework-tabs` paired `frameworks[i]` with children by index; a child rendering null shifted the array and every subsequent tab showed the wrong framework's content. Added a count-mismatch guard with dev warn. Seeded `active` only at mount, so swapping `frameworks` left it stale — added a re-sync effect. Removed never-consumed `cell`/`region` interface props. - `framework-provider` hydrated `stored` from localStorage without validating against the registry, so a stale slug (framework removed from registry) kept redirecting users to a dead route. Added the same `knownFrameworks.includes(...)` check used elsewhere, including the cross-tab `storage` handler. - `framework-selector` dropdown rendered undeployed options as clickable; clicking persisted the undeployed slug and `router.replace`'d into a dead route, trapping users in a `RouterPivot` redirect loop. Gated undeployed options with `disabled`, aria, and a click-handler guard. ### Route-level content handling Ag-ui page, docs root, framework route, reference route, brand-nav — duplicate H1s, stale sidebars, dead links, wrong cross-links. - `ag-ui/[[...slug]]` H1 strip wasn't CRLF-safe and unconditionally removed the first body H1 even when it didn't match the FM title (silent content loss). Now extracts body H1 separately and strips only on whitespace-normalized match. - `readTitleForSlug` only read `${slug}.mdx`, but the page handler already falls back to `${slug}/index.mdx`. Sidebar titles drifted from actual page content. Mirrored the page handler's precedence. - Docs overview integration grid rendered undeployed integrations as active `<Link>`s, handing users dead-link cards. Undeployed now render as non-link `<div>` with preserved visual treatment. Also filtered `findFrameworksWithCell` and `previewUrl` derivation to `deployed === true`. - `[framework]/[[...slug]]` alternative-framework banner pulled from all integrations unfiltered; `slice(0, 3)` could pad with undeployed. Filtered before slice. - `reference/[...slug]` fallback `<h1>` showed the raw hyphenated slug while the breadcrumb was `titleCase`d. Wrapped the fallback too. Added an `index.mdx` route fallback matching `loadDoc`'s convention. - `brand-nav` mobile menu's cross-brand link was hardcoded to `/ag-ui`, so on an ag-ui page the link pointed at itself. Now branches on `activeBrandFromPath()`. ### Error boundary The log effect re-fired on every render because the `error` object identity is fresh each pass, filling console with duplicate reports. Dep array now tracks `error.message` + `error.digest` (stable strings); the raw `error` is still passed through in the body for stack preservation. ### Bundler scripts (`bundle-demo-content.ts`, `reference-items.ts`) Correctness and platform parity. - Multi-file regions (same region name in multiple files) kept the first file's span while appending code from all contributors — the caption said `foo.tsx · L5–L20` while showing content from elsewhere. Track contributors per region; relabel `file` to `(multiple: a, b, c)` when more than one. - Same-file multi-slice regions never extended `endLine`, so captions under-reported the span. - `fs.watch({ recursive: true })` is silently ignored on Linux; watch mode claimed to be watching while missing nested edits. Added a loud startup warning on Linux. - Watch-mode path filter used forward slashes only, so on Windows `fs.watch`'s backslashed paths matched no directory pattern. Normalized before testing. - `walkMdx` emitted `<parent>/index` for `parent/index.mdx`, inconsistent with `loadDoc`'s collapsing to `parent`. Collapsed, and added a collision guard preferring the flat file when `parent.mdx` also exists. ### Regenerated `demo-content.json` Both the shell and shell-docs bundles, carrying the new `(multiple: ...)` caption format and previously-stale committed state. ## Test plan - [ ] Local typecheck passes on `showcase/shell-docs` and `showcase/scripts` - [ ] CI matrix green (Python, Vercel previews, check-binaries, format, oxlint, package-quality, unit 20/22/24, commitlint) - [ ] Manual spot-check: MDX pages with nested `<Tabs>` render correctly (no stranded close tags) - [ ] Manual spot-check: framework-selector dropdown — undeployed entries are disabled - [ ] Manual spot-check: docs overview page — undeployed integration cards are non-clickable - [ ] Manual spot-check: trigger showcase_deploy on a path-filter test change touching `showcase/shared/**` — confirm shell, shell-dashboard, AND shell-docs rebuild
2 tasks
jpr5
added a commit
that referenced
this pull request
Apr 21, 2026
…ync, FRONTEND-STRATEGY, INTEGRATION-CHECKLIST SoT (Bundle 5)
- showcase/TESTING.md (new) — canonical testing matrix across showcase surfaces
- showcase/aimock/README.md (new) — aimock fixture-sync docs
- showcase/FRONTEND-STRATEGY.md (new) — multi-shell transition rationale; uses
current shell names (shell, shell-dojo, shell-docs, shell-dashboard); no
shell-dojolike references remain
- showcase/INTEGRATION-CHECKLIST.md — adds two novel sections:
* Source of Truth: examples/integrations vs showcase/packages
* LangGraph: Prebuilt vs Node-Based
showcase/README.md from the sibling branch is intentionally NOT pulled — main's
post-#4109 version is canonical and has a different premise.
This was referenced Apr 21, 2026
jpr5
added a commit
that referenced
this pull request
Apr 21, 2026
…#4117) ## Summary - Docs Sync workflow has been failing since 2026-04-21 with `fatal: pathspec 'showcase/shell/src/content/' did not match any files` (exit 128) on the "Create PR for docs sync" step (example: run 24726678848). - The path was moved by the shell platform restructure (#4109, #4112) — the docs content now lives under `showcase/shell-docs/src/content/`, and the sync marker at `showcase/shell-docs/.docs-sync-sha`. The sync script (`showcase/scripts/sync-docs-from-main.ts`) already writes to those locations; only the workflow's `git add` was still referencing the old monolithic `showcase/shell/` path. - One-line path fix. ## Test plan - [ ] Verify yaml parses. - [ ] Confirm next docs-sync run succeeds end-to-end (opens a sync PR for the 11 pending review items from run 24726678848).
pull Bot
pushed a commit
to TheRakeshPurohit/CopilotKit
that referenced
this pull request
Apr 21, 2026
The "Showcase: Docs Sync" workflow has been failing with `fatal: pathspec 'showcase/shell/src/content/' did not match any files` since the shell platform restructure (CopilotKit#4109, CopilotKit#4112) split the monolithic `showcase/shell/` package into `showcase/shell-docs/`, `showcase/shell-dashboard/`, and `showcase/shell-dojo/`. The sync-docs-from-main.ts script already writes to `showcase/shell-docs/src/content/` and maintains the sync marker at `showcase/shell-docs/.docs-sync-sha`. Update the "Create PR for docs sync" step to stage from the new location so the workflow can commit synced content again.
jpr5
added a commit
that referenced
this pull request
Apr 21, 2026
…ync, FRONTEND-STRATEGY, INTEGRATION-CHECKLIST
- showcase/TESTING.md (new) — canonical testing matrix across showcase surfaces
- showcase/aimock/README.md (new) — aimock fixture-sync docs
- showcase/FRONTEND-STRATEGY.md (new) — multi-shell transition rationale; uses
current shell names (shell, shell-dojo, shell-docs, shell-dashboard); no
shell-dojolike references remain
- showcase/INTEGRATION-CHECKLIST.md — adds two novel sections:
* Source of Truth: examples/integrations vs showcase/packages
* LangGraph: Prebuilt vs Node-Based
showcase/README.md from the sibling branch is intentionally NOT pulled — main's
post-#4109 version is canonical and has a different premise.
jpr5
added a commit
that referenced
this pull request
Apr 22, 2026
…ync, FRONTEND-STRATEGY, INTEGRATION-CHECKLIST
- showcase/TESTING.md (new) — canonical testing matrix across showcase surfaces
- showcase/aimock/README.md (new) — aimock fixture-sync docs
- showcase/FRONTEND-STRATEGY.md (new) — multi-shell transition rationale; uses
current shell names (shell, shell-dojo, shell-docs, shell-dashboard); no
shell-dojolike references remain
- showcase/INTEGRATION-CHECKLIST.md — adds two novel sections:
* Source of Truth: examples/integrations vs showcase/packages
* LangGraph: Prebuilt vs Node-Based
showcase/README.md from the sibling branch is intentionally NOT pulled — main's
post-#4109 version is canonical and has a different premise.
jpr5
added a commit
that referenced
this pull request
Apr 22, 2026
…dening (#4064) Rebased onto `feat/showcase-ops`. 10 commits, ~210 files, +8,200 / -2,150 (approximate — see `git log`). ## Summary Omnibus cleanup on top of `feat/showcase-ops`: QA parity, `interrupts-langraph` → `interrupts-langgraph` typo rename, `hitl` → `hitl-in-chat` catalog id rename, showcase documentation pass, workflow filename standardization, plus hardening across showcase scripts, shell components, and the LangGraph interrupts starter. ## Scope ### Bundle 0 — QA markdown parity (15 packages) Stubs so every package has checklists for all 9 demos. Final inventory: 17 × 9 = 153 QA files. `langgraph-python` is intentionally excluded because it migrated its HITL demo into `hitl-in-chat` + `hitl-in-app` cells. ### Bundle 1 — `interrupts-langraph` → `interrupts-langgraph` typo rename Full directory rename plus internal Nx / pnpm / lockfile consistency. Starter published at 0.1.5 with dep bumps (`@types/node ^22.19.11`, `typescript ^5.9.3`, `zod ^3.25.76`, `@langchain/langgraph 1.1.5`, `@langchain/core ^1.1.26`) and hardening below. ### Bundle 2 — `hitl` → `hitl-in-chat` catalog id rename Catalog id renamed across 17 package manifests, shell registry, feature registry, constraints (YAML + JSON). QA markdown and e2e specs renamed. URL route `/demos/hitl` is intentionally retained (id vs route split documented in the validator). Exposed + fixed two real bugs in the legacy `hitl.spec.ts`: phantom `data-role="assistant"` selector (matched nothing), and an always-passing approval assertion. Rewrote per-package HITL README content across all 17 packages (was describing the wrong "warm sunset gradient" flow instead of StepSelector). ### Bundle 5 — Showcase documentation pass Four new / updated docs consolidated here, subsuming sibling PR #4021: - `showcase/TESTING.md` — canonical test-gating matrix across every testing workflow, now using the `test_<layer>-<target>` names from Bundle 6 - `showcase/aimock/README.md` — aimock fixture-sync docs - `showcase/FRONTEND-STRATEGY.md` — multi-shell consolidation rationale; inventory table uses current shell names (`shell`, `shell-dojo`, `shell-docs`, `shell-dashboard`). The sibling branch's `shell-dojolike` references were all audited and replaced - `showcase/INTEGRATION-CHECKLIST.md` — adds two new sections: - "Source of Truth: `examples/integrations/*` vs `showcase/packages/*`" - "LangGraph: Prebuilt vs Node-Based" `showcase/README.md` from the sibling branch is **not** pulled — main's post-#4109 version is canonical with a different premise. ### Bundle 6 — Workflow filename standardization Renames 7 testing workflows to the `test_<layer>-<target>` naming scheme with CI UI `name:` fields normalized to `test / <layer> / <target>`. Subsumes sibling PR #4020: - `e2e_dojo.yml` → `test_e2e-dojo.yml` - `e2e_examples.yml` → `test_e2e-legacy-v1.yml` - `showcase_aimock-e2e.yml` → `test_e2e-showcase-on-demand.yml` - `test_doc-examples.yml` → `test_integration-docs.yml` - `test_runtime-servers.yml` → `test_integration-runtime.yml` - `starter_deployed_smoke.yml` → `test_smoke-starter-deployed.yml` - `starter-smoke.yml` → `test_smoke-starter.yml` The 8th rename in the source branch (`showcase_smoke-monitor.yml` → `test_smoke-showcase-deployed.yml`) is **skipped** — `feat/showcase-ops` (#4113) deletes that workflow entirely in favor of runtime probes. For `test_e2e-showcase-on-demand.yml`, `git mv` uses main's current content (preserving 5 hardening commits for readiness probes, trust-gate layers, pip wheel fallback, and CR5–CR8 security fixes); only the `name:` field is pulled from the rename branch. Consumer references updated in `examples/e2e/AGENTS.md`, `showcase/QA-COVERAGE.md`, `showcase/TESTING.md`, `showcase/aimock/README.md`, `showcase/scripts/create-integration/index.ts`, and `showcase/scripts/__tests__/create-integration.test.ts`. ## Hardening ### `showcase/scripts/lib/manifest.ts` - Tagged-union `ParsedManifest` parser (`ok` / `missing` / `malformed{syntax|shape}` / `unreadable`) with deep-frozen output - `DemoId` branded type with smart constructor - `/demos/` route-prefix validation, empty-tail guard, duplicate-id detection - `backend_url` shape validation - `ENOENT` / `EACCES` discrimination via `statSync` ### `showcase/scripts/validate-parity.ts` - `routeToDirName` helper for id-vs-route resolution - 13-variant `PackageIssue` discriminated union, `deriveMessage` as single render source - Typed error classes (`ManifestMalformedError`, `ManifestUnreadableError`, `InvalidBaselineError`) - `ValidateParityExitCode` literal union taxonomy - `formatErrorChain` with cycle guard + depth cap - Per-slug crash isolation: one malformed manifest no longer aborts the batch - Cooperates with `feat/showcase-ops`'s `auditableDemos` filter (informational demos carrying a `command:` field are excluded from parity checks) ### `showcase/scripts/create-integration/index.ts` - Strict `parseArgs`: duplicate-flag rejection, `--slug` regex guard (path-traversal protection), `--name` character allowlist (XSS guard on generated JSX) - `probePath` `statSync`-based fs probe replacing all `existsSync` call sites - Feature registry elementwise validation - `updateWorkflows` exported for unit testing; uses `WORKFLOWS_DIR` constant - `showcase_drift-detection.yml` edit removed — superseded by the `showcase-ops` service's `aimock_wiring` / image-drift probes which enumerate services from Railway at runtime - Generated health/debug routes distinguish `unconfigured` (env unset) from `down` (reachable but error) - Smoke route `AbortSignal.timeout` classification (Node 18+ `TimeoutError`) - Fail-fast rejection of `--language dotnet` (no .NET generator branches exist) - Dropped invalid `X-Frame-Options: ALLOWALL` from generated `next.config.ts` ### `showcase/scripts/__tests__/create-integration.test.ts` - Hardening regression suite migrated off `execSync` + `CREATE_INTEGRATION_SKIP_WORKFLOWS` onto `runGenerator()` so every test writes entirely inside a per-suite tmpdir and never touches the real `packages/` tree - Direct-import coverage for `loadFeatureRegistry` failure modes (ENOENT / invalid JSON / shape-invalid) and `parseArgs` guard coverage ### `showcase/scripts/capture-previews.ts` - `CaptureResult` tagged union replacing boolean+optional shape - Strict `parseArgs`: hex/float/negative/zero `--concurrency` rejection, unknown flag rejection, duplicate-flag rejection - `readAllManifests` ENOENT/EACCES/EPERM discrimination - `execFileSync` replacing template-interpolated `execSync` (no shell injection) - Filtered empty-targets exit-nonzero - Response-timeout tagged as `CaptureFailure` - Renamed `hitl` → `hitl-in-chat` config key; parses manifest via shared `lib/manifest.ts` `parseManifest` instead of ad-hoc `YAML.parse` ### `showcase/shell/src/components/guided-flow.tsx` - `isGuidedAnswers` runtime type guard on localStorage payload (validates shape before trusting `JSON.parse` output; prior code did a blind `as GuidedAnswers` cast) - `StoredGuidedAnswers` accepts legacy `undefined` `language` from pre-language-field versions while the in-memory shape stays strict - `restoredRef` gate preventing persist effect from clobbering restored data on initial render - `persistWarnedRef` / `cleanupWarnedRef` warn-once refs for localStorage diagnostics - Module-load invariants throw on `FEATURE_OPTIONS`/`LANGUAGE_OPTIONS` drift from their maps - `FEATURE_MAP.tools` → `frontend-tools` (was `frontend-tools-sync` which doesn't exist in the catalog), `FEATURE_MAP.hitl` → `hitl-in-chat` ### `examples/v2/interrupts-langgraph` (new starter) - `ApprovalResumeSchema` zod validation at resume boundary (prevents silent fall-through to cancelled) - `isAIMessage` type predicate replacing unchecked cast - `shouldContinue` multi-tool-call routing (mixed frontend + backend batches) - `bindTools` presence guard replacing non-null `!` - Production `LANGGRAPH_DEPLOYMENT_URL` fail-fast at module load; dev warn-fallback - Production error-detail redaction in POST handler ### Infra - `lefthook.yml`: `lint-fix` scoped to staged files via `oxlint --fix` / `oxfmt --write` on `{staged_files}` (guarded against empty expansion), replacing monorepo-wide `pnpm run lint && pnpm run format` on every commit - `showcase/.gitignore`: `**/tsconfig.tsbuildinfo` + `packages/test-integration-tmp/` (fixture directory leaked by `create-integration.test.ts` when the suite is killed before cleanup) - Untracked 6 accidentally-committed `tsconfig.tsbuildinfo` files ## Base Rebased onto `feat/showcase-ops` (was `main`). Dropped paths that `feat/showcase-ops` or PR #4112 (`shell-docs` tech-debt) already addressed differently: - `showcase/shell/src/app/docs/[[...slug]]/page.tsx` — superseded by the `shell-docs` split in #4112 - `showcase/shell/src/content/docs/frontend-tools.mdx` / `human-in-the-loop.mdx` — don't exist on current main - `showcase/shell/src/data/{constraints,demo-content,registry}.json` — auto-generated; `feat/showcase-ops` has fresher generation - `showcase/shell-dojolike/*` — directory deleted upstream ## Test plan - [x] `pnpm -C showcase/scripts test` — 1095 tests green locally (21 files) - [x] `pnpm -F @copilotkit/showcase-ops test` — 261 tests green locally (24 files) - [x] `pnpm exec oxfmt --check` on all changed files — clean - [x] `pnpm exec oxlint` on all changed code files — 0 errors (pre-existing warnings, none new) - [x] `pnpm exec tsc --noEmit` on `showcase/shell-docs`, `showcase/scripts`, `showcase/ops` — clean - [x] YAML sanity: all 26 `.github/workflows/*.yml` parse - [ ] CI green on PR
zeekay
pushed a commit
to Dream-AI-4444/CopilotKit
that referenced
this pull request
Sep 11, 2026
…docs, shell-dashboard, shell-dojo) (CopilotKit#4109) ## Summary - Merges CopilotKit#4085 (Atai's no-docker-restructure feature port — merge-ready variant) as the primary base. - Renames `showcase/shell-internal/` → `showcase/shell-dashboard/` + provisions Railway service at `dashboard.showcase.copilotkit.ai`. - Renames `showcase/shell-dojolike/` → `showcase/shell-dojo/` + renames Railway service in place (domain unchanged). - Extracts MDX-docs infrastructure (`/docs`, `/[framework]`, `/ag-ui`, `/reference` + components, libs, content) from `showcase/shell/` into new standalone `showcase/shell-docs/` package; provisions Railway service at `docs.showcase.copilotkit.ai`; adds 301 redirects on shell for every moved route (including 17 per-framework slugs enumerated from `registry.json`). - Fixes `starter-langroid` `/api/health` 503 (sed stdout wrappers + readiness gate); adds red-green regression guards in `starter-consistency.test.ts`. ## DNS state - `dashboard.showcase.copilotkit.ai` CNAME → `6u9icvje.up.railway.app` — ✅ live in Route53. - `docs.showcase.copilotkit.ai` CNAME → `t6ge0qwv.up.railway.app` — pending Route53 add. ## Railway services - `showcase-shell-dashboard` (ID `4d5dfd74-be61-40b2-8564-b53b7dd4c15b`) — provisioned, image pending first deploy. - `showcase-shell-docs` (ID `7badfb8d-4228-414c-9145-b4026803714f`) — provisioned, image pending first deploy. - `showcase-shell-dojo` (ID `7ad1ece7-2228-49cd-8a78-bddf30322907`) — renamed from shell-dojolike; already live. ## Closes / supersedes - Supersedes CopilotKit#4084 (docker-restructure variant; preserved on `jpr5/ftg-shell-ops` for future consideration, not merged here). - True-merges CopilotKit#4085 via `--no-ff` — that PR auto-closes on this PR's merge. ## Known non-blockers - `/ag-ui/introduction` throws a server-component `onMouseEnter` runtime error on `next start`. Same issue exists in shell today — pre-existing, not a regression. Follow-up needed. - `showcase/shell-dojo` lacks `package-lock.json` and `.gitignore`; trivial follow-up for parity with siblings. - `search-modal` retains the flat `search-index.json` shape (not the extensible `{version:1, sources:[...]}` shape). Generator is the single point of change if multi-shell search is wanted later. - oxfmt has a pre-existing oscillation bug on 14 `.mdx` files with `<Steps>` structures; sidestepped by mirroring the existing `showcase/shell/src/content/**` ignore policy to the new `showcase/shell-docs/src/content/**` path. ## Test plan - [ ] CI green end-to-end (Validate Showcase, unit tests on 20/22/24, format, oxlint, commitlint, starter-smoke). - [ ] \`showcase_deploy.yml\` builds shell-dashboard + shell-docs images to GHCR and Railway pulls them successfully. - [ ] Add \`docs.showcase\` CNAME in Route53 (\`t6ge0qwv.up.railway.app\`) — without this, docs.showcase.copilotkit.ai won't resolve and Railway won't provision its TLS cert. - [ ] Verify \`dashboard.showcase.copilotkit.ai/\` returns 200. - [ ] Verify \`docs.showcase.copilotkit.ai/\` returns 200 and \`/langgraph-python/quickstart\` renders. - [ ] Verify \`showcase.copilotkit.ai/\` returns grid (200); \`/docs/foo\` 301s to \`docs.showcase.copilotkit.ai/foo\`; \`/react/foo\` 301s; \`/integrations\` and \`/matrix\` do NOT redirect. - [ ] \`starter-langroid\` redeploy via \`showcase-deploy\` workflow: \`/api/health\` returns 200.
zeekay
pushed a commit
to Dream-AI-4444/CopilotKit
that referenced
this pull request
Sep 11, 2026
(CopilotKit#4112) ## Summary Tech-debt follow-up to CopilotKit#4109. This PR fixes a batch of production-relevant issues across the shell-docs runtime, the shared showcase deploy workflow, and the content bundler scripts — MDX rendering correctness, XSS hardening on author-controlled sinks, UI component invariants under edge cases, route-level content handling, and CI reliability. ## Why CopilotKit#4109 restructured shell-docs and landed a lot of new shared surface area. Reviewing that landing surfaced real bugs that weren't in scope to fix inline: Slack failure alerts that silently never posted, MDX regex bugs that mangled nested `<Tabs>`, XSS vectors via `javascript:` hrefs, iframe sandboxes that negated themselves, undeployed integrations rendered as clickable dead links, a framework-selector that trapped users in redirect loops, and a few bundler correctness bugs that produced captions pointing at the wrong file. All of it is user-visible or deploy-visible, so none of it can stay deferred. ## What changed ### CI workflow (`showcase_deploy.yml`) Hygiene on the shared deploy pipeline so failures are reported and concurrent runs don't race. - Slack failure notification was gated on a step-local `env:` it couldn't read from its own `if:`, so alerts never posted. Promoted `SLACK_WEBHOOK_URL` to job-level env. - Concurrency group included the service name, so a push event and a manual `workflow_dispatch service=all` run could race on the same Railway service. Dropped the suffix. - Shared-module copy step ran for every service context and polluted build contexts for shell-family services that already have the full repo. Scoped to a `showcase/packages/*` allowlist. - `shell-dashboard` and `shell-docs` path filters didn't watch `showcase/shared/**` or `showcase/scripts/**`, so shared-code changes rebuilt `shell` but not its siblings. Extended the filters. - Dropped a redundant `fromJSON()` on an already-numeric matrix value and a dead `HTTP_CODE="000"` sentinel. ### MDX renderer correctness (`showcase/shell-docs/src/lib/docs-render.tsx` + friends) Regex and rendering bugs that either mangled output or opened XSS holes. - `convertTablesInJSX` used non-backref alternation on close tags, and JS alternation is leftmost-first — so `<Tabs>…</Tab>` closed the outer container with the inner tag. Added a backref and sorted the tag alternation longest-first. - `inlineSnippets` matched `components=` props with `[^}]*`, truncating doubled-brace MDX object literals. Replaced with an explicit `\{\{…\}\}` match. - Frontmatter H1 fallback ran against the raw file including the YAML block, so a `# comment` line inside frontmatter could become the page title. Moved the match to `matter(raw).content` and surfaced the previously-silent parse catch as a log. - XSS: `<A>` and `<Link>` rendered any href scheme verbatim, making `javascript:` / `data:text/html` a live vector from MDX. Added a scheme allowlist; unsafe schemes render as inert text. - Iframe sandboxes in `InlineDemo`, `IframeSwitcher`, and `YouTubeVideo` combined `allow-scripts` with `allow-same-origin`, which per MDN lets the iframe remove its own sandbox. Dropped `allow-same-origin`. - `<InlineDemo>` piped registry `backend_url` into `src` without running it through `validateIframeSrc` like the other iframe sinks do. Harmonized. - `<img>` and `<video>` style-prop handling spread caller props and then clobbered `style` wholesale, dropping author-supplied keys. Now merges, with component-enforced layout overrides winning. - `docs-page-view` rendered the FM title as an `<h1>` and then let the MDX body's duplicate `# Title` render again, producing stacked H1s. Strips the body H1 only when it matches the FM title after whitespace normalization; CRLF-safe. ### Component invariants Tabs, framework-tabs, framework-provider, framework-selector — edge cases around duplicate labels, mismatched lengths, and stale state. - `docs-tabs` picked the active panel via `.filter(label === active)`, which double-rendered on duplicate labels and blanked out when `items` length diverged from children. Replaced with a positional `findIndex` so pairing is strictly by index. - `framework-tabs` paired `frameworks[i]` with children by index; a child rendering null shifted the array and every subsequent tab showed the wrong framework's content. Added a count-mismatch guard with dev warn. Seeded `active` only at mount, so swapping `frameworks` left it stale — added a re-sync effect. Removed never-consumed `cell`/`region` interface props. - `framework-provider` hydrated `stored` from localStorage without validating against the registry, so a stale slug (framework removed from registry) kept redirecting users to a dead route. Added the same `knownFrameworks.includes(...)` check used elsewhere, including the cross-tab `storage` handler. - `framework-selector` dropdown rendered undeployed options as clickable; clicking persisted the undeployed slug and `router.replace`'d into a dead route, trapping users in a `RouterPivot` redirect loop. Gated undeployed options with `disabled`, aria, and a click-handler guard. ### Route-level content handling Ag-ui page, docs root, framework route, reference route, brand-nav — duplicate H1s, stale sidebars, dead links, wrong cross-links. - `ag-ui/[[...slug]]` H1 strip wasn't CRLF-safe and unconditionally removed the first body H1 even when it didn't match the FM title (silent content loss). Now extracts body H1 separately and strips only on whitespace-normalized match. - `readTitleForSlug` only read `${slug}.mdx`, but the page handler already falls back to `${slug}/index.mdx`. Sidebar titles drifted from actual page content. Mirrored the page handler's precedence. - Docs overview integration grid rendered undeployed integrations as active `<Link>`s, handing users dead-link cards. Undeployed now render as non-link `<div>` with preserved visual treatment. Also filtered `findFrameworksWithCell` and `previewUrl` derivation to `deployed === true`. - `[framework]/[[...slug]]` alternative-framework banner pulled from all integrations unfiltered; `slice(0, 3)` could pad with undeployed. Filtered before slice. - `reference/[...slug]` fallback `<h1>` showed the raw hyphenated slug while the breadcrumb was `titleCase`d. Wrapped the fallback too. Added an `index.mdx` route fallback matching `loadDoc`'s convention. - `brand-nav` mobile menu's cross-brand link was hardcoded to `/ag-ui`, so on an ag-ui page the link pointed at itself. Now branches on `activeBrandFromPath()`. ### Error boundary The log effect re-fired on every render because the `error` object identity is fresh each pass, filling console with duplicate reports. Dep array now tracks `error.message` + `error.digest` (stable strings); the raw `error` is still passed through in the body for stack preservation. ### Bundler scripts (`bundle-demo-content.ts`, `reference-items.ts`) Correctness and platform parity. - Multi-file regions (same region name in multiple files) kept the first file's span while appending code from all contributors — the caption said `foo.tsx · L5–L20` while showing content from elsewhere. Track contributors per region; relabel `file` to `(multiple: a, b, c)` when more than one. - Same-file multi-slice regions never extended `endLine`, so captions under-reported the span. - `fs.watch({ recursive: true })` is silently ignored on Linux; watch mode claimed to be watching while missing nested edits. Added a loud startup warning on Linux. - Watch-mode path filter used forward slashes only, so on Windows `fs.watch`'s backslashed paths matched no directory pattern. Normalized before testing. - `walkMdx` emitted `<parent>/index` for `parent/index.mdx`, inconsistent with `loadDoc`'s collapsing to `parent`. Collapsed, and added a collision guard preferring the flat file when `parent.mdx` also exists. ### Regenerated `demo-content.json` Both the shell and shell-docs bundles, carrying the new `(multiple: ...)` caption format and previously-stale committed state. ## Test plan - [ ] Local typecheck passes on `showcase/shell-docs` and `showcase/scripts` - [ ] CI matrix green (Python, Vercel previews, check-binaries, format, oxlint, package-quality, unit 20/22/24, commitlint) - [ ] Manual spot-check: MDX pages with nested `<Tabs>` render correctly (no stranded close tags) - [ ] Manual spot-check: framework-selector dropdown — undeployed entries are disabled - [ ] Manual spot-check: docs overview page — undeployed integration cards are non-clickable - [ ] Manual spot-check: trigger showcase_deploy on a path-filter test change touching `showcase/shared/**` — confirm shell, shell-dashboard, AND shell-docs rebuild
zeekay
pushed a commit
to Dream-AI-4444/CopilotKit
that referenced
this pull request
Sep 11, 2026
The "Showcase: Docs Sync" workflow has been failing with `fatal: pathspec 'showcase/shell/src/content/' did not match any files` since the shell platform restructure (CopilotKit#4109, CopilotKit#4112) split the monolithic `showcase/shell/` package into `showcase/shell-docs/`, `showcase/shell-dashboard/`, and `showcase/shell-dojo/`. The sync-docs-from-main.ts script already writes to `showcase/shell-docs/src/content/` and maintains the sync marker at `showcase/shell-docs/.docs-sync-sha`. Update the "Create PR for docs sync" step to stage from the new location so the workflow can commit synced content again.
zeekay
pushed a commit
to Dream-AI-4444/CopilotKit
that referenced
this pull request
Sep 11, 2026
…CopilotKit#4117) ## Summary - Docs Sync workflow has been failing since 2026-04-21 with `fatal: pathspec 'showcase/shell/src/content/' did not match any files` (exit 128) on the "Create PR for docs sync" step (example: run 24726678848). - The path was moved by the shell platform restructure (CopilotKit#4109, CopilotKit#4112) — the docs content now lives under `showcase/shell-docs/src/content/`, and the sync marker at `showcase/shell-docs/.docs-sync-sha`. The sync script (`showcase/scripts/sync-docs-from-main.ts`) already writes to those locations; only the workflow's `git add` was still referencing the old monolithic `showcase/shell/` path. - One-line path fix. ## Test plan - [ ] Verify yaml parses. - [ ] Confirm next docs-sync run succeeds end-to-end (opens a sync PR for the 11 pending review items from run 24726678848).
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
showcase/shell-internal/→showcase/shell-dashboard/+ provisions Railway service atdashboard.showcase.copilotkit.ai.showcase/shell-dojolike/→showcase/shell-dojo/+ renames Railway service in place (domain unchanged)./docs,/[framework],/ag-ui,/reference+ components, libs, content) fromshowcase/shell/into new standaloneshowcase/shell-docs/package; provisions Railway service atdocs.showcase.copilotkit.ai; adds 301 redirects on shell for every moved route (including 17 per-framework slugs enumerated fromregistry.json).starter-langroid/api/health503 (sed stdout wrappers + readiness gate); adds red-green regression guards instarter-consistency.test.ts.DNS state
dashboard.showcase.copilotkit.aiCNAME →6u9icvje.up.railway.app— ✅ live in Route53.docs.showcase.copilotkit.aiCNAME →t6ge0qwv.up.railway.app— pending Route53 add.Railway services
showcase-shell-dashboard(ID4d5dfd74-be61-40b2-8564-b53b7dd4c15b) — provisioned, image pending first deploy.showcase-shell-docs(ID7badfb8d-4228-414c-9145-b4026803714f) — provisioned, image pending first deploy.showcase-shell-dojo(ID7ad1ece7-2228-49cd-8a78-bddf30322907) — renamed from shell-dojolike; already live.Closes / supersedes
jpr5/ftg-shell-opsfor future consideration, not merged here).--no-ff— that PR auto-closes on this PR's merge.Known non-blockers
/ag-ui/introductionthrows a server-componentonMouseEnterruntime error onnext start. Same issue exists in shell today — pre-existing, not a regression. Follow-up needed.showcase/shell-dojolackspackage-lock.jsonand.gitignore; trivial follow-up for parity with siblings.search-modalretains the flatsearch-index.jsonshape (not the extensible{version:1, sources:[...]}shape). Generator is the single point of change if multi-shell search is wanted later..mdxfiles with<Steps>structures; sidestepped by mirroring the existingshowcase/shell/src/content/**ignore policy to the newshowcase/shell-docs/src/content/**path.Test plan