Skip to content

feat(site): ship the restyled docs to opencode.ai - #62466

Merged
adamdotdevin merged 1 commit into
devfrom
docs-flip
Nov 7, 2026
Merged

adamdotdevin merged 1 commit into
devfrom
docs-flip

Conversation

@adamdotdevin

Copy link
Copy Markdown
Member

What does this PR do?

Ships the restyled docs (#62424, #62425) to opencode.ai/docs. Readers there now get the same docs dev.opencode.ai has served since #62425: the site's shell with David's docs components, the lockup menu, the bracketed section nav, the Contents rail, the site's search palette and the phone menus. URLs, Markdown twins (Accept: text/markdown and /docs/<page>.md), llms.txt, the sitemap (opencode.ai URLs), Pagefind search, the V1 fallbacks (/docs/ja/ → /v1/docs/ja/) and the funnel attributes stay as they are. dev.opencode.ai keeps its noindex from #62430.

The build-time switch is gone, so every deploy builds the same docs:

  • deleted src/docs/legacy/ (the old document, layout, components, rehype plugins, client.ts and global.css)
  • removed restyled(mode) from src/docs/config.ts, the restyle option in vite.ts, script/build.ts and render.tsx, and restyle in virtual:docs-pages
  • the docs build always applies the production CSS plugins, the JS and CSS budgets and the Pagefind exclusions
  • src/docs/AGENTS.md describes the one design

check-docs.yml still passes --mode dev to the docs build. The build accepts and ignores it so CI keeps passing without touching .github/**. A follow-up can drop --mode dev from the workflow and the option from src/docs/script/build.ts together. #62428 (build both modes in CI) no longer applies.

How did you verify your code works?

  • services/site: bun typecheck, bun run typecheck:tsc, bun test (192 pass); root bun run check
  • Full bun script/build.ts --mode production and --mode dev on an exe.dev VM: both pass the budgets (client 5.7 kB, docs.css 26.0 kB gzipped), link validation, the asset-prefix check and the Worker start check (production without X-Robots-Tag, dev with it). 70 pages, 69 Markdown twins
  • /docs output of the production build is byte-identical to the dev build's and to origin/dev's --mode dev output (diff -r, same hashed files as dev.opencode.ai serves today: docs-D6fIs2-I.css, client-Cjc98lXL.js). The only difference between the two deploys is dev's noindex rule in _headers
  • Headless Chromium against the production Worker in Miniflare: /docs/config/ renders with the sidebar and Contents, search for "keybinds" returns 5 results and closes on Escape, the lockup menu opens and closes (outside click, keyboard), the phone menu opens and closes at 390 px, no console errors

Visual

<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72" fill="none" stroke="currentColor">
  <style>
    .old{animation:o 4s ease-in-out infinite}
    .new{opacity:0;animation:n 4s ease-in-out infinite}
    @keyframes o{0%,35%{opacity:.5}50%,85%{opacity:0}100%{opacity:.5}}
    @keyframes n{0%,35%{opacity:0}50%,85%{opacity:1}100%{opacity:0}}
    @media (prefers-reduced-motion:reduce){.old,.new{animation:none}.old{opacity:0}.new{opacity:1}}
  </style>
  <rect x="44" y="6" width="152" height="60" rx="4" stroke-opacity=".35"/>
  <g class="old" stroke-width="1.5">
    <path d="M44 16h152" stroke-opacity=".6"/>
    <path d="M78 16v50" stroke-opacity=".6"/>
    <path d="M52 24h18M52 31h14M52 38h16M88 26h60M88 34h90M88 42h80M88 50h70"/>
  </g>
  <g class="new" stroke-width="1.5">
    <rect x="52" y="12" width="6" height="6" fill="currentColor" stroke="none"/>
    <path d="M62 15h12"/>
    <path d="M52 26h3M52 33h3M52 40h3M52 47h3" stroke-opacity=".5"/>
    <path d="M58 26h12M58 33h14M58 40h10M58 47h13"/>
    <path d="M90 16h44" stroke-width="2.5"/>
    <path d="M90 28h62M90 36h56" stroke-opacity=".7"/>
    <rect x="90" y="43" width="62" height="14" rx="1.5" stroke-opacity=".6"/>
    <path d="M164 15h24M164 26h18M168 33h14M168 40h16" stroke-opacity=".6"/>
    <path d="M164 24v4" stroke-width="2"/>
  </g>
</svg>

@adamdotdevin
adamdotdevin enabled auto-merge (squash) November 7, 2026 01:21
@adamdotdevin
adamdotdevin merged commit a1dfa56 into dev Nov 7, 2026
15 checks passed
@adamdotdevin
adamdotdevin deleted the docs-flip branch November 7, 2026 01:22

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No blocking problems. With legacy/ and the restyled switch gone, every docs build renders the restyle, and nothing still points at the removed code.

I ran the docs build after bun run generate twice, once with --mode dev and once with the production default. Both pass the budgets, link validation and the asset-prefix check, and the two outputs are byte-identical, with the same hashed files dev.opencode.ai serves (client-Cjc98lXL.js, docs-D6fIs2-I.css). typecheck:tsc and bun test (192) pass.

The public API is unchanged: this is internal to the site build, and --mode on the docs build is still accepted and ignored, so check-docs.yml keeps working.

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