Skip to content

feat(docs): apply the ar.io brand kit; fix hydration, mobile overflow and price-as-math bugs - #202

Merged
vilenarios merged 6 commits into
mainfrom
docs/brand-pass
Nov 16, 2026
Merged

vilenarios merged 6 commits into
mainfrom
docs/brand-pass

Conversation

@vilenarios

Copy link
Copy Markdown
Contributor

This PR checks the site against the ar.io brand kit (agents.json). I scanned every page with Playwright, all 348 of them, in three modes: light, dark, and 390px mobile. For each one I recorded a screenshot plus DOM checks for fonts, text contrast, horizontal overflow, broken images and console errors.

Before → after (348 pages × 3 modes)

Check Before After
Pages with horizontal scroll at 390px 23 0
Text below WCAG AA contrast ~4,900 elements (muted text at 60%) 0
Broken images 2 0
React hydration errors 2 pages 0
Headings in the brand face (Besley 800) 0 all page titles and prose headings
Dark mode on brand palette no (stock Fumadocs grey) yes

Brand

  • Type: Besley 800 for page titles and prose h1–h4, with tight leading and −0.02em tracking. Body text stays Plus Jakarta Sans. UI chrome and card titles stay in the body face.
  • Dark mode: the kit's deep dark #0e0a1c, with lavender #D4C6FF for links, active states and focus. Primary purple is only 2.3:1 on deep dark, so it appears there only as a tint.
  • Light mode: subtle border #E6E4EF. The sidebar sits on the page colour, because the kit reserves #F0F0F0 for cards, not full-height panels. Info callouts use the primary colour instead of Fumadocs blue.
  • Text hierarchy: muted text is set by opacity, as the kit asks, at 70% rather than 60%. At 60% it was 4.0:1 on the card grey, which fails AA.
  • Focus: :focus-visible draws a 2px outline with a 2px offset, per the kit, instead of Fumadocs' box-shadow rings.
  • Mermaid: a branded base theme for light and dark, replacing the stock default and dark themes.
  • Logo and assets: both logo variants render and CSS picks one. Before, a post-hydration swap flashed the black logo on dark pages. The white logos and the favicon now match the official files on ar.io/brand.
  • Hard-coded colours: the green "Recommended"/"Earn rewards" badges, the orange-on-grey Tip, and the #5B2AD1 banner now use brand tokens. The colours inside reader code samples in the browser guides are left alone.

Bugs found by the scan

  • Prices rendered as LaTeX. remark-math typeset $100 top up buys credits worth $65 as math, on /build/upload/turbo-credits and two generated Turbo SDK pages. The docs contain no intentional inline math, so single-dollar math is now off. $$…$$ still works.
  • Hydration error #418 on /build/access and /build/run-a-gateway. The cards put <p>/<div> inside Fumadocs' description <p>, which is invalid HTML. That content moved to card children.
  • Mobile overflow came from long inline code, single-word titles like TurboAuthenticatedClient, API heading anchors whose minimum width was a URL path, fixed-width screenshots and a fixed 560px video embed.
  • Broken screenshots on the ArNS UI guides: both pointed at / instead of /content/.
  • Invisible ar.io SDK card icon: a white logo on a light card.
  • Nav polish: "AI Agents & LLMs" had no sidebar icon, so it was misaligned. "Wayfinder SDK's" had a stray apostrophe.

Not in this PR (already in the fix plan)

Verification

yarn lint, npx tsc --noEmit, check-links (0 errors) and yarn build all pass. The final Playwright scan reports 0 console errors, 0 broken images, 0 overflow and 0 contrast failures across every page in all three modes.

Deploy note: this changes the CSS bundle and source.config.ts, so every page re-uploads once. Ship it in the same deploy as #201, which has the same effect, so the full re-upload happens once.

🤖 Generated with Claude Code

… and price-as-math bugs

Brand (ar.io/brand-kit agents.json):
- Besley 800 headings (page title and prose h1-h4), Plus Jakarta Sans body.
- Dark mode: deep dark #0e0a1c with lavender #D4C6FF accents, replacing
  stock Fumadocs neutral grey. Light: subtle border #E6E4EF, sidebar on
  the page colour, info callouts in primary purple.
- Muted text at 70% opacity (5.4:1 on #F0F0F0; 60% failed WCAG AA).
- :focus-visible is a 2px outline in primary/lavender, not a shadow ring.
- Mermaid uses a branded base theme for light and dark.
- Logo renders both variants and lets CSS choose (no dark-mode flash);
  white logos and favicon synced to the official files.
- Brand tokens replace hard-coded green badges, orange Tip, #5B2AD1 banner.

Bugs:
- remark-math typeset prices as LaTeX ("$100 ... $65") on turbo-credits
  and two Turbo SDK pages; single-dollar inline math is now off.
- React hydration error #418 on /build/access and /build/run-a-gateway:
  card descriptions put <p>/<div> inside Fumadocs' <p>.
- Mobile horizontal scroll on 23 pages: long inline code, titles, API
  heading anchors, fixed-width screenshots, a 560px video embed.
- Two broken screenshots on the ArNS UI guides (wrong path).
- ar.io SDK card icon was a white logo on a light card (invisible).
- "AI Agents & LLMs" nav item had no icon; "Wayfinder SDK's" typo.

Verified: lint, tsc, check-links, build; a Playwright scan of all 348
pages in light, dark and 390px mobile reports 0 console errors, 0 broken
images, 0 horizontal overflow, 0 text-contrast failures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vilenarios
vilenarios requested a review from a team as a code owner November 16, 2026 14:50
vilenarios and others added 3 commits November 16, 2026 10:41
- Mermaid diagrams no longer shrink to fit: a flowchart that would render
  below 65% scale is redrawn in the other direction (LR <-> TB) when that
  is narrower, per the brand kit's "stacked rendition" rule; anything still
  too wide (sequence diagrams, the two architecture charts) keeps legible
  text and scrolls inside its frame. Before, 11 diagrams rendered below 60%
  scale on desktop and 30 of 36 on a 390px phone (down to ~3px text).
- Replace hard-coded Tailwind/Material colours (blue, green, orange, red,
  pastels) in 8 pages with brand node roles (dg-strong, dg-soft, dg-muted,
  dg-dashed) styled in global.css for light and dark.
- Diagrams render in a <figure> with role="img" on the SVG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every diagram and the prose around it was checked against current
upstream code (ar-io-node main at Release 88, ar-io-solana-contracts,
ar-io-observer, ar-io-cranker, ar-io-sdk 4.5.2, wayfinder,
ardrive-core-js, ardrive-web) and live mainnet settings, then checked a
second time by a reviewer that had not written it.

- Mermaid.tsx: accTitle becomes the visible figcaption; sequence
  messages wrap so diagrams fit the column
- 36 diagrams -> 24, redrawn to the brand kit: every arrow labelled,
  every path ended, gateways drawn as peers, captions for all
- Straight chains and duplicates became lists, ArFS tag trees a table,
  the made-up v0.15 Gantt the real release dates
- Fixed wrong mechanics: ArFS drive upgrade, x402 settle-before-serve,
  background data verification, retrieval order and peer weighting,
  returned-name revenue split, epoch pipeline, program calls, ANT
  controller limit, ClickHouse query routing, and more
- Plain-language pass: say it once, glossary terms, sentence-case
  headings, no em dashes or unverifiable claims
- Glossary: fixed CPI, Epoch Pipeline and Wayfinder entries
- Real alt text for the 13 troubleshooting screenshots
- CLAUDE.md: diagram rules

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vilenarios and others added 2 commits November 16, 2026 16:13
docs(diagrams): accurate, captioned, plain-language diagrams
Resolve the CLAUDE.md conflict with #201: keep its <Image> (next/image)
and Lucide-shadowing lines, and this branch's Mermaid, Math and Brand lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vilenarios
vilenarios merged commit 0a658e9 into main Nov 16, 2026
1 check passed
@vilenarios
vilenarios deleted the docs/brand-pass branch November 16, 2026 22:23
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