Skip to content

chore(docs): remove Sandpack, the shadcn kit and the legacy docs shell - #236

Merged
pbroom merged 5 commits into
mainfrom
docs/s1-shell
Oct 10, 2026
Merged

pbroom merged 5 commits into
mainfrom
docs/s1-shell

Conversation

@pbroom

@pbroom pbroom commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Slice S1 of the docs overhaul: the foundation for an API-first site. It replaces the shadcn component gallery with a "precision instrument" shell. Per the overhaul plan, content pages arrive in S2–S5.

Built

  • Shell: header with ⌘K search, theme toggle and GitHub link; a filterable sidebar (Start · Concepts · Guides · API by entry point · Map) with a Base UI mobile drawer; an "On this page" outline; a footer that reports whether the display is P3 or sRGB; skip link and landmarks.
  • Tokens: tokens.ts generates tokens.css using color-kit itself. Achromatic neutrals, one P3 accent with sRGB fallbacks, and self-hosted Inter and JetBrains Mono. A test checks 32 contrast pairs per theme.
  • Routes: generated from MDX frontmatter (src/site/routes.ts), with a hook for the generated API data (a fixture until S2).
  • Prerendering: every route is prerendered with react-dom/static (dist/<route>/index.html) and hydrated without warnings. Search is Pagefind, loaded lazily.
  • MDX components for later slices, documented in src/components/ui/: <Example>, <Signature>, <Swatch>/<GamutBadge>, <Callout>, <CodeBlock>, <InstallLine>, and ?highlighted source imports.
  • apps/docs/vercel.json: folds in chore(docs): add Vercel config with SPA rewrites and an out-of-repo pnpm store #233's install and build settings, plus clean URLs, redirects from the old /docs/* and /reference/* paths, and immutable asset caching. It deliberately has no SPA catch-all rewrite: every route is prerendered, and a catch-all would serve the home page with a 200 on typos. Vercel serves 404.html instead.

Removed

386 files and about 48.6k lines: vendor/sandpack (335 files), the shadcn kit, legacy CSS, the inspector and right rail, the component-doc pages and the old demos. Old MDX moved to src/content/_legacy/ for S4 to draw on.

Dependencies dropped: radix-ui, cva, lz-string, tw-animate-css, tailwind-merge, @tailwindcss/typography, Sandpack.

Budgets

  • Home initial JS: 86.6 kB gzip (budget 110).
  • Largest chunk: vendor-react at 194.8 kB (limit 200).
  • Prerender: 14 routes in 0.11 s.

Verified

  • Full repo gates pass, including 70 new docs tests.
  • In the browser:
    • Theme toggles with no flash.
    • ⌘K opens and closes search.
    • The skip link works.
    • The drawer works at 375 px.
    • Deep links load from prerendered HTML with no hydration warnings.
    • axe reports 0 violations on the sampled pages in dark mode.

Supersedes #233 once merged.

Part of the color-kit assessment stack (#204 → #236).

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
color-kit Ready Ready Preview Oct 10, 2026 8:08pm UTC

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T03:12:04.004340Z c674abb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This was referenced Oct 8, 2026

@pbroom pbroom left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Reviewed the full incremental PR and its corrections at fe27c4eeaa27e1865e34511ec75077db7e7ff5cb. Shell reviewed; focus, breakpoint, route-error landmark, storage, search failures, emitted contrast and favicon/smoke corrected. No remaining actionable findings in the reviewed scope.

Independent correction re-reviews and stack preservation verification passed. At the integrated tip, lint, full build/DTS, 2,208 tests, formatting, strict agent checks and 14 built-site Chrome tests passed. All recorded actionable review threads are addressed. Hosted CI is being verified separately; this review does not authorize merge or release.

pbroom commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner Author

Merge activity

  • Oct 10, 6:47 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Oct 10, 8:05 PM UTC: Graphite rebased this pull request as part of a merge.
  • Oct 10, 8:06 PM UTC: @pbroom merged this pull request with Graphite.

@pbroom
pbroom changed the base branch from docs/s0-jsdoc-and-surface to graphite-base/236 October 10, 2026 20:01
@pbroom
pbroom changed the base branch from graphite-base/236 to main October 10, 2026 20:03
pbroom and others added 5 commits October 10, 2026 20:04
Delete vendor/sandpack and every Sandpack consumer, the shadcn UI kit,
legacy-docs.css/docs.css, the inspector and right rail, the component-doc
route and its data, and components.json. Move the graphics demos to
src/examples/interop/graphics and park the old MDX under
src/content/_legacy (unrouted) for the content slices to mine.

Swap dependencies up front for the overhaul: drop radix-ui, @radix-ui/*,
cva, lz-string, tw-animate-css, tailwind-merge and @tailwindcss/typography;
add remark-frontmatter, remark-mdx-frontmatter, rehype-slug, self-hosted
Inter and JetBrains Mono, d3-hierarchy, d3-shape, pagefind, vitest,
vite-node, yaml, @playwright/test and @axe-core/playwright.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rerender

- Tokens: src/styles/tokens.ts generates tokens.css with color-kit
  (toSrgbGamut/toCss fallbacks, display-p3 overrides): achromatic
  --gray-0..12, one P3 accent, dark theme on [data-theme=dark], type and
  grid scales. A vitest suite checks the CSS is in sync and every
  text/UI pair with contrastRatio (4.5 / 3).
- Shell: header (wordmark, search, theme toggle, GitHub), filterable
  sidebar in package order with a Base UI drawer below 960 px, 680/920 px
  content grid, On this page at 1280 px, footer display-gamut readout,
  skip link, focus ring tokens, reduced motion.
- Routes: src/site/routes.ts is driven by MDX frontmatter globs plus an
  API route index hook (fixture until S2 drops src/generated/api.json).
- MDX contracts: Example, Signature, Swatch/GamutBadge, Callout,
  CodeBlock (Shiki CSS-variables theme), InstallLine; plugins for
  ?highlighted and ?frontmatter imports.
- Prerender: entry-server + scripts/prerender.mjs write
  dist/<route>/index.html with per-route meta and modulepreloads; the
  client loads the route chunk before hydrateRoot.
- Search: lazy Base UI dialog, symbol slot plus Pagefind prose search.
- Budgets: chunk <= 200 kB, home JS <= 110 kB gzip, enforced in build.
- vercel.json with clean URLs and redirects from /docs/* and /reference.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@pbroom
pbroom merged commit 043679a into main Oct 10, 2026
6 of 7 checks passed
@pbroom
pbroom deleted the docs/s1-shell branch October 10, 2026 20:06

This branch was successfully deployed

1 active deployment
Preview — f6dd0249 Deployed Oct 10, 2026 by vercel[bot]
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