Skip to content

feat(site): restyle the docs in the site's shell on dev.opencode.ai - #62425

Merged
adamdotdevin merged 1 commit into
devfrom
docs-restyle
Nov 6, 2026
Merged

adamdotdevin merged 1 commit into
devfrom
docs-restyle

Conversation

@adamdotdevin

@adamdotdevin adamdotdevin commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Restyles the V2 docs into the site's shell and David's docs components, on dev.opencode.ai only. opencode.ai keeps today's docs, unchanged, until a one-line flip after sign-off (restyled in src/docs/config.ts; src/docs/AGENTS.md, "Restyle"). Stacked on #62424 (merged).

What readers see on dev.opencode.ai/docs:

  • The site's docs layout: the logo and section lockup (DOCS ▾, with V2/V1 under Docs) over the section's [ ] nav, the article, and search over the Contents rail; the site's footer with the status bars and theme switch. Phones get the top bar with search, the menu sheet, the section menu and the Contents bar.
  • David's locked component options (docsVariants): Typography 4, square-marker lists, tinted callouts, Vercel square code with Copy, full-grid tables, cards, plan tabs, Previous/Next and Edit on GitHub, with Copy as Markdown at the article's end.
  • Fenced code in the site's CodeFrame: shell blocks as a terminal that copies only the $ commands, ├── trees as FileTree, file titles with their icon, and syntax colors from David's code tokens (each at least 4.5:1 in both themes). h2 and h3 copy their address.
  • /docs/api in the same layout: a section per resource (titled, anchors unchanged) with endpoint and schema cards that open on their address.
  • One content fix on the intro: "open source coding agent", as on the site. This sentence also reaches opencode.ai.

URLs, Markdown twins (.md and Accept: text/markdown), llms.txt, the sitemap, Pagefind search, the V1 redirects and every funnel key keep working. Pages stay prerendered HTML with no hydration: one script, 5.7 kB gzipped, and one stylesheet, 26.0 kB gzipped; the build fails above 6.5 kB and 28 kB. The old docs moved unchanged to src/docs/legacy/. Building both modes in check-docs is #62428, which needs a .github/ team review.

How did you verify your code works?

On an exe.dev VM, rebased on origin/dev at fe2cbf6:

  • bun typecheck, bun run typecheck:tsc, bun test (new test/docs-rehype.test.ts), root bun run check.
  • Both docs builds and both full site builds (Worker start: /docs/ 200, Markdown twin 200, /v2/docs/config/ 301, /docs/ja/ 302).
  • Parity: the production build's /docs output is identical to origin/dev's except the intro sentence above (and the search index built from it).
  • A 131-check headless Chromium sweep over 9 pages at 1440 and 390, light and dark: the nav, title and search share one top line (within 1.5px), only the allowed radii, layout shift under 0.01, no horizontal overflow (RTL too), the nav's edge fade, code blending inside callouts, Copy keeping its width, no console errors, and every interactive piece (lockup menus by mouse and keyboard, search with ⌘K, / and the buttons, code and plan tabs, copy, heading links, Copy as Markdown, theme, phone menu, section menu, Contents bar, API cards).

Not tested: WebKit and Firefox (Firefox lacks text-box, so the top line can be a few px off there).

Visual

<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72" fill="currentColor">
  <style>
    .a{animation:a 6s cubic-bezier(.4,0,.2,1) infinite}
    .p{animation:p 6s steps(1,end) infinite}
    @keyframes a{0%,20%{transform:translateY(0)}45%,70%{transform:translateY(-30px)}90%,100%{transform:translateY(0)}}
    @keyframes p{0%{transform:translateY(0)}30%{transform:translateY(7px)}45%{transform:translateY(14px)}75%{transform:translateY(7px)}88%{transform:translateY(0)}}
    @media (prefers-reduced-motion:reduce){.a,.p{animation:none}}
  </style>
  <defs><clipPath id="v"><rect x="56" y="0" width="120" height="72"/></clipPath></defs>
  <rect x="8" y="7" width="6" height="7.5"/>
  <rect x="18" y="9.5" width="15" height="2.5" opacity=".75"/>
  <g opacity=".3">
    <rect x="18" y="24" width="20" height="2"/><rect x="18" y="31" width="26" height="2"/>
    <rect x="18" y="38" width="16" height="2"/><rect x="18" y="45" width="22" height="2"/>
    <rect x="18" y="52" width="18" height="2"/><rect x="18" y="59" width="24" height="2"/>
  </g>
  <rect x="8" y="23.5" width="6" height="3" opacity=".9"/>
  <rect x="18" y="24" width="20" height="2" opacity=".6"/>
  <g clip-path="url(#v)">
    <g class="a">
      <rect x="60" y="8" width="38" height="6" opacity=".85"/>
      <rect x="60" y="20" width="96" height="2" opacity=".35"/>
      <rect x="60" y="25" width="70" height="2" opacity=".35"/>
      <rect x="60.5" y="32.5" width="110" height="24" fill="none" stroke="currentColor" stroke-opacity=".3"/>
      <rect x="61" y="33" width="109" height="7" opacity=".07"/>
      <rect x="64" y="35.5" width="16" height="2" opacity=".45"/>
      <rect x="159" y="35.5" width="8" height="2" opacity=".45"/>
      <rect x="64" y="45" width="10" height="2" opacity=".75"/><rect x="77" y="45" width="24" height="2" opacity=".5"/>
      <rect x="64" y="50" width="34" height="2" opacity=".35"/>
      <rect x="60" y="64" width="26" height="3" opacity=".7"/>
      <rect x="60" y="72" width="100" height="2" opacity=".35"/>
      <rect x="60" y="77" width="84" height="2" opacity=".35"/>
      <rect x="60.5" y="84.5" width="110" height="16" fill="none" stroke="currentColor" stroke-opacity=".3"/>
      <rect x="61" y="85" width="109" height="7" opacity=".07"/>
    </g>
  </g>
  <rect x="186" y="7" width="46" height="8" opacity=".08"/>
  <rect x="190" y="10" width="14" height="2" opacity=".45"/>
  <g opacity=".35">
    <rect x="190" y="24" width="24" height="2"/><rect x="190" y="31" width="30" height="2"/>
    <rect x="190" y="38" width="20" height="2"/><rect x="190" y="45" width="26" height="2"/>
  </g>
  <rect class="p" x="186" y="23" width="1.5" height="4" opacity=".9"/>
</svg>

Screenshots / recordings

Today (opencode.ai) Restyle (dev.opencode.ai)

@adamdotdevin
adamdotdevin requested a review from a team as a code owner November 6, 2026 20:47
Base automatically changed from docs-restyle-prep to dev November 6, 2026 20:54

@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 issues. The --mode production docs build matches pr/base byte for byte except the intro sentence (and its search index), so opencode.ai stays as it is until the restyled flip.

What I ran: bun test in services/site (187 pass) and bun run typecheck:tsc both passed. Both docs builds passed, the dev one with its JS/CSS budgets. Every /docs/_build file the pages and stylesheet refer to exists. A full script/build.ts --mode dev site build also passed, including the Worker start check (/docs/ 200, /v2/docs/config/ 301, /docs/ja/ 302). I couldn't open the restyled pages in a browser here, so the interactive parts are covered only by your Chromium sweep.

Public API: unchanged. Docs URLs, Markdown twins, llms.txt, the sitemap and funnel keys stay as they are; the only new thing is the internal restyled switch.

@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.

The new head is the same commit rebased onto dev with #62424 merged (git range-diff shows no change to the patch). My earlier review left no open points. On the new base, bun test (187 pass) and bun run typecheck:tsc pass, and both docs builds pass. The production /docs output still matches dev except the intro sentence. I couldn't open the pages in a browser, so the visual and interactive parts are covered only by your Chromium sweep.

Public API: unchanged.

The docs render in the site's docs layout with David's docs components:
the logo and section lockup over the section nav, the article in the
locked docs options, search over the Contents rail, and the site's
footer. Fenced code renders in the site's code frame with Copy, h2 and
h3 copy their address, and the API reference uses endpoint cards that
open on their address. Everything stays prerendered HTML driven by one
delegated script (5.6 kB gzipped) and one stylesheet (25.9 kB gzipped).

The build's mode picks the design: --mode dev (dev.opencode.ai and CI)
renders the restyle, and the production build keeps the current docs,
moved unchanged to src/docs/legacy, until David approves the flip
(src/docs/AGENTS.md). check-docs builds both modes.
@adamdotdevin
adamdotdevin merged commit cd47971 into dev Nov 6, 2026
16 checks passed
@adamdotdevin
adamdotdevin deleted the docs-restyle branch November 6, 2026 21:09
autonull pushed a commit to autonull/opencode_spacegraph that referenced this pull request Nov 7, 2026
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