Skip to content

feat(docs): ExampleCode include + guards; retire the walkthrough renderer - #1025

Merged
blove merged 24 commits into
mainfrom
blove/docs-example-first-infra
Sep 5, 2026
Merged

feat(docs): ExampleCode include + guards; retire the walkthrough renderer#1025
blove merged 24 commits into
mainfrom
blove/docs-example-first-infra

Conversation

@blove

@blove blove commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

PR 1 of the example-first docs program (spec: docs/superpowers/specs/2026-09-05-docs-example-first-content-design.md, plan: docs/superpowers/plans/2026-09-05-docs-example-first-infrastructure.md).

  • <ExampleCode file= region= title=> renders a docs page's example files through the docs MDX pipeline (same highlighting, copy button, styles; titled card; role="group"). Unresolvable includes fail the build naming the page. Raw sources travel only to the server-rendered component; the client workspace gets codeSources: {}.
  • Guard apps/website/src/lib/docs-example-code.spec.ts: mapped pages include their example (40 pending, streaming converted), includes resolve by the component's own rule, docs-only pages never include, and the suite cannot pass vacuously.
  • Deleted the never-rendered walkthrough machinery: docsAssetPaths (registry, 41 example modules, regenerated deployments/ag-ui-dev), renderMarkdown, NarrativeDocs, trackNarrativeAction, narrative CSS. The 41 cockpit/**/docs/guide.md files stay until each product PR absorbs them.
  • CONTRIBUTING gains "Docs pages and example code".

Verification: nx run-many -t test,lint green on cockpit-registry, cockpit-shell, workspace-react, website, scripts; nx build for the three libs; GROWTH_FORM_POLICY=growth_v1 nx build website renders the streaming include (data-example-file present, highlighted pre); mutation check with file="nope.ts" fails the build with the page-named error.

Follow-ups (not here): drop the now-unused marked from libs/cockpit-shell/package.json (lockfile edit); decide CodeGroup × ExampleCode support in PR 2.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
threadplane Ready Ready Preview Sep 5, 2026 11:34pm UTC

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@blove
blove enabled auto-merge (squash) September 5, 2026 23:29
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

blove and others added 24 commits September 5, 2026 16:29
…, walkthrough retirement

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…, walkthrough machinery removal

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…TML markers

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ough the docs MDX pipeline

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…am-free code card

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rces stay server-side

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… failure messages

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es to dist/

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ple; wrap long ExampleCode titles

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…longer a registry asset

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e bundle

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…alytics hook

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ed; drop the last narrative CSS

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…hem; retitle the prose layer comment

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…X pages name their route in ExampleCode errors; spec matches the shipped rendering path

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@blove
blove force-pushed the blove/docs-example-first-infra branch from 0e6c105 to d02552c Compare September 5, 2026 23:29
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@blove
blove merged commit a350738 into main Sep 5, 2026
71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant