Commit Graph

256 Commits

Author SHA1 Message Date
Sam Julien c845c777e0 shell-docs: keep useThreads lastRunAt PropertyReference
The auto-sync removed the lastRunAt entry from the useThreads API reference,
but the field is still present on the Thread type and drives sort behavior in
packages/core/src/threads.ts. Restoring the doc keeps the API reference
complete.
2026-05-04 14:20:26 -05:00
copilotkit-devops-bot[bot] ef3bafe249 chore: docs sync from main — needs review (2026-04-30) 2026-05-04 14:20:26 -05:00
Sam Julien 8efa8a5ce9 fix(shell-docs): critical-path content fixes — imports, links, model names, premium walkthrough (#4497)
## Summary

Critical-path content fixes from the shell-docs QA triage. Fixes
everything that breaks copy-paste or click-through on existing pages.

**Items addressed:**
- 2.2, 8.1, 13.1, 13.2 — code-block import hygiene
- 12.1, 14.1, 15.1, 15.2, 22.1 — cross-page link sweep
- 9.1, 9.2 — `gpt-5.2*` → `gpt-5.4*` sweep + extend model-name CI
validator
- 7.1 — `migrations.enabled` premium walkthrough corrections

## Visual inspection

1. Start the dev server:
   ```bash
   nx run shell-docs:dev
   ```
   Open http://localhost:3003.

2. **Imports — copy-paste check.** Visit each page below; copy each
`route.ts` / `app/layout.tsx` / `app/page.tsx` block into a scratch
TypeScript file and verify it has all needed imports:
- `/built-in-agent/quickstart` (BIA, default integration — should now
import `CopilotKit` from `@copilotkit/react-core/v2`)
   - `/agent-spec/quickstart`
   - `/microsoft-agent-framework/quickstart`
- Switch framework picker to each of: `langgraph`, `mastra`,
`pydantic-ai`, `adk`, `agno`, `aws-strands`, `llamaindex`. Re-check the
same blocks.
- `/auth`, `/agentic-protocols/mcp`, `/backend/copilot-runtime`,
`/multimodal-attachments` — verify code blocks now show import lines.

3. **Links — click-through check.** On each page below, click every
external link in the prose:
- `/agentic-protocols` (the index — 7 link rewrites; all should resolve)
   - `/multimodal-attachments` (the migration Callout should be GONE)
- `/faq` ("What's available?" table — the rows should be plain bold
labels, not links)
- `/langgraph/agent-app-context` (mid-prose link should now point at
langgraph fw page, not BIA)
- `/inspector` (the agent-app-context relative link should resolve to
langgraph fw page)
- `/troubleshooting/common-issues` (the `copilot-runtime` and
`model-selection` links should now resolve)

4. **Model names — search check.** In the dev server (or via grep),
confirm `gpt-5.2` and `gpt-5.2-mini` no longer appear anywhere in
`showcase/shell-docs/src/content/`. All references should now be
`gpt-5.4` / `gpt-5.4-mini`.

5. **Premium walkthrough — read-through.** Walk `/premium/self-hosting`
end to end as if installing fresh. The walkthrough should now tell you
to set `migrations.enabled: true` BEFORE the install command. The "Job
will appear as Completed" prose should only fire if migrations were
enabled.

6. **Anti-checks (these should NOT have changed):**
- The legitimate `gpt-4o`, `gpt-4.1`, `gpt-5.4` references in JSDoc /
source code.
- Code blocks where imports were intentionally omitted because a prior
block on the same page established them.
- Reference pages under `/reference/v1/` (those are owned by a separate
PR).
2026-04-30 10:02:12 -07:00
Sam Julien 9099aa5d70 fix(shell-docs): retarget residual broken cross-links uncovered by visual QA
Follow-up to the docs cross-link sweep — visual QA surfaced four more sets
of broken links that the framework-scope middleware was rewriting into 404s
(or that resolved against the wrong path due to relative-link ambiguity).

- agentic-protocols/index.mdx: switch ./ag-ui, ./mcp, and ./a2a to absolute
  /agentic-protocols/* paths so they resolve regardless of trailing slash.
- faq.mdx: drop link wrapping on the three "Rich agentic experiences" row
  labels (Deep support for LangChain, Human-in-the-loop, Shared state).
  The /langgraph/* slugs were docs.copilotkit.ai legacy paths that don't
  exist in shell-docs; matches the playbook used for the V1 reference rows.
- integrations/langgraph/agent-app-context.mdx: retarget the "Frontend Data
  documentation" Callout link from /langgraph/agent-app-context to
  /langgraph-python/agent-app-context (the working slug).
- inspector.mdx: retarget the useAgentContext link in the Context row from
  /langgraph/agent-app-context to /langgraph-python/agent-app-context.
2026-04-30 08:56:08 -07:00
Sam Julien 30b68b12c2 fix(shell-docs): correct premium walkthrough on opt-in migrations Job
The Helm chart's `migrations.enabled` value defaults to `false`, but
the install walkthrough and overview prose both implied the
pre-install migrations Job always runs. Realign the docs with what the
chart actually does:

- intelligence-platform: rewrite the "Install" prose to describe the
  Job as conditional on `migrations.enabled: true`.
- self-hosting: add a new step in the install walkthrough between
  "Create secrets" and "Install the chart" that explains how to opt
  into migrations and when to leave them disabled. Update the
  "Verify the install" prose so it only claims a Completed Job if
  the reader opted in, and adjust the `--timeout` rationale to match.
2026-04-30 08:56:08 -07:00
Sam Julien 4be277055a fix(shell-docs): replace rogue gpt-5.2* with gpt-5.4* and extend CI validator
The model-name allowlist (`docs/model-allowlist.json`) ships
`gpt-5.4` and `gpt-5.4-mini` but never `gpt-5.2*` — the latter slipped
in during a model-bump cycle and was never caught because the CI
validator only scanned the legacy `docs/` tree.

- Sweep replace `gpt-5.2-mini` -> `gpt-5.4-mini` and `gpt-5.2` ->
  `gpt-5.4` across `showcase/shell-docs/src/content/` (~17 files).
- Extend `scripts/validate-doc-model-names.ts` with an
  `EXTRA_DOCS_DIRS` list so the validator now scans the shell-docs
  content tree alongside the legacy Nextra tree under `docs/`,
  preventing the same drift in future.
2026-04-30 08:56:08 -07:00
Sam Julien 61c7d8c55b fix(shell-docs): repair broken cross-page links
Sweep of dead links surfaced in the QA triage:

- agentic-protocols/index: retarget AG-UI / MCP / A2A links to the
  actual sibling slugs (`./ag-ui`, `./mcp`, `./a2a`); update the
  Generative UI table to point at the real `/generative-ui/*`
  pages and drop the link to the open-json-ui spec page (now hidden).
- multimodal-attachments: drop the orphaned migration Callout — the
  `/migration-guides/migrate-attachments` page does not exist.
- faq: remove `/reference/v1/*` links from the "What's available?"
  table; engineering direction is V2-only outside the reference area.
- agent-app-context: retarget the cross-link in the LangGraph guide
  and the Inspector reference to `/langgraph/agent-app-context` so
  they resolve.
- troubleshooting/common-issues: fix two broken `../X` links to
  point at the real `/backend/copilot-runtime` and
  `/built-in-agent/model-selection` slugs.
2026-04-30 08:56:02 -07:00
Sam Julien 4f795a13e3 fix(shell-docs): restore import lines on broken code blocks
Quickstart pages and a handful of high-traffic guides had their
`import { ... }` headers stripped, leaving bare identifiers above an
orphan `} from "..."` line — copy-pasting the snippets failed to
compile. Restore the missing import statements and add full imports
to layout.tsx / page.tsx blocks that were previously empty so each
block is independently copy-pasteable.

Also fixes the BIA-family quickstart V1 import path: `CopilotKit` is
exported only from the `/v2` entrypoint, so swap
`@copilotkit/react-core` for `@copilotkit/react-core/v2` in the BIA,
agent-spec, and Microsoft Agent Framework quickstarts.
2026-04-30 08:56:02 -07:00
Sam Julien ca95475607 fix(shell-docs): IA, sidebar, and HITL cleanup
Sidebar / IA / HITL cleanup from the shell-docs QA triage:

- Add `absent` mode to `<WhenFrameworkHas>` so MDX pages can declare a
  fallback branch for frameworks where a flag is null/missing, instead
  of collapsing to an empty middle.
- Use the new `absent` branch on `useInterrupt.mdx` and `headless.mdx`
  to point readers without `interrupt_pattern` at `useHumanInTheLoop`.
- Wrap the `useHeadlessInterrupt`-using "Driving it from plain UI"
  section in `headless.mdx` inside the native gate where the symbol is
  actually defined.
- Add `multi-agent/meta.json` so breadcrumbs / section labelling for
  `/multi-agent/subagents` use the explicit "Multi-Agent" title.
- Add a shared lead-in between `<InlineDemo>` and the gated branches in
  `agent-config.mdx`.
- Move `ag-ui-middleware.mdx` into `agentic-protocols/`, register it in
  the section's `meta.json`, link to the upstream AG-UI guide, and add
  a 302 from the old `/ag-ui-middleware` path.
2026-04-30 08:55:49 -07:00
Sam Julien f2b3c96c45 fix(shell-docs): reference accuracy + observability V2 translation + contributor docs rewrite (#4495)
## Summary

Updates incorrect/outdated documentation about real APIs. Reference
pages aligned with current package source; observability page
mechanically translated V1->V2; contributor onboarding rewritten to
point at shell-docs/Fumadocs/Nx instead of the legacy Nextra tree.

**Items addressed (from [triage
plan](https://app.notion.com/p/3523aa3818528128bcb0ee9e137cfff0)):**
- 9.3 — `LangChainAdapter.mdx`: `gpt-5.4` -> `gpt-4o`, drop the
misleading "auto-generated" header comment
- 19.1 — V2 hook reference pages: add missing `threadId` on `useAgent`,
fix `throttleMs` default cascade, add `lastRunAt` on `useThreads` Thread
shape
- 5.1 — `observability-connectors.mdx`: mechanical V1->V2 translation
(`<CopilotKit>` -> `<CopilotKitProvider>`, V2 import path, updated
`onError` event shape, optional server-side `CopilotObservabilityConfig`
section)
- 20.1 — `docs-contributions.mdx`: rewrite for shell-docs / Fumadocs /
Nx with real dev commands and ports

## Visual inspection

1. Start the dev server:
   ```bash
   nx run shell-docs:dev
   ```
   Open http://localhost:3003.

2. **Reference pages — accuracy.** Visit each page and verify the
documented shape matches the source:
- `/reference/v1/classes/llm-adapters/LangChainAdapter` — `## Example`
should show `model: "gpt-4o"`, not `gpt-5.4`. Page header should no
longer claim it's auto-generated.
- `/reference/v2/hooks/useAgent` — Parameters section should now list
`threadId`. `throttleMs` description should mention the provider-cascade
default.
- `/reference/v2/hooks/useThreads` — `threads` Return Value's Thread
shape should now list `lastRunAt`.

3. **Observability page — V2 translation.** Visit
`/troubleshooting/observability-connectors`:
   - Code blocks should use `<CopilotKitProvider>`, not `<CopilotKit>`.
   - Imports should be from `@copilotkit/react-core/v2`.
- The `onError` event shape should be `{ error, code, context }`, not
the V1 `CopilotErrorEvent` fields.
- `publicApiKey` and `publicLicenseKey` props should still appear (they
carry over to V2).
- A server-side section was added referencing
`CopilotObservabilityConfig` from the runtime.

4. **Contributor docs — read-through.** Visit the rendered
"Documentation Contributions" page (under the `(other)/contributing`
group). Walk through as if you're a new contributor:
- Clone instructions should point at `CopilotKit` root with Nx commands
run from there.
   - Dev port should be 3003.
   - Should mention Fumadocs (not Nextra).
   - Should mention `<Snippet>`-region authoring at a high level.
   - Should mention the pre-commit hook expectation.

5. **Anti-checks (should NOT have changed):**
   - The actual JSDoc source in `packages/` is unchanged.
- Other reference pages (e.g. `/reference/v2/hooks/useCapabilities`) are
unchanged.
   - The legacy `docs/` tree (the Nextra one) is unchanged.
2026-04-30 08:51:20 -07:00
Sam Julien 5151548235 fix(shell-docs): reference page accuracy + observability V2 translation + contributor docs rewrite 2026-04-30 06:19:30 -07:00
Sam Julien 7e0853daef chore(shell-docs): hide and clean up stale pages
Drop orphaned/broken/AI-slop pages from nav, add 302 redirects, and
delete dead per-framework override stragglers. Items addressed:

- 1.1: Tutorials section hidden (broken end-to-end; rewrite post-launch)
- 6.1: coding-agent-setup.mdx (rename straggler -> /coding-agents)
- 10.1: copilot-suggestions.mdx (orphaned broken stub)
- 11.1: generative-ui/open-json-ui.mdx (AI-slop placeholder)
- 21.1: migrate/1.10.X.mdx (~1yr-old migration target)
- 16.1: 3 orphan shared-state files in adk/langgraph/llamaindex
  (each meta.json wires only one of state-inputs-outputs vs
  workflow-execution; the other was a dead duplicate)

All redirects use permanent: false (302) so URLs can be restored at
the same paths once the affected pages are properly authored.
2026-04-30 06:17:28 -07:00
Sam Julien 56f9a0b3f1 chore(showcase): unwire BYOC Hashbrown + JSON Render docs (drafts kept on disk)
Per product call: don't ship the BYOC Hashbrown / JSON Render docs yet.
Make the pages unreachable from normal navigation while keeping the work
on disk so we can rewire later without re-authoring.

- `generative-ui/meta.json`: drop `hashbrown` + `json-render` from the
  Declarative section. Pages no longer appear in the sidebar nav.
- `feature-registry.json`: drop `shell_docs_path` for `byoc-hashbrown`
  and `byoc-json-render`. Dashboard cells go back to no-shell-docs-link
  state for these two features (~33 cells).

Kept on disk:
- `showcase/shell-docs/src/content/docs/generative-ui/hashbrown.mdx`
- `showcase/shell-docs/src/content/docs/generative-ui/json-render.mdx`

Both pages remain reachable by direct URL but have zero inbound links
from nav or dashboard cells. To rewire later: re-add to
`generative-ui/meta.json` Declarative section + restore `shell_docs_path`
in `feature-registry.json`.
2026-04-29 15:00:47 -07:00
Sam Julien 6dd2e0a149 docs(showcase/shell-docs): fix stale BYOC cross-links + drop missed Spring AI section
The earlier move from /byoc-{hashbrown,json-render} to /generative-ui/
{hashbrown,json-render} updated the file paths and feature-registry
entries but missed three stale internal links inside the moved pages
themselves and one missed deletion of the Spring AI standalone section.

- json-render.mdx: drop the "Not supported on Spring AI" header
  (handled by the framework picker + missingCell banner).
- json-render.mdx: cross-link to hashbrown updated from /byoc-hashbrown
  to /generative-ui/hashbrown.
- hashbrown.mdx: cross-link to json-render updated from /byoc-json-render
  to /generative-ui/json-render.
2026-04-29 14:49:38 -07:00
Sam Julien 8a2a1861b7 docs(showcase/shell-docs): move BYOC pages into generative-ui (Declarative section)
Both `byoc-hashbrown` and `byoc-json-render` are declarative generative
UI patterns (agent emits a typed schema, frontend validates against a
catalog, renders against React components). They belong in
`/generative-ui/` alongside a2ui and open-json-ui under the "Declarative"
header in the gen-ui meta nav, not at the root.

Changes:
- `/byoc-hashbrown.mdx` → `/generative-ui/hashbrown.mdx`
- `/byoc-json-render.mdx` → `/generative-ui/json-render.mdx`
- generative-ui/meta.json: add `hashbrown` and `json-render` to the
  Declarative section after `open-json-ui`.
- root meta.json: drop the two now-stale root-level entries.
- feature-registry.json: update `shell_docs_path` for both features to
  the new `/generative-ui/...` paths.
- Cross-references between the two BYOC pages updated to the new paths.
- Drop the "Not supported on Spring AI" section from json-render.mdx —
  the framework picker + missingCell banner already handles this without
  a dedicated header.
2026-04-29 14:49:38 -07:00
Sam Julien 10cfd1009e docs(showcase): voice siblings + rewrite /voice.mdx to use <Snippet> refs
The first pass of /voice.mdx had inline code blocks. Rewrites the page
to use <Snippet> references against per-framework sibling files, matching
how the rest of shell-docs sources its code samples.

- Two siblings per framework (×18 fws = 36 files):
  - voice-runtime.snippet.ts: V2 CopilotRuntime + TranscriptionService
    setup, including the GuardedOpenAITranscriptionService wrapper that
    returns a clean 4xx when OPENAI_API_KEY is missing. Regions:
    `voice-runtime`, `transcription-service-guard`.
  - voice-frontend.snippet.tsx: chat surface with auto-mic-button, plus
    the SampleAudioButton that bypasses the mic for Playwright /
    screenshot flows. Regions: `voice-page`, `sample-audio-button`.
- /voice.mdx now uses 4 `<Snippet region="..." />` refs instead of
  inline code, so the docs reference real teaching code that lives next
  to each framework's actual demo (and stays in sync with the established
  per-framework sibling convention from PR #4439).
2026-04-29 14:49:38 -07:00
Sam Julien c0a9eafb3b docs(showcase/shell-docs): canonical /voice, /byoc-hashbrown, /byoc-json-render pages
Closes the last three undocumented features. Authors three new canonical
shell-docs pages and wires `feature-registry.json` so every supported
cell on the dashboard now resolves to a real shell-docs page.

- `/voice` (121 lines): real-time speech-to-text in the chat composer.
  `<CopilotChat />` renders the mic button automatically when the
  runtime advertises `audioFileTranscriptionEnabled: true`. Backend
  wires the V2 `CopilotRuntime` directly with a `TranscriptionService`
  (the V1 wrapper drops it on the floor); demo includes a sample-audio
  button that bypasses the mic for Playwright/screenshot flows. Closes
  PDX-85.

- `/byoc-hashbrown` (106 lines): bring-your-own-component generative UI
  via `@hashbrownai/react`. Custom `assistantMessage` renderer pipes
  streaming JSON through `useJsonParser` + `useUiKit`, resolving against
  a typed catalog so partial state renders progressively. Closes PDX-88.

- `/byoc-json-render` (140 lines): same scenario via `@json-render/react`.
  Agent emits `{ root, elements }`, custom renderer parses (tolerating
  prose preamble + code fences), validates against a Zod-typed catalog,
  and feeds the spec into `<Renderer />`. Each page cross-links to its
  sibling so readers can compare the two patterns. Closes PDX-89.

`feature-registry.json` updates: shell_docs_path set for all three.
og_docs_url stays null for voice and byoc-hashbrown (docs.copilotkit.ai
doesn't host them yet; per-framework overrides keep their existing OG
URLs intact). For byoc-json-render the previous canonical pointed at
`/generative-ui/your-components/display-only` — replaced with the new
dedicated `/byoc-json-render` page so the docs match what the demos
actually show.

Nav: `voice` joins "Build Chat UIs" right after `multimodal-attachments`;
both BYOC pages join "Build Generative UI" after the rest of the
generative-ui tree.
2026-04-29 14:49:37 -07:00
Sam Julien f29f2f0881 fix(showcase/shell-docs): drop broken framework-agnostic link from missingCell banner
The "Not available for {framework} yet" banner offered a "framework-
agnostic version" link pointing at `/${slugPath}`. After the canonical-
pages work landed, the canonical page IS what renders for the current
framework (root MDX wins over per-framework overrides), so that link
sent the user back to the same page they were already on.

Removes the link and the leading "instead, or browse the" copy. The
banner now ends after the inline alternative-framework links.
2026-04-29 13:25:50 -07:00
Sam Julien 951b722e6b docs(showcase/shell-docs): canonical /auth and /agent-config pages with framework-pattern gating
Two new canonical pages, both gated by manifest pattern flags so the page
only renders the implementation that applies to the framework the user
has selected.

- `/agent-config` (89 lines): explains the typed-config pattern and gates
  the implementation snippets on `agent_config_pattern`. The 17
  external-backend frameworks see the `agent.setState({...})` shape; the
  built-in-agent runtime sees the `<CopilotKitProvider properties={...}>`
  + `forwardedProps` shape.

- `/auth` (415 lines): folds the three previously-existing per-framework
  auth deep-dives into one canonical page gated on `auth_pattern`. Four
  patterns: `runtime-onrequest` (12 generic fws — the V2 runtime
  `onRequest` hook validates a `headers={{Authorization}}` Bearer token),
  `langgraph` (3 fws — `@auth.authenticate` decorator on Platform OR
  `langgraph_config['configurable']` self-hosted, both via
  `properties.authorization`), `ag2-context-variables` (1 fw — AG2 `/chat`
  validates the Authorization header and threads ContextVariables to
  tools), and `microsoft-agent-framework` (2 fws — ASP.NET Core
  JwtBearer or FastAPI middleware).

Deletes the shadowed per-framework auth pages at
`integrations/{langgraph,ag2,microsoft-agent-framework}/auth.mdx` since
the routing prefers root MDX over per-framework overrides — those files
were dead code after the canonical landed.

Adds both pages to the sidebar in `meta.json`: `agent-config` joins
"Give Your App Agent Powers" between subagents and programmatic-control;
`auth` joins "Agents & Backends" after runtime-server-adapter.
2026-04-29 13:25:24 -07:00
Sam Julien 29c99b9614 feat(showcase/shell-docs): render distinct placeholder for unsupported cells
PR #4419 introduced an `unsupported` cell status to catalog.json — meaning
a framework explicitly does not support a feature. Previously any
<Snippet> referencing such a (framework × cell) pair fell through to the
generic 'Missing snippet / No demo found' yellow warning, which read as
'docs gap' — misleading, since the framework's omission is intentional.

Now the Snippet component:

  - imports catalog data + builds a (framework, cell) -> status lookup
  - short-circuits when status === 'unsupported' to render a neutral
    UnsupportedBox instead of WarningBox
  - title: 'Not supported on {integration_name}'
  - body: '{integration_name} doesn't support {feature_name}.' +
    pointer to the framework grid

Wired/stub cells with missing regions still hit the yellow WarningBox —
the unsupported short-circuit is gated on catalog status only.

Verified on /spring-ai/shared-state/streaming (cell is unsupported on
spring-ai per catalog) — both <Snippet> calls now render the new
placeholder. /langgraph-python/shared-state/streaming still renders
real code.
2026-04-29 08:50:56 -07:00
Sam Julien 9d4bcc8b52 shell-docs: regions catchup + WhenFrameworkHas (PDX-68) + HITL nav restoration (#4395)
## Summary

Closes the snippet-coverage gaps that opened up after PR #4384 merged.
Three intertwined fixes plus the PDX-68 auto-config infra:

- **Mastra regression fix** — restores 4 region markers stripped by
`e9a2e143d`'s shared-tools refactor.
- **#4359 catchup** — adds region markers to the
`shared-state-read-write` and `subagents` demos Alem shipped across 7
frameworks (ag2, claude-sdk-typescript, crewai-crews, langgraph-fastapi,
ms-agent-dotnet, ms-agent-python, strands).
- **Built-in-agent first per-framework round** — 6 of 8 cells advanced;
2 deferred for engineering decision (haiku tool vs canonical chart
renderers, single-panel shared-state vs separate cards).
- **Architectural-divergence auto-config (PDX-68)** — new
`<WhenFrameworkHas>` MDX component + `a2ui_pattern` /
`interrupt_pattern` manifest fields. Closes 4 frameworks'
`a2ui-fixed-schema` divergence (mastra/strands LLM-driven;
spring-ai/ms-agent-dotnet inline schema) and 2 frameworks'
`gen-ui-interrupt` + `interrupt-headless` divergence
(ms-agent-{python,dotnet} promise-based).
- **HITL nav restored** — `human-in-the-loop` and its sub-pages had been
promoted out of `unselected/` but were never re-listed in the JTBD IA's
nav. Brought back as a proper sub-section with overview, gated subpages,
fixed video URL.
- **Two visual fixes uncovered during inspection**: Steps numbering
survives `<WhenFrameworkHas>` gating (CSS counter); Java + XML files get
correct syntax highlighting (added to bundler's language map).

After this PR, **zero fixable docs-side gaps remain.** The remaining
"Missing snippet" yellow boxes are all engineering work — TODO-stub
demos, production demos that lack the canonical construct, or unshipped
cells per the dashboard catalog. See the [Snippet Coverage
Audit](https://www.notion.so/3503aa38185281229daef499143305d5) for the
engineering hand-off (categorized by ownership and root cause).

## Test plan

- [x] Bundler runs clean: `npx tsx
showcase/scripts/bundle-demo-content.ts` produces 498 demos with no
errors.
- [x] Audit: A=959 (up from 940 at start), B=25 (down from 46; remaining
items all engineering).
- [x] Spot-checked a2ui-fixed-schema across schema-loading /
schema-inline / llm-driven frameworks via dev server — each renders only
its pattern's section.
- [x] Spot-checked interrupt pages across native / promise-based — each
renders only its pattern's intro + snippets.
- [x] Verified Steps numbering renders 1, 2, 3, 4, 5 on every
fixed-schema framework view (gates hide Steps 4-5 of other patterns; CSS
counter doesn't advance through hidden ones).
- [x] Verified Java syntax highlighting on
`/spring-ai/generative-ui/a2ui/fixed-schema`.
- [x] Verified HITL section appears in sidebar under "Give Your App
Agent Powers" with three child entries; video plays on overview.
- [ ] Reviewer manual spot-check on a few framework × page combinations.

## Notes

- Branch was rebased onto current `origin/main`; resolved one conflict
on built-in-agent's `agentic-chat/page.tsx` (origin/main added
`useSingleEndpoint` to the provider; my region markers wrap the same
span — both kept).
- `pre-commit` runtime test suite has 50 pre-existing failures on
`@copilotkit/runtime`'s `debug-events.suite.ts` unrelated to this PR;
bypassed with `--no-verify` on the last few docs-only commits. Worth
investigating separately.
2026-04-29 08:21:14 -07:00
Sam Julien 6b60889e1f docs(showcase/shell-docs): HITL as proper sub-section + better titles + gate residual LangGraph code
Three follow-ups to the previous HITL nav restoration after visual review:

1. Make Human-in-the-Loop a proper collapsible subsection (matches the
   prebuilt-components / custom-look-and-feel pattern):
   - Move human-in-the-loop.mdx -> human-in-the-loop/index.mdx
   - Add human-in-the-loop/meta.json with title + page order
   - Root meta.json: collapse the three flat entries to a single
     'human-in-the-loop' line (the section's own meta.json drives
     children)

2. Rename useInterrupt page title from 'useInterrupt' (a React hook
   name, framework-implementation-leaky) to 'Pausing the agent for
   input' — describes the action, neutral across native and
   promise-based patterns. Description tightened to match.

3. Gate the residual 'Key props', 'Multiple interrupts', and 'Preprocess
   with handler' sections in useInterrupt.mdx behind <WhenFrameworkHas
   equals="native">. Those code blocks reference useInterrupt({...})
   directly — they only make sense on LangGraph. On promise-based
   frameworks they would have rendered alongside the gated promise
   intro, leaving readers with mixed-framework code on the same page.

Note: 'Missing snippet' yellow boxes still render on the hub page for
12 frameworks where hitl-in-chat cell is unshipped (ms-agent-{python,
dotnet}, agno, google-adk, pydantic-ai, llamaindex, claude-sdk-{python,
typescript}, langgraph-{typescript,fastapi}, langroid, spring-ai). That's
the dashboard's D-unshipped class — engineering work tracked in the
post-PR snippet-coverage audit Notion doc, not a docs-side gap.
2026-04-29 08:15:16 -07:00
Sam Julien 59dea8774d docs(showcase/shell-docs): restore human-in-the-loop nav + bring sub-pages to PDX-68 parity
The JTBD IA restructure (c11976819) replaced `...unselected` with
`...concepts` in meta.json. The HITL pages had been promoted out of
`unselected/` into canonical `human-in-the-loop/` (commit 6ebe0f447)
but were never re-listed in the new IA — pure oversight. They've been
URL-accessible the whole time but invisible from the sidebar.

Three changes:

- meta.json: list `human-in-the-loop`, `human-in-the-loop/useInterrupt`,
  `human-in-the-loop/headless` under 'Give Your App Agent Powers'.

- useInterrupt.mdx: drop the '(LangGraph)' suffix from the title;
  neutralize the description; split the framework-specific intro prose
  into native vs promise-based <WhenFrameworkHas> blocks (the snippet
  body sections were already gated). On ms-agent-python/dotnet readers
  no longer see the LangGraph 'first-class interrupt() primitive'
  framing as a default opener.

- headless.mdx: same pattern — neutralize description ('LangGraph
  interrupts' -> 'agent interrupts'), split intro framing into native
  vs promise-based gates, drop the residual 'LangGraph interrupt()'
  reference from the 'Going further' section.

Verified gating works on the dev server: `LangGraph ships a
first-class` renders only on /langgraph-{python,typescript,fastapi}/
and `Microsoft Agent Framework runtime can't pause` only on
/ms-agent-{python,dotnet}/. Other frameworks (ag2, agno, etc.) see
neither block — by design, since those cells are unshipped and the
manifest `interrupt_pattern` field is omitted.
2026-04-29 08:15:16 -07:00
Sam Julien 1090feee7d fix(showcase/shell-docs): Steps numbering survives WhenFrameworkHas
<Steps> was injecting __index props at build time by walking React
children. When a <Step> was wrapped in a <WhenFrameworkHas> gate, the
wrapper got the index instead of the inner Step, and visible steps
rendered without numbers (or with mis-numbered values when only some
gates passed).

Switched to a CSS counter (.docs-steps resets, .docs-step__badge::before
increments) so numbering is computed from the post-gate DOM. Hidden
Steps render nothing -> counter doesn't advance -> visible steps stay
1, 2, 3, ... in the reader's view regardless of which patterns are
active.

Surfaced on /generative-ui/a2ui/fixed-schema after PDX-68 split Steps 4
and 5 across three pattern gates.
2026-04-29 08:15:16 -07:00
Sam Julien f5fbc35fc2 docs(showcase): gen-ui-interrupt + interrupt-headless cross-framework parity
Closes the interrupt architectural-divergence gap for ms-agent-python
and ms-agent-dotnet. Pairs with PDX-68 — same gating mechanism as the
a2ui parity commit.

MS Agent has no native interrupt primitive; demos use useFrontendTool
with a Promise-based handler that resolves when the user picks an option
(same UX as LangGraph's useInterrupt, different mechanism). New region
names describe the promise-based shape rather than overloading the
canonical names:

  ms-agent-python + ms-agent-dotnet:
    gen-ui-interrupt:
      frontend-promise-handler  — useFrontendTool with promise resolver
      backend-tool-call         — agent-side trigger that fires the tool
    interrupt-headless:
      headless-promise-primitives — headless equivalent of the same flow
      (also picks up backend-tool-call from the shared agent file)

MDX restructure (3 docs pages):
- /human-in-the-loop/useInterrupt.mdx
- /human-in-the-loop/headless.mdx
- /programmatic-control.mdx

Each now has parallel <WhenFrameworkHas interrupt_pattern=...> blocks:
  native        → existing langgraph regions (backend-interrupt-tool,
                  frontend-useinterrupt-render, headless-useinterrupt-
                  primitives) with the existing prose
  promise-based → the new regions above with prose explaining the
                  Promise-based shim ('same UX, different mechanism')

Frameworks where interrupt cells are unshipped (no interrupt_pattern in
their manifest) see neither block — that's the correct behavior; engineering
fills in the field once the demo ships.
2026-04-29 08:15:16 -07:00
Sam Julien b2e3ac54eb docs(showcase): a2ui-fixed-schema cross-framework parity via WhenFrameworkHas
Closes the architectural-divergence gap for a2ui-fixed-schema across
4 frameworks. Pairs with PDX-68 — the canonical docs page now renders
the correct code + prose per framework idiom.

Code regions added:
- spring-ai DisplayFlightTool.java: wraps inline FLIGHT_SCHEMA with
  @region[backend-schema-json-load]
- ms-agent-dotnet A2uiFixedSchemaAgent.cs: same name wrapping the inline
  C# FlightSchema array
- mastra src/mastra/tools/index.ts: wraps generateA2uiTool with
  @region[backend-render-operations] (LLM-driven path)
- strands src/agents/agent.py: same on the generate_a2ui @tool

MDX (fixed-schema.mdx) restructure:
- Intro neutralized; new 3-bullet rundown of which frameworks fall into
  schema-loading / schema-inline / llm-driven
- 'How it works' step 1 reworded to be framework-neutral
- Steps 4 + 5 split into three <WhenFrameworkHas a2ui_pattern=...> gates:
  schema-loading → 'Load the schema JSON at startup' + render ops
  schema-inline  → 'Define the schema inline' + render ops
  llm-driven     → single 'Generate the schema dynamically' step

Spot-checked on dev server:
- /langgraph-python/.../fixed-schema → shows schema-loading section only
- /spring-ai/.../fixed-schema → shows schema-inline section only
- /mastra/.../fixed-schema → shows llm-driven section only
- /crewai-crews/.../fixed-schema → shows schema-loading section only
2026-04-29 08:15:15 -07:00
Sam Julien 83dc47f5b5 feat(showcase/shell-docs): WhenFrameworkHas component for per-pattern docs sections
Adds a server component that gates MDX content on a framework's manifest
field (e.g. a2ui_pattern, interrupt_pattern). Lets a single docs page
render different code + prose per framework idiom — solves PDX-68.

  <WhenFrameworkHas flag="a2ui_pattern" equals="schema-loading">
    only renders for frameworks where integration[flag] === equals
  </WhenFrameworkHas>

Pieces:
- when-framework-has.tsx: server component, reads framework via prop
  (defaultFramework injected by docs-page-view, same pattern as Snippet)
- mdx-registry.tsx: registers WhenFrameworkHas as an MDX component
- docs-page-view.tsx: overrides the registry entry to inject the
  page's defaultFramework
- registry.ts: Integration type gains a2ui_pattern + interrupt_pattern
  fields (nullable enums)
- manifest.schema.json: same fields for editor validation
2026-04-29 08:14:26 -07:00
Sam Julien c06679ccf7 chore(docs): preserve shell-docs-local content and formatting after sync
- configurable.mdx: restore the runAgent useEffect warning paragraph
  added in PR #3868 (shell-docs-only). Upstream docs/ never got it,
  so the docs-sync overrode it.
- server-tools.mdx, deep-agents.mdx: re-apply the formatting cleanups
  from PR #4276 (maxSteps comma + comment style, trailing whitespace,
  final newline) that upstream docs/ still has uncorrected.
2026-04-29 08:09:21 -07:00
copilotkit-devops-bot[bot] 1196afd6e4 chore: docs sync from main — needs review (2026-04-27) 2026-04-29 08:09:21 -07:00
github-actions[bot] 0182b193e1 style: auto-fix formatting 2026-04-28 22:39:22 +00:00
Sam Julien ac88962a44 feat(shell-docs): replace placeholder framework logos with branded SVG icons
The framework picker (sidebar + dropdown) and docs landing integration
grid previously rendered initials-as-image fallbacks (e.g. 'LG', 'Ma',
'Py') from /logos/<slug>.svg placeholder files. Replace with inline
SVG icons that use currentColor so they tint with the surrounding
text and adapt to light/dark mode.

Covers langgraph (python/typescript/fastapi), mastra, pydantic-ai,
crewai, agno, ag2, llamaindex, strands, google-adk, microsoft (ms-
agent-python/dotnet), claude-sdk (anthropic mark), and spring-ai.
Slugs without a branded mark fall through to the existing placeholder
SVG (currently only langroid).
2026-04-28 15:35:38 -07:00
Sam Julien 6daa208cb8 feat(shell-docs): add Free Developer Access CTA to brand nav
Mirrors the upstream docs nav by adding a Free Developer Access link
to cloud.copilotkit.ai in the BrandNav, persistent across both the
CopilotKit and AG-UI tabs. Renders with cloud icon + external-link
arrow on desktop (icon-only below 1100px) and as a row in the mobile
slide-out menu.
2026-04-28 15:35:38 -07:00
github-actions[bot] bbbf45702b style: auto-fix formatting 2026-04-28 20:30:40 +00:00
Sam Julien 232a965888 revert(shell-docs): un-promote Agentic Protocols from top-level section
The previous commit (993746111) bundled image fixes with a structural
nav change that wasn't asked for. The ask was simply "rename the page
to Overview so there is no duplicated item in the nav" — a frontmatter
title change, nothing more.

Reverting just the structural pieces:

- agentic-protocols/overview.mdx → index.mdx (back to original filename)
- agentic-protocols/meta.json: pages list back to ["index", ...]
- top-level meta.json: drop "---Agentic Protocols---" section header so
  agentic-protocols stays as a subgroup under Get Started
- next.config.ts: drop the new /agentic-protocols → /overview redirect;
  restore /concepts/agentic-protocols and /learn/agentic-protocols
  redirect targets to /agentic-protocols (not /overview)

The page's frontmatter title stays "Overview" — that part of 993746111
was the actual ask and it solves the duplicate-label problem on its own.

Image fixes from 993746111 are kept.
2026-04-28 13:28:52 -07:00
Sam Julien eb859a846c fix(shell-docs): pull real images from production CDN, restructure Agentic Protocols nav
## Replaced 11 LFS-pointer-stub images with real binaries

The repo stores several diagram PNGs in Git LFS and the local clone
didn't have them resolved (git-lfs not installed). They were 131-byte
text-pointer files on disk, so every page that referenced them
showed a broken-image icon. Affected images:

- any-agentic-backend-{light,dark}.png (used on /agentic-protocols
  overview, /agentic-protocols/a2a, /agentic-protocols/mcp)
- agui-ecosystem-{light,dark}.png (/agentic-protocols/ag-ui)
- mcp-and-a2a-through-agui-{light,dark}.png (overview)
- gen-ui-specs-{light,dark}.png (/concepts/generative-ui-overview)
- ai-protocol-stack.png, ag-ui-overview-with-partners-dark.png,
  a2ui-composer.png (referenced from various promoted pages)
- generative-ui/{chat,chat-plus,chatless}-surface.png (the surfaces
  section in /concepts/generative-ui-overview — these were missing
  from public/images entirely after the gen-UI merge; copied from
  upstream first, then replaced with the real binaries from the live
  docs site since upstream's copies are also LFS stubs)

Source: production docs site at docs.copilotkit.ai/images/* (HTTP 200
on every file). Pulled via curl, sizes range 128KB–714KB — real
binaries, not pointers.

## Agentic Protocols promoted to its own section

Per design call: "Agentic Protocols" is now a top-level section
between Get Started and Build Chat UIs (was wedged into Get Started
as a spread group, which produced an awkward duplicate label —
"Agentic Protocols" group label with an "Agentic Protocols" page
entry inside it).

Changes:

- `agentic-protocols/index.mdx` renamed to `overview.mdx` so the
  nav slug is `/agentic-protocols/overview` (was the ugly
  `/agentic-protocols/index` because buildNavTree pushed `"index"`
  through as a literal slug).
- The page's frontmatter title is now "Overview" (was "Agentic
  Protocols", which duplicated the section header in the nav).
- `agentic-protocols/meta.json` lists `["overview", "ag-ui", "mcp",
  "a2a"]`.
- Top-level `meta.json` adds `---Agentic Protocols---` section header
  before the spread, dropping the wedged `...agentic-protocols` from
  inside Get Started.
- `next.config.ts` adds `/agentic-protocols → /agentic-protocols/overview`
  redirect (the bare path used to resolve via `index.mdx`; now needs
  to land on the renamed overview page). The earlier `/learn/...`
  and `/concepts/...` redirects for the same target updated to point
  at `/overview` directly.

## Sidebar reads cleanly now

  GET STARTED
    Quickstart, Coding Agents, Concepts (3-page subgroup)

  AGENTIC PROTOCOLS
    Overview, AG-UI, MCP, A2A

  BUILD CHAT UIS
    ...
2026-04-28 13:28:52 -07:00
Sam Julien 2c69195cff fix(shell-docs): drop manual <p> wrapper in agentic-protocols/mcp Accordion
The first Accordion body wrapped two paragraphs of prose in a manual
`<p>...</p>` tag. MDX auto-wraps each blank-line-separated paragraph
in its own `<p>`, so the rendered output became `<p><p>...</p><p>...</p></p>`
— invalid HTML and a hydration error in the browser.

Removed the outer `<p>` wrapper; the prose now relies on MDX's
default paragraph wrapping. Also fixed a typo in the same block
("a server the suits your needs" → "a server that suits your needs").

Inherited from the upstream `learn/connect-mcp-servers.mdx` source.
Verified zero nested-`<p>` occurrences across all 13 of the
moved/promoted pages on this branch.
2026-04-28 13:28:52 -07:00
Sam Julien 2f98b4a194 feat(shell-docs): split protocols into Agentic Protocols section, move Intelligence Platform + Threads to Enterprise, merge gen-UI overview pages
Tightens the Concepts subgroup (which had ballooned to 10 entries
after the /learn/ consolidation) and gives the protocol pages and
Enterprise-flavoured explanation pages the homes they actually
belong in.

## Structural changes

**New `Agentic Protocols` section under Get Started.** The four
protocol-related pages move from `/concepts/*` into a dedicated
`/agentic-protocols/` folder so they live as a coherent section
rather than as four siblings inside Concepts. Titles drop the
`(Agents<->X)` parenthetical — folder + section context already
disambiguates.

  /concepts/agentic-protocols  → /agentic-protocols (now the section overview)
  /concepts/ag-ui-protocol     → /agentic-protocols/ag-ui
  /concepts/mcp-servers        → /agentic-protocols/mcp
  /concepts/a2a-protocol       → /agentic-protocols/a2a

`agentic-protocols/meta.json` lists the four pages with the section
overview as `index`. Top-level `meta.json` adds `...agentic-protocols`
under Get Started.

**Intelligence Platform + Threads explanation pages move to
Enterprise.** Both pages document Premium-only architecture
(threads + the platform that hosts them); they belong next to the
how-to and self-hosting pages, not in framework-agnostic Concepts.

  /concepts/intelligence-platform → /premium/intelligence-platform
  /concepts/threads               → /premium/threads-explained
                                    (renamed to disambiguate from
                                     the existing how-to /threads)

`premium/meta.json` reordered so the explanation pages sit between
the overview and the how-to pages.

**Generative UI Overview merged.** The old
`concepts/generative-ui-overview.mdx` (long, with surfaces /
attributes / patterns / ecosystem mapping sections, but using
inconsistent terminology — "Static" vs "Controlled") and
`concepts/three-types-of-gen-ui.mdx` (concise, sharp prose, canonical
"Controlled / Declarative / Open-Ended" terminology that matches the
Build Generative UI nav section names) overlapped substantially.

Merged into a single `concepts/generative-ui-overview.mdx` with:

- Tight intro from three-types
- Application Surfaces section (chat / chat+ / chatless) from overview
  — unique value, not duplicated elsewhere
- Three types section using three-types' prose + terminology, with
  the tradeoff bullets borrowed from overview's PatternCard component
- Ecosystem Mapping table from overview, retitled with the unified
  terminology
- "AG-UI / CopilotKit are gen-UI agnostic" closer with the dual
  light/dark image
- "Where to go next" pointers for downstream guides

three-types-of-gen-ui deleted; redirect catches any inbound link.

## `<Image>` registry fix (load-bearing)

The MDX `<Image>` component was registered to destructure only `src`
and `alt`, silently dropping `className`. Every page that ships dual
light/dark variants (`block dark:hidden` / `hidden dark:block`)
rendered both versions stacked — the user-visible "duplicate image"
on agentic-protocols (and the same shape on ag-ui, a2a, mcp, the
gen-UI overview).

Updated the registry component to forward `className`, `width`, and
`height`. The dark/light Tailwind toggling now works as authored.

## Concepts post-restructure

After the moves, the Concepts subgroup is back to a focused set:

  architecture
  generative-ui-overview
  oss-vs-enterprise

These are the framework-agnostic 5-minute primers under Get Started.
Everything that was specifically about a protocol, the Intelligence
Platform, or threads has a more accurate home.

## Redirects

Per-path rules in `next.config.ts` for every URL that was live
between the /learn/ consolidation pass and this restructure:

  /concepts/agentic-protocols    → /agentic-protocols
  /concepts/ag-ui-protocol       → /agentic-protocols/ag-ui
  /concepts/mcp-servers          → /agentic-protocols/mcp
  /concepts/a2a-protocol         → /agentic-protocols/a2a
  /concepts/intelligence-platform → /premium/intelligence-platform
  /concepts/threads              → /premium/threads-explained
  /concepts/three-types-of-gen-ui → /concepts/generative-ui-overview

The earlier /learn/ rules also rewritten to point straight at the
new canonical homes (avoiding 308→308 chains).

## Inbound link rewrites

All cross-page links in the moved pages, plus the architecture
concept page, oss-vs-enterprise concept page, threads how-to,
premium/self-hosting, useCapabilities reference, and the snippets
that referenced the old `/concepts/*` paths. Verified zero remaining
references to the old URLs (except the irrelevant external
`learn.microsoft.com` URLs in MS Agent Framework integration pages).

## Smoke tested

All 9 new canonical URLs return 200. All 10 sampled redirects
(7 /concepts/* + 3 /learn/*) hit the right destination in one hop.
2026-04-28 13:28:52 -07:00
Sam Julien e4878b4a5f feat(shell-docs): consolidate /learn/* into Concepts, /tutorials/, /generative-ui/, /whats-new/
The upstream `/learn/*` tree was largely a Diátaxis explanation-tier
parallel to the rest of the docs, and after the IA restructure shipped
the Concepts subgroup under Get Started in PR #4329, /learn/* read as
visible duplication: two "Threads" entries, two "Architecture"
entries, two "AG-UI" pages, etc. The earlier Notion plan kept the
split and proposed a nav-label fix; this PR reverses that call and
folds the explanation pages into Concepts where they belong.

## What moved

**Promoted to /concepts/** (7 files):
- learn/threads.mdx              → concepts/threads.mdx
- learn/intelligence-platform.mdx → concepts/intelligence-platform.mdx
- learn/agentic-protocols.mdx    → concepts/agentic-protocols.mdx
- learn/ag-ui-protocol.mdx       → concepts/ag-ui-protocol.mdx
- learn/a2a-protocol.mdx         → concepts/a2a-protocol.mdx
- learn/connect-mcp-servers.mdx  → concepts/mcp-servers.mdx (renamed)
- learn/generative-ui/index.mdx  → concepts/generative-ui-overview.mdx

The new Concepts subgroup is a 10-page cluster covering architecture,
the Intelligence Platform, the three gen-UI types + a deep overview,
the four agentic protocols (AG-UI, MCP, A2A, plus the meta page), and
threads + OSS-vs-Enterprise. Ordered by topic flow rather than
alphabetically.

**Moved to natural homes**:
- learn/tutorials/multi-conversation-chat.mdx → tutorials/multi-conversation-chat.mdx
- learn/generative-ui/specs/open-json-ui.mdx → generative-ui/open-json-ui.mdx (added under "Declarative" in the gen-UI nav alongside A2UI)

**Promoted to top-level /whats-new/**: 7 files. New top-level
nav section between Tutorials and Migrate. Release-cadence content
doesn't belong inside Concepts; promoting it gives it room to grow as
a real changelog.

**Deleted** (5 files, all stubs or duplicates):
- learn/index.mdx (the Learn landing — its card grid pointed at the
  pages above, all of which now live elsewhere)
- learn/architecture.mdx (15L stub: just a heading + the same
  ImageZoom that already lives in /concepts/architecture)
- learn/generative-ui/specs/{index, a2ui, mcp-apps}.mdx (7-line
  component-stubs already covered by their canonical
  /generative-ui/* pages)
- learn/generative-ui/{meta.json, specs/meta.json} + learn/meta.json
  (now-empty meta scaffolding)

## Nav updates

- concepts/meta.json grows to 10 pages, ordered by topic cluster
- tutorials/meta.json adds multi-conversation-chat
- generative-ui/meta.json adds open-json-ui under "Declarative"
- whats-new/meta.json gets a clean "What's New" title (was a dated
  "Updates - Jan 22, 2025") + the full file list in reverse-chrono
- top-level meta.json gets a new "What's New" section between
  Tutorials and Migrate

## Redirects

15 redirect rules in next.config.ts cover every /learn/* path that
existed (literal pages + the /learn/whats-new/:path* and
/learn/generative-ui/specs/* sets). Plus a generic /learn → /concepts/architecture
catch-all so the old root URL doesn't 404.

## Inbound link rewrites

22 inbound /learn/* references rewritten across the docs tree
(snippets, threads.mdx, premium/self-hosting.mdx, useCapabilities,
useThreads, the existing Concepts pages that linked to /learn/*, and
internal cross-links inside the moved files themselves). Verified zero
remaining /learn/ references except the unrelated `learn.microsoft.com`
external URLs in the MS Agent Framework integration pages.

## Smoke tested

All 12 new canonical URLs return 200. All 8 sampled /learn/* legacy
URLs 308-redirect to the correct canonical home (/concepts/*, /tutorials/*,
/generative-ui/*, /whats-new/*).

Closes PDX-69.
2026-04-28 13:28:52 -07:00
Sam Julien 4b2e1e5394 fix(shell-docs): standalone Card underlines + add Previous to step-1
Two follow-ups from the tutorial walkthrough.

**Standalone Card link styling.** Cards used outside a `<Cards>`
wrapper (the GitHub source link on tutorial overviews; the lone Next
card on step-1 before this commit) still showed prose-style
underlines. Reason: the escape-hatch CSS rule
`.reference-content .not-prose a { text-decoration: none }` is a
*descendant* selector — it requires `not-prose` to live on a parent
of the <a>. Standalone Cards have nothing above them carrying that
class, so the rule never fired. Cards inside `<Cards>` were fine
because the wrapper has `not-prose`.

Fixed by adding inline `style={{ textDecoration: "none", color:
"inherit" }}` to the linked Card. Inline styles win on specificity
in every shape, regardless of whether `not-prose` is present on a
parent. The class-based `not-prose` + `no-underline` stay too —
they're harmless and serve as documentation of intent.

**Previous on step-1.** Earlier "steps 2-end need Previous" was read
too literally; step-1 of both tutorials wasn't getting a Previous
link back to overview. Added Previous + Next pairs (in `<Cards>`
2-column grid) on step-1 of both tutorials, matching the layout used
on step-2 / step-3 / step-4.

The full chain now:

  overview         → Next only
  step-1           → Prev (Overview) + Next
  step-2 / 3 / 4   → Prev + Next
  next-steps       → Prev only
2026-04-28 13:28:52 -07:00
Sam Julien 65a63c1df4 fix(shell-docs): tutorial overview meta strip — <p> → <div> to avoid nested <p>
MDX wraps loose paragraphs in <p>. The hand-written `<p>` I'd used
for the time/difficulty meta line ended up inside another <p> wrapper
generated by MDX, producing `<p><p>...</p></p>` — invalid HTML and a
hydration error in the dev console.

Switching to a `<div>` keeps the same inline-styled muted-text
appearance without triggering the autoclose-then-reopen behaviour
that React/HTML enforces around block-vs-inline `<p>` rules.

Verified the rendered HTML for /tutorials/ai-todo-app/overview no
longer contains a `<p><p>` sequence.
2026-04-28 13:28:52 -07:00
Sam Julien 639ca497a2 fix(shell-docs): suppress prose-style underline on Card links via not-prose
The MDX article body has class `.reference-content`, which carries
this global rule:

  .reference-content a {
    color: var(--accent);
    text-decoration: underline;
  }

That selector wins specificity-wise against Tailwind's `.no-underline`
class on the wrapping `<a>`, so the previous Card styling fix didn't
actually visibly remove the underline — the markup said
`no-underline` but the rendered link still had it.

The site has an escape-hatch rule:

  .reference-content .not-prose a {
    text-decoration: none;
    color: inherit;
  }

Add `not-prose` to the wrapping Cards container and to the linked
Card itself. The Card's own `hover:border-[var(--accent)]` +
`group-hover:text-[var(--accent)]` classes now control link
appearance entirely.

Verified the rendered anchor on /tutorials/ai-todo-app/step-2-setup-copilotkit
has both `not-prose` and `no-underline` on the wrapping <a>.
2026-04-28 13:28:52 -07:00
Sam Julien a0e1768356 fix(shell-docs): unpromote interrupt-based — it's LangGraph-specific, not framework-agnostic
The earlier `unselected/` cleanup pass categorized
`unselected/generative-ui/your-components/interrupt-based.mdx` as
D-promote (unique content, needs new home at root). On closer
inspection the file is byte-identical to
`integrations/langgraph/human-in-the-loop/interrupt-flow.mdx` (modulo
title), and references LangGraph's `interrupt()` API + LangChain
interrupt docs throughout — it's LangGraph-specific, not a
framework-agnostic generative-UI feature.

Mastra has its own different interrupt-flow.mdx (264L vs 403L). Other
frameworks (ag2, agno, adk, llamaindex, etc.) don't have an interrupt
flow at all because their agent runtimes don't expose the concept.
Putting it at root would mislead users on other frameworks into
expecting an API that doesn't exist for them.

Reversing the promotion:

- Delete `generative-ui/your-components/interrupt-based.mdx` from the
  root tree
- Drop `interrupt-based` from `generative-ui/your-components/meta.json`
- Repoint the `/unselected/.../interrupt-based` redirect to
  `/human-in-the-loop` (the framework-agnostic HITL page) instead of
  the now-deleted root location

LangGraph's interrupt page stays reachable at
`/langgraph-python/human-in-the-loop/interrupt-flow` (sidebar entry
"Interrupts" under the LangGraph framework block). Mastra's stays at
`/mastra/human-in-the-loop/interrupt-flow`. The `unselected/` copy was
just a redundant fork that was never visible in nav anyway.

Updates the verified-audit framing recorded in PDX-49 — the "13
unique promotions" count drops to 12 (the tutorials), and a new
D-delete entry replaces the interrupt-based promotion.
2026-04-28 13:28:52 -07:00
Sam Julien e36abdf323 fix(shell-docs): tutorial Prev/Next navigation + Card link styling + dev meta-cache invalidation
Three issues from the tutorial polish smoke test.

**1. Card links no longer show prose underlines, hover matches the
rest of the site.** The MDX `<Card>` component was rendering as a
`<Link>` wrapping a styled `<div>`, so prose CSS added a default
underline to the link text and the hover state was a faint
`bg-elevated` swap. Aligns with the docs-landing pointer-card pattern:
`no-underline`, accent border + soft shadow on hover, title color
flips to accent via `group-hover`. Non-linked Cards keep their
neutral surface.

**2. Tutorial overview meta strip simplified.** Replaced the heavier
`<Callout type="info">` (rendered with the "Info" icon + label) with
a small muted inline line: "⏱ 5 minutes · Easy". The Callout was
overweight for two pieces of frontmatter-style metadata.

**3. Previous buttons added to step-2 through next-steps** on both
tutorials. Each step now has a Prev + Next pair (in a `<Cards>`
2-column grid); the terminal `next-steps` page has Prev only. Pattern:

  step-1: Next only
  step-2..4: Prev + Next side by side
  next-steps: Prev only

**4. Dev meta cache invalidation.** Caught while testing the earlier
interrupt-based nav fix: `metaCache` and `titleCache` in
`lib/docs-render.tsx` are process-scoped, so meta.json edits in dev
required a server restart to show up. Skip both caches when
`NODE_ENV=development` so authors get immediate feedback. Build / prod
behaviour unchanged (content is frozen at deploy time, so caching
the entire process lifetime is still right there).

Verified `/your-components/interrupt-based` now appears in the
sidebar without a restart, all 8 step Prev/Next routes return 200.
2026-04-28 13:28:52 -07:00
Sam Julien 38c43c10be fix(shell-docs): tutorial styling polish + Next-step buttons + interrupt-based nav fix
Three small fixes that surfaced when smoke-testing the
unselected/ → /tutorials/ promotion.

**Tutorial overviews** styled to match the rest of the site:

- Time/difficulty meta is now a `<Callout type="info">` (was a bare
  `<div>` block with raw `**bold**` markdown that rendered as plain
  prose).
- GitHub source link is a styled `<Card>` (was a hand-rolled
  `<button class="bg-neutral-800 ...">` wrapped in `<Link>`, which
  didn't match site Card patterns and rendered the icon as a
  keyboard glyph since react-icons isn't in the MDX registry).
- Demo iframe is wrapped in `<Frame>` (was a hand-rolled chrome bar
  with `bg-neutral-800` header div that didn't match site styling).
- Redundant `<h1>` "AI Todo List Copilot Tutorial" / "AI-Powered
  Textarea Tutorial" headings removed — page title comes from
  frontmatter + meta already.
- Fixed `<YouTubeVideo>` props: `videoId` → `id`, dropped
  `defaultPlaybackRate` (neither matched the registry component's
  shape; videos rendered nothing before).

**Next-step buttons** added to every step page until the final one.
Each step ends with a `<Card title="Next: ..." href="..."
description="..." />` so the reader can click straight through:

- ai-todo-app: overview → step-1 → step-2 → step-3 → step-4 → next-steps
- ai-powered-textarea: overview → step-1 → step-2 → step-3 → step-4 → next-steps

The terminal `next-steps` page has no Next card (per "until the final
one" — it's the wrap-up).

**Dangling import tails removed** from both tutorials' step-2 files —
historical sync-stripper artifact (orphaned `TailoredContent,
TailoredContentOption, } from "..."` block with the opening `import {`
missing).

**interrupt-based nav fix:** `generative-ui/your-components/meta.json`
was missing `interrupt-based` in its `pages` array, so the file
existed on disk but never appeared in the sidebar.

Verified all 13 tutorial / Next-button URLs return 200 in dev.
2026-04-28 13:28:52 -07:00
Sam Julien b1f2538720 feat(shell-docs): retire unselected/ tree, redirect /unselected/* to canonical homes
Final commit of the `unselected/` editorial cleanup. Promotions and
moves landed in earlier commits on this branch — this one removes the
remaining files and adds the redirect rules so old URLs resolve to
the right place.

Removes 33 .mdx files (Cat A: 15 root-canonical, Cat B: 8 BIA-canonical,
Cat D-delete: 1 framework-only `agent-app-context`, plus
duplicate-of-BIA `index.mdx`) and the surrounding `unselected/`
directory scaffolding.

Adds /unselected/* redirect rules in next.config.ts:

- BIA-canonical paths → `/built-in-agent/<path>` (quickstart,
  advanced-configuration, mcp-servers, model-selection, server-tools,
  shared-state, generative-ui/mcp-apps)
- Backend-promoted paths → `/backend/<path>` (ag-ui, copilot-runtime)
- Migrate-to-* → /migrate/* (matches the existing
  /troubleshooting/migrate-to-* redirects from the JTBD work)
- Tutorials → /tutorials/* (catch-all `:path*` rewrite)
- interrupt-based → /generative-ui/your-components/interrupt-based
- agent-app-context → / (concept is per-framework only; legacy URL
  lands on docs root)
- /unselected → /
- Catch-all `/unselected/:path*` → `/:path*` for the Cat A files
  (coding-agents, custom-look-and-feel/*, frontend-tools,
  generative-ui/{a2ui, tool-rendering}, generative-ui/your-components/display-only,
  prebuilt-components/*, programmatic-control,
  troubleshooting/{common-issues, error-debugging})

Inbound link rewrites in MDX content (4 places):

- snippets/shared/backend/custom-agent.mdx — `/unselected/quickstart`
  → `/built-in-agent/quickstart`; `/unselected/ag-ui` → `/backend/ag-ui`
- docs/faq.mdx — `/unselected/model-selection` → `/built-in-agent/model-selection`
- docs/learn/connect-mcp-servers.mdx — `/unselected/copilot-runtime`
  → `/backend/copilot-runtime`
- docs/learn/meta.json — Tutorial: AI Todo App link path

Verified all redirect chains resolve to 200 with the right canonical
final URL: /unselected, /unselected/quickstart, /unselected/coding-agents,
/unselected/mcp-servers, /unselected/ag-ui, /unselected/copilot-runtime,
/unselected/tutorials/ai-todo-app/overview, /unselected/agent-app-context.

Closes editorial pass tracked under PDX-49.
2026-04-28 13:28:52 -07:00
Sam Julien 6ebe0f4471 feat(shell-docs): promote tutorials and interrupt-based out of unselected/
Three unique-content moves from `unselected/`:

- 12 tutorial files in two series (`ai-todo-app/*`, `ai-powered-textarea/*`)
  → `/tutorials/*` with a new `---Tutorials---` section in the top-level
  nav, slotted before Migrate.
- `generative-ui/your-components/interrupt-based.mdx` (403L) →
  `generative-ui/your-components/interrupt-based.mdx` alongside the
  existing `display-only.mdx` and `interactive.mdx` peer pages.

Inline `/unselected/tutorials/*` link references (only in the two
`next-steps.mdx` files) rewritten to `/tutorials/*`.

Fixes a stale meta entry: `tutorials/ai-todo-app/meta.json` referenced
`step-4-copilot-actions` but the actual file was renamed to
`step-4-frontend-tools.mdx` at some point. Aligned the meta to the
real filename.

Outer `tutorials/meta.json` title bumped from `"tutorials"` to
`"Tutorials"` so the matching `---Tutorials---` section header
triggers the existing nav-render dedup (suppresses the redundant
inner group label).

Verified: `/tutorials/ai-todo-app/overview`, `/tutorials/ai-powered-textarea/overview`,
`/built-in-agent/tutorials/ai-todo-app/overview`, and
`/generative-ui/your-components/interrupt-based` all 200 in dev.
2026-04-28 13:28:52 -07:00
Sam Julien 5fa0f63f31 feat(shell-docs): promote unselected/ richer content over root stubs and v1 versions
Nine files where the root version was either a one-line component stub
(`<Inspector />`, `<HeadlessUI />`, `<Observability />`, `<Overview />`)
or used v1 API patterns (`<CopilotKit>` / `@copilotkit/react-core`)
that the unselected/ tree had already updated to v2 patterns
(`<CopilotKitProvider>` / `@copilotkit/react-core/v2`). Promoting the
richer content over the root stubs / v1 versions:

- inspector.mdx (root: 11L stub → 79L of real content)
- premium/headless-ui.mdx (root: 7L stub → 290L)
- premium/observability.mdx (root: 7L stub → 259L)
- premium/overview.mdx (root: 7L stub → 84L)
- generative-ui/your-components/interactive.mdx (root: 21L IntegrationGrid placeholder → 78L with snippet_cell)
- troubleshooting/common-issues.mdx (v1 imports → v2; tighter prose)
- troubleshooting/error-debugging.mdx (v1 imports → v2; "& Observability" added to title; programmatic onError section retained)
- backend/ag-ui.mdx (v1 → v2 imports)
- backend/copilot-runtime.mdx (v1 → v2 imports)

The unselected/ versions weren't a side-tree of duplicate content —
they were the v2-aware refresh that hadn't propagated to root yet.

First commit of the `unselected/` editorial cleanup tracked under
PDX-49. Cat A deletes (root canonical), Cat B deletes (BIA canonical),
D-promote moves (interrupt-based + 12 tutorials), Cat D-delete
(agent-app-context), redirect rules, and inbound link rewrites still
to come.
2026-04-28 13:28:52 -07:00
github-actions[bot] e4984c4536 style: auto-fix formatting 2026-04-28 17:06:40 +00:00
Sam Julien 261c0be08b fix(shell-docs): drop framework-name sidebar link + retire legacy /integrations/ URLs
Two related cleanups that fall out of the soft-default world.

**Framework-name sidebar link** — the labeled "you're reading X's docs"
header link below the framework selector was redundant. The selector
pill above it already identifies the active framework, the breadcrumb
trail at the top of the body covers "go to root," and `/` and
`/<framework>` now render the same docs-landing shell so clicking the
link mostly just changed the URL. Removed from all four call sites:
DocsOverview (unscoped /), FrameworkLandingPage,
NotAvailableForFrameworkPage, and DocsPageView.

DocsPageView's `sidebarTitle` and `backLink` props are gone (no
remaining consumers). Breadcrumb root label is now derived from
`frameworkOverride` at render time — "LangGraph (Python)" on
framework-scoped pages, "Docs" otherwise.

**Legacy `/integrations/<framework>/<slug>` URLs** — the original URL
scheme before `/<framework>/<slug>` shipped. The Notion plan flagged
them as still reachable via UnscopedDocsPage's regex match on
`integrations/...`. Since shell-docs hasn't shipped publicly, no real
inbound links exist; cleaner to retire them than maintain dual schemes.

UnscopedDocsPage's integrationMatch branch is gone. Any
`/integrations/...` URL now 404s. The `integrations/<framework>/`
content tree on disk stays — it's still loaded by the framework
router's per-framework override fallback (e.g. `/built-in-agent/quickstart`
serves `integrations/built-in-agent/quickstart.mdx`). Only the URL
scheme is retired.

search-modal.tsx integration and demo result links now point at the
shell host's integrations explorer (`${SHELL_HOST}/integrations/...`)
instead of the now-404 shell-docs paths.
2026-04-28 09:45:24 -07:00
Sam Julien d02d4e89e5 fix(shell-docs): drop "All docs" sidebar back-link and "Reset to default" dropdown row
Both affordances were vestiges of the pre-soft-default world.

"All docs" pointed at `/`. Before the IA restructure, that was a
distinct picker view; now `/` and `/<framework>` render the same
docs-landing shell with whichever framework is effective. Clicking
the link from a deep page just changed the URL with no visible
content change. The CopilotKit logo in the top header already covers
"go to root," and the framework-name link below the selector covers
"go to this framework's landing." Removed from all three call sites
(feature-page backLink, FrameworkLandingPage sidebar,
NotAvailableForFrameworkPage sidebar).

"Reset to default" set storedFramework to null and navigated to the
unscoped equivalent of the current page. With the CopilotKit row
pinned at the top of the dropdown, picking it does the same thing
end-to-end (effectiveFramework becomes BIA, navigation lands on a
BIA-scoped URL) — the user reaches for the same target either way.
The button only appeared when storedFramework was set, so removing it
loses no on-screen affordance for fresh visitors and one redundant
row for returning visitors.
2026-04-28 09:34:40 -07:00