Derive snippet component names from SNIPPET_MAP in docs-render.tsx at
runtime instead of maintaining a hardcoded 35-entry set that was already
13 entries behind. Replace name-level handledByInline gate with per-match
inline pattern check to fix a false-negative path. Align function
signature with sibling check functions. Add 3 unit tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6 prebuilt-components pages were missing their PrebuiltComponents import,
causing the inlineSnippets regex to skip them and drop the framework prop
(iframe URLs defaulted to langgraph). 8 HITL pages had copy-pasted code
examples using the deprecated v1 parameters array format instead of Zod
schemas. Added a component-imports validation check to verify-shell-docs.ts
to catch missing snippet imports going forward.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These scripts existed solely to sanity-check the v1-docs → shell-docs
cutover during this PR. The cutover is now landed, so the audit
pipeline has no further job:
Removed
- audit-docs-porting.ts (+ test) — produced per-framework JSON
summaries of what still needed porting. Referenced only by its
own package.json script entry and a comment in
verify-shell-docs.ts.
- split-baseline.mjs — orphan helper that read
audit-output/_summary.json + verify-baseline.txt and wrote
per-framework .baseline.txt files. Not in package.json, not in
any workflow.
- lib/component-mapping.ts — 80-row v1-component → v2-strategy
table. Zero consumers anywhere in the repo (verified via
`grep -rln "component-mapping\|COMPONENT_MAPPING"`).
- audit-output/.gitkeep + showcase/scripts/.gitignore — the
.gitkeep was a placeholder for the audit pipeline's output
directory; the .gitignore's three entries (audit-output/*.json,
audit-output/*.baseline.txt, verify-baseline.txt) all referenced
files only produced/consumed by the deleted scripts.
- audit-docs-porting script entry in showcase/scripts/package.json.
- The comment cross-reference to audit-docs-porting.ts in
verify-shell-docs.ts's fenced-code-strip rationale.
Kept (still actively useful)
- verify-shell-docs.ts (+ test) — ongoing docs validator wired into
`pnpm verify-shell-docs`; catches dead inline-demo refs, unknown
snippet regions, broken internal links, and unresolved alias
imports.
- lib/essential-content.ts (+ test) — page-shape rule engine
consumed by verify-shell-docs.
- probe-shell-docs.ts — URL-coverage crawler (not in package.json
but runnable via `tsx`; kept as a one-off utility).
Net diff: 905 lines removed, 1 line touched (verify-shell-docs.ts
comment update). Tests: 594/594 passing across 27 files in
showcase/scripts. Parity: exit 0.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Six fixes from CR Round 1 partition, all bucket (a):
- frontend_tools.py: docstring claimed the file was "Chat Customization
(CSS) demo" but langgraph.json wires it as the Frontend Tools demo
graph, and the new MDX setup snippets cite this exact file via the
freshly-added `# region: middleware` markers. Users following the
langgraph-python copilot-middleware setup would see CSS-demo wording
on a Frontend Tools page. Rewrote the docstring to match what the
cell actually demonstrates (mirroring the sibling
frontend_tools_async.py phrasing).
- page.tsx mergeFrameworkNav: when introNode was non-null AND the root
nav had no "Get Started" section, introNode was prepended to rootNav
shifting every existing index +1. The adjustment block only added +1
when getStartedIdx !== -1, so the splice-back position for the
framework section was off-by-one in the no-Get-Started branch — the
framework header rendered one slot too early in the sidebar.
- docs-page-view.tsx h2/h3 overrides: `{...rest}` was spread AFTER
`id={id}`, so an MDX-supplied `<h2 id="custom">` would override the
slugified id and silently break the TOC anchor + any inbound deep-
links keyed on the slug. Reordered the spread so rest comes first
and the slug-id always wins.
- probe-shell-docs.ts: terminated with bare `main();` while every
sibling script (audit-docs-porting, verify-shell-docs) wraps in
`.catch(e => { console.error(e); process.exit(1); })`. A rejected
main() would surface as an unhandled rejection on older Node
runtimes and exit 0 in CI, masking failure. Aligned with the
established pattern.
- verify-shell-docs.ts: all four regex checks (InlineDemo refs,
Snippet regions, internal links, alias imports) scanned page.body
raw without first stripping fenced code blocks. Any docs page that
showed example code containing `<InlineDemo demo="x" />`,
`[link](/path)`, or `import x from "@/..."` triggered a false-
positive validator failure. Mirrors audit-docs-porting.ts's
FENCED_CODE_RE approach. Adds a regression test that fails without
the strip.
- 3 new MDX content fixes:
* mcp-apps.mdx + open-generative-ui.mdx: removed duplicate `<Callout>`
"Free course" blocks (the same Callout appeared twice on each
page, separated only by the Key Benefits list).
* subagents.mdx: changed `[OnStateChanged, OnRunStatusChanged]` to
`[UseAgentUpdate.OnStateChanged, UseAgentUpdate.OnRunStatusChanged]`
— the bare identifiers aren't exported (the reference doc
`useAgent.mdx` confirms the qualified form), so a user copying
the snippet would hit an import error.
Call-site enumeration:
- frontend_tools.py: only langgraph.json + the new setup MDX files
reference this file by name; both consume the region markers, not
the docstring. Docstring rewrite has zero call-site impact.
- mergeFrameworkNav: single caller (FrameworkScopedDocsPage at this
file's bottom). The new branch covers a strictly broader case;
the original splice/replace paths are unchanged.
- h2/h3: only used by the MDXRemote `components` map below. Spread
order is a local prop-precedence change; no upstream callers.
- probe-shell-docs main(): no external callers.
- verify-shell-docs check functions: 4 exported functions called
from runChecks() below + the test file. Strip is internal to each
function so signature is unchanged.
- UseAgentUpdate: confirmed exported from `@copilotkit/react-core/v2`
per reference doc useAgent.mdx; no implementation change needed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fumadocs/Next.js route groups like (other) are stripped from URL paths, so
a file at (other)/telemetry.mdx is served at /telemetry. loadKnownRoutes()
now filters those segments before registering routes, eliminating false-positive
dead-link failures for pages inside route-group directories.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>