docs: refresh adapter pages with hand-authored MDX#474
Merged
Conversation
Move official adapter pages from runtime README fetching to hand-authored
MDX under content/adapters/{official,community}/<slug>.mdx.
- New fumadocs collection (source.config.ts) with adapter frontmatter
(packageName, slug, type, logo, tagline, beta, features, ...).
- New URL structure: /adapters/official/<slug> and /adapters/community/<slug>.
Legacy /adapters/<slug> and /docs/adapters/* now 301 to /adapters listing.
- New components: PackageInstall (pnpm/npm/yarn/bun tabs), FeatureSupport
(per-page mini matrix from frontmatter), GlobalFeatureMatrix (drives
/docs/adapters from the same frontmatter), AdapterHero.
- Standardized template: Install -> Quick start -> Configuration (TypeTable)
-> Authentication -> Advanced -> Feature support.
- Adapter pages now share the same docs chrome as /docs (sidebar + ToC +
edit-on-GitHub). Sidebar groups official adapters flat with sub-headings
for Platforms / State, then a collapsible "Community Adapters" section.
- Community pages keep README fetching via the new route until they
migrate to MDX; URLs are stable.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Mounts a parallel sidebar/layout for /adapters routes so the adapter pages can adopt their own typography (uppercase eyebrow separators, tighter rows, themed thin scrollbar) without touching the shared /docs sidebar. Adds a styled-scrollbar utility class to the global stylesheet.
Adapter hero: drop the badges row and packageName, sit the title inline with the logo, bump the tagline to 17px with a horizontal divider beneath. Install snippet: rebuild as a tabbed dark single-line snippet with a visible $ prompt prefix and a copy button — replaces the previous multi-line CodeBlock layout.
Promotes the five vendor-maintained adapters (Beeper Matrix, Photon
iMessage, Liveblocks, Resend, Zernio) out of the Community group and
into a peer Vendor-Official group with its own /adapters/vendor-official
route, sidebar folder, and hand-authored MDX pages.
Detail pages now opt-in to MDX-body rendering via a new mdxBody
frontmatter flag, with the README fetch kept as a fallback for any
adapter that hasn't been migrated yet.
The right-rail footer is replaced with a 'Deploy your chat app on
Vercel' upsell card across all adapter detail pages, and the listing
grid uses a getAdapterHref helper so vendor-official cards resolve to
the new route.
Existing /adapters/community/{matrix,imessage,resend,zernio,liveblocks}
URLs 308-redirect to their /adapters/vendor-official/... equivalents.
Drops the per-messenger landing pages under /adapters/for/[messenger] and the 'Browse by messenger' chip row on the /adapters listing. Existing /adapters/for/* URLs 308-redirect to /adapters.
The previous redirects used :slug* (zero-or-more segments), which swallowed the bare /docs/adapters and /docs/state pages along with their subpaths. Switching to :slug+ (one-or-more) lets the bare paths fall through to their MDX while subpath URLs still 308 to /adapters.
Replaces the frontmatter-only stubs for the eight community adapters (Baileys, Blooio, Cloudflare Durable Objects, Mattermost, MySQL, Sendblue, Webex, Zalo) with hand-authored MDX bodies sourced from each adapter's pinned README. Each page now opts in to mdxBody rendering and exposes a feature matrix via the FeatureSupport component, matching the official adapter pages.
Removes the inline backticks around package and API names in the Web adapter tagline so the rendered hero reads as plain prose, and drops the now-redundant 'v1 scope' subsection from the Advanced section.
Replaces the nested ternaries in the community and vendor-official detail-page handlers with a guarded readme assignment plus a renderBody helper. No behavior change — only addresses the noNestedTernary lint introduced when MDX-body fallback was added.
Adds a docs-adapters test file with 220 assertions across four groups: - Adapter MDX frontmatter — every adapter page (official, vendor-official, community) declares title, description, packageName, slug, tagline, and a valid type, and the file basename matches the slug field. - Vendor-official adapters — exactly the expected slugs, every page sets vendorOfficial: true, community: true, an author, mdxBody: true, and renders <FeatureSupport />. - Community adapters — every page sets community: true (never vendor-official), opts in to mdxBody, and renders <FeatureSupport />. - Official adapters — never flagged community/vendor-official; every packageName lives under @chat-adapter/*. - adapters.json registry — vendor-official + community MDX entries are in sync with adapters.json on packageName, type, community, and vendorOfficial. Also extends VALID_DOC_PACKAGES so docs-content.test.ts accepts the new vendor-official + community packages, plus @chat-adapter/web, @chat-adapter/web/react, and @chat-adapter/messenger.
Drops a per-package AGENTS.md beside each official adapter and state adapter, plus a tiny CLAUDE.md (`@AGENTS.md`) so Claude Code picks the same instructions up through its built-in resolver. Each AGENTS.md follows the same structure: overview, directory layout, build/test/typecheck commands, public surface, thread ID format, webhook/event flow, authentication, format conversion, cards/streaming/file-uploads where relevant, platform quirks, testing approach, coding conventions, and release rules. Content is tailored per adapter so coding agents working inside one package get adapter-specific guidance without trawling the root CLAUDE.md or the user-facing docs. Coverage: - Platform adapters: slack, teams, gchat, discord, telegram, github, linear, whatsapp, messenger, web. - State adapters: memory, redis, ioredis, pg.
visyat
previously approved these changes
May 12, 2026
visyat
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refreshes the adapter docs end-to-end so every adapter — official, vendor-official, and community — now ships hand-authored MDX, lives under a clean URL structure, and renders on a polished sidebar/right-rail layout dedicated to
/adapters(the shared/docschrome is untouched).flowchart LR subgraph Before direction TB OB[official] --> CB[community<br/>incl. 5 vendor pages] end subgraph After direction TB OA[official] --> VA[vendor-official<br/>5 pages] --> CA[community] end Before -.-> AfterContent & routing
/adapters/vendor-official/<slug>route for vendor-maintained adapters (Beeper Matrix, Photon iMessage, Liveblocks, Resend, Zernio). Sidebar gets a third labelled group ("Vendor-Official Adapters") between Official and Community, with a top divider matching the existing Community treatment.features:matrices and full body content (install, quick start, configuration, auth, gateway/streaming, troubleshooting). README fetch stays as a fallback for any future community adapter that hasn't been migrated yet, gated by a newmdxBody: truefrontmatter flag./adapters/for/<messenger>+ the "Browse by messenger" chip row on/adapters). Existing URLs 308-redirect to/adapters./adapters/community/{matrix,imessage,resend,zernio,liveblocks}to their new/adapters/vendor-official/...paths./docs/adaptersand/docs/stateso the bare pages are accessible again — the previous catch-all redirect (:slug*) was swallowing them. Switched to:slug+so subpath URLs still 308 while the bare pages render.Visual polish
AdaptersDocsLayout+AdaptersSidebar) with uppercase eyebrow separators, tighter rows, and a thin themed scrollbar utility class. The shared/docssidebar is untouched.AdapterHero: drops the badges row + packageName, sits the title inline with the logo, larger 17 px tagline, horizontal divider beneath the block.PackageInstallas a tabbed dark single-line snippet with a$prompt prefix and a copy button — replaces the previous multi-lineCodeBlocklayout.<Upsell />) replaces the oldEditSource / ScrollTop / Feedback / CopyPagefooter cluster on every adapter detail page.text-4xl sm:text-[44px], and the section headers totext-base font-medium tracking-tightwith a one-line muted lede.Tooling & tests
mdxBody: trueopt-in to the adapter frontmatter schema (source.config.ts), and updated both detail-page handlers (community/[slug]and the newvendor-official/[slug]) to render the MDX body when present, falling back to README fetch otherwise.renderBody()helper, removing the nested ternaries that were trippinglint/style/noNestedTernary.packages/integration-tests/src/docs-adapters.test.ts— 220 new assertions covering:type ∈ {platform, state}.vendorOfficial: true,community: true,author,mdxBody: true,<FeatureSupport />rendered.community: true(never vendor-official),mdxBody: true,<FeatureSupport />.packageNamealways under@chat-adapter/*.adapters.json↔ MDX sync onpackageName/type/community/vendorOfficial.VALID_DOC_PACKAGESsodocs-content.test.tsaccepts the new vendor-official + community packages, plus@chat-adapter/web,@chat-adapter/web/react, and@chat-adapter/messenger.Per-package AGENTS.md
AGENTS.mdto every official adapter and state adapter (14 packages), each tailored to that adapter's surface — overview, directory layout, build/test commands, public exports, thread ID format, webhook flow, authentication, format conversion, cards/streaming, platform quirks, testing approach, coding conventions, and release rules.CLAUDE.md(@AGENTS.md) beside each so Claude Code picks up the same instructions through its built-in resolver — same convention as the root.Web adapter copy