Repository navigation
feat(site): restyle the docs in the site's shell on dev.opencode.ai - #62425
Conversation
f764b3c to
64994ae
Compare
cae4446 to
5a589d4
Compare
There was a problem hiding this comment.
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.
64994ae to
bb89718
Compare
There was a problem hiding this comment.
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.
bb89718 to
aa7fb9d
Compare
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 (
restyledinsrc/docs/config.ts;src/docs/AGENTS.md, "Restyle"). Stacked on #62424 (merged).What readers see on dev.opencode.ai/docs:
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.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.CodeFrame: shell blocks as a terminal that copies only the$commands,├──trees asFileTree, 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/apiin the same layout: a section per resource (titled, anchors unchanged) with endpoint and schema cards that open on their address.URLs, Markdown twins (
.mdandAccept: 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 tosrc/docs/legacy/. Building both modes incheck-docsis #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(newtest/docs-rehype.test.ts), rootbun run check./docs/200, Markdown twin 200,/v2/docs/config/301,/docs/ja/302)./docsoutput is identical to origin/dev's except the intro sentence above (and the search index built from it).Not tested: WebKit and Firefox (Firefox lacks
text-box, so the top line can be a few px off there).Visual
Screenshots / recordings