Skip to content

Commit 8d360c0

Browse files
committed
fix(shell-docs): resolve 53 sitemap 500s before cutover
The 53 hard-500 URLs in the public sitemap split into three independent root causes, all surfaced in production-mode rendering only because the underlying issues throw inside next-mdx-remote: 1. tutorials/ai-powered-textarea/step-2-setup-copilotkit and tutorials/ai-todo-app/step-2-setup-copilotkit reference <CopilotCloudConfigureCopilotKit>, <SelfHostingCopilotRuntimeConfigureCopilotKit>, and crewai-flows/quickstart references <CloudCopilotKit> — three unsuffixed component names whose only registered counterparts in docsComponents end in "Provider". MDX rendering throws "Expected component X to be defined" and 500s. Adds the unsuffixed names as aliases of the existing Provider stubs in mdx-registry. deploy-agentcore (langgraph variants + aws-strands) uses <Content framework="..." />, also unregistered. Adds Content as a children-passthrough stub for the same reason. 2. Three langgraph tutorial pages (agent-native-app/step-6-shared-state, ai-travel-app/step-3-setup-copilotkit, ai-travel-app/step-4-integrate-the-agent) place a closing </Step> tag immediately under a markdown bullet list with no blank line separator. The remark parser treats the closing tag as a list-item continuation, errors out with "Expected the closing tag </Step>", and ships a 500. Adds the missing blank line before the close tag. 3. Five MDX files (llamaindex + adk shared-state/predictive-state-updates, pydantic-ai shared-state/in-app-agent-write, plus crewai-flows and pydantic-ai human-in-the-loop/index — last two not in the 53 but share the bug) use {/\\* ... \\*/} where the asterisks are escaped. Acorn cannot parse the resulting expression and the page 500s. Replaces the escapes with proper {/* ... */} JSX comments. Verified: a clean production build of shell-docs followed by `npx next start` and a curl probe of all 53 URLs from validation/test2_results.json returns 200 across the full set with zero MDX or React errors in the server log.
1 parent 39d1b91 commit 8d360c0

9 files changed

Lines changed: 44 additions & 10 deletions

File tree

showcase/shell-docs/src/content/docs/integrations/adk/shared-state/predictive-state-updates.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Stream in-progress agent state updates to the frontend.
55
---
66

77
{/* TODO: Re-add once the dojo example is updated and works */}
8-
{/\* <IframeSwitcher
8+
{/* <IframeSwitcher
99
id="predictive-state-updates-example"
1010
exampleUrl="https://feature-viewer.copilotkit.ai/adk-middleware/feature/predictive_state_updates?sidebar=false&chatDefaultOpen=false"
1111
codeUrl="https://feature-viewer.copilotkit.ai/adk-middleware/feature/predictive_state_updates?view=code&sidebar=false&codeLayout=tabs"

showcase/shell-docs/src/content/docs/integrations/crewai-flows/human-in-the-loop/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ description: Allow your agent and users to collaborate on complex tasks.
1515
/>
1616

1717
{/* TODO-DOCS-CREWAI-FLOWS: Add Travel App Example */}
18-
{/\* <Callout>
18+
{/* <Callout>
1919
This video shows an example of our [AI Travel App](/langgraph/tutorials/ai-travel-app) using HITL to get user feedback.
2020
2121
</Callout> */}

showcase/shell-docs/src/content/docs/integrations/langgraph/tutorials/agent-native-app/step-6-shared-state.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ In this example, we use the `useCoAgent` hook to wire up the application's state
118118
- For the generic type, we pass the `AgentState` type that was already defined for the application in `@/lib/types.ts`.
119119
- For the `name` parameter, we pass the name of the graph as defined in `agent/langgraph.json`.
120120
- For the `initialState` parameter, we pass the initial state of the LangGraph agent which is already defined in `@/lib/trips.ts`.
121-
</Step>
121+
122+
</Step>
122123
</Steps>
123124

124125
## Recap

showcase/shell-docs/src/content/docs/integrations/langgraph/tutorials/ai-travel-app/step-3-setup-copilotkit.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ And we're done! Here's what we did:
137137
- We setup our Copilot cloud account and got an API key.
138138
- We configured the CopilotKit provider in our application to use our API key.
139139
- We added the CopilotSidebar to our application.
140-
</Step>
140+
141+
</Step>
141142

142143
</Step>
143144
</Steps>
@@ -215,7 +216,8 @@ Here's what we did:
215216
- We imported the `<CopilotSidebar />` component from `@copilotkit/react-ui`.
216217
- We wrapped the page with the `<CopilotKit>` provider.
217218
- We imported the built-in styles from `@copilotkit/react-ui`.
218-
</TailoredContentOption>
219+
220+
</TailoredContentOption>
219221
</TailoredContent>
220222

221223
Now, head back to the app and you'll find a chat sidebar on the left side of the page. At this point, you can start interacting with your copilot! 🎉

showcase/shell-docs/src/content/docs/integrations/langgraph/tutorials/ai-travel-app/step-4-integrate-the-agent.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ In this example, we use the `useCoAgent` hook to wire up the application's state
168168
- For the generic type, we pass the `AgentState` type that was already defined for the application in `@/lib/types.ts`.
169169
- For the `name` parameter, we pass the name of the graph as defined in `agent/langgraph.json`.
170170
- For the `initialState` parameter, we pass the initial state of the LangGraph agent which is already defined in `@/lib/trips.ts`.
171-
</Step>
171+
172+
</Step>
172173
</Steps>
173174
174175
## Try it out!

showcase/shell-docs/src/content/docs/integrations/llamaindex/shared-state/predictive-state-updates.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Stream in-progress agent state updates to the frontend.
55
---
66

77
{/* TODO: Re-add once the dojo example is updated and works */}
8-
{/\* <IframeSwitcher
8+
{/* <IframeSwitcher
99
id="predictive-state-updates-example"
1010
exampleUrl="https://feature-viewer.copilotkit.ai/llama-index/feature/predictive_state_updates?sidebar=false&chatDefaultOpen=false"
1111
codeUrl="https://feature-viewer.copilotkit.ai/llama-index/feature/predictive_state_updates?view=code&sidebar=false&codeLayout=tabs"

showcase/shell-docs/src/content/docs/integrations/pydantic-ai/human-in-the-loop/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ description: Allow your agent and users to collaborate on complex tasks.
1515
/>
1616

1717
{/* TODO: Add Example */}
18-
{/\* <Callout>
18+
{/* <Callout>
1919
This video shows an example of our [AI Travel App](/langgraph/tutorials/ai-travel-app) using HITL to get user feedback.
2020
2121
</Callout> */}

showcase/shell-docs/src/content/docs/integrations/pydantic-ai/shared-state/in-app-agent-write.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,6 @@ function YourMainContent() {
179179
By default, the Pydantic AI Agent state will only update _between_ Pydantic AI Agent node transitions --
180180
which means state updates will be discontinuous and delayed.
181181

182-
{/\* You likely want to render the agent state as it updates **continuously.**
182+
{/* You likely want to render the agent state as it updates **continuously.**
183183
184-
See **[emit intermediate state](/pydantic-ai/shared-state/predictive-state-updates).** \*/}
184+
See **[emit intermediate state](/pydantic-ai/shared-state/predictive-state-updates).** */}

showcase/shell-docs/src/lib/mdx-registry.tsx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,13 @@ export const docsComponents = {
350350
SharedContent: ({ children }: { children: React.ReactNode }) => (
351351
<div>{children}</div>
352352
),
353+
// <Content framework="..." /> is used by orphaned `deploy-agentcore`
354+
// pages (langgraph/* + aws-strands) as a placeholder for content
355+
// that was never authored. Without a registered shim, MDX rendering
356+
// throws and ships a 500 in the public sitemap.
357+
Content: ({ children }: { children?: React.ReactNode }) => (
358+
<div>{children}</div>
359+
),
353360
IframeSwitcher: RealIframeSwitcher,
354361
IframeSwitcherGroup: ({ children }: { children: React.ReactNode }) => (
355362
<div>{children}</div>
@@ -691,6 +698,15 @@ export const docsComponents = {
691698
}: {
692699
children?: React.ReactNode;
693700
}) => <div>{children}</div>,
701+
// Alias of CopilotCloudConfigureCopilotKitProvider — historical
702+
// spelling without the `Provider` suffix appears in tutorials
703+
// (`ai-powered-textarea/step-2`, `ai-todo-app/step-2`). Keeping both
704+
// keys so existing MDX renders without throwing.
705+
CopilotCloudConfigureCopilotKit: ({
706+
children,
707+
}: {
708+
children?: React.ReactNode;
709+
}) => <div>{children}</div>,
694710
GenerativeUISpecsOverview: ({ children }: { children?: React.ReactNode }) => (
695711
<div>{children}</div>
696712
),
@@ -876,6 +892,13 @@ export const docsComponents = {
876892
CloudCopilotKitProvider: ({ children }: { children?: React.ReactNode }) => (
877893
<div>{children}</div>
878894
),
895+
// Alias of CloudCopilotKitProvider — `crewai-flows/quickstart` and
896+
// other historical MDX use the unsuffixed spelling. Without this,
897+
// MDX rendering throws "Expected component CloudCopilotKit to be
898+
// defined" at runtime → 500 in production.
899+
CloudCopilotKit: ({ children }: { children?: React.ReactNode }) => (
900+
<div>{children}</div>
901+
),
879902
SelfHostingCopilotRuntimeCreateEndpoint: ({
880903
children,
881904
}: {
@@ -886,6 +909,13 @@ export const docsComponents = {
886909
}: {
887910
children?: React.ReactNode;
888911
}) => <div>{children}</div>,
912+
// Alias of SelfHostingCopilotRuntimeConfigureCopilotKitProvider —
913+
// `ai-todo-app/step-2-setup-copilotkit` uses the unsuffixed name.
914+
SelfHostingCopilotRuntimeConfigureCopilotKit: ({
915+
children,
916+
}: {
917+
children?: React.ReactNode;
918+
}) => <div>{children}</div>,
889919
AgentState: ({ children }: { children?: React.ReactNode }) => (
890920
<div>{children}</div>
891921
),

0 commit comments

Comments
 (0)