docs: Share provider-with-managers setup across API pages - #4129
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LfrAWX2uC23Ym1SNjRYvo5
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LfrAWX2uC23Ym1SNjRYvo5
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LfrAWX2uC23Ym1SNjRYvo5
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LfrAWX2uC23Ym1SNjRYvo5
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LfrAWX2uC23Ym1SNjRYvo5
…main Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LfrAWX2uC23Ym1SNjRYvo5
Adds docs/core/shared/_provider_managers.mdx, which renders the React platform tabs (web, React Native, NextJS, Expo) and the Vue main.ts from a single `managers` code block. LogoutManager, Manager, DevToolsManager, PollingSubscription, getDefaultManagers and Controller now use it instead of their own copies. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DE1vvoaeNDUbYnk4ewofap
…der note Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DE1vvoaeNDUbYnk4ewofap
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…omponent Reuses parseCodeDocuments for the managers block, builds only the requested platform's file, and drops the leading-import parsing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DE1vvoaeNDUbYnk4ewofap
The partial is also built as its own page until shared partials are excluded. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DE1vvoaeNDUbYnk4ewofap
This was referenced Oct 4, 2026
…ad-bmcv3q # Conflicts: # docs/core/api/Controller.md # docs/core/api/DevToolsManager.md # docs/core/api/LogoutManager.md # docs/core/api/Manager.md # docs/core/api/PollingSubscription.md # docs/core/api/getDefaultManagers.md
…to claude/project-thread-bmcv3q
#4145) managers is now optional in ProviderSetupCode, so the installation partial renders its Web/React Native/NextJS/Expo tabs and Vue main.ts from the same source as the managers partial. Claude-Session: https://claude.ai/code/session_01WS9omUKcWVGuPunL3VoKc4 Co-authored-by: Claude <noreply@anthropic.com>
…ad-bmcv3q # Conflicts: # docs/core/api/Controller.md # docs/core/api/DevToolsManager.md # docs/core/api/LogoutManager.md # docs/core/api/Manager.md # docs/core/api/PollingSubscription.md # docs/core/api/mockInitialState.md
ProviderSetupCode now builds its code with a shared providerSetup module, which the markdown generator also uses, so generated references show the same per-platform setup files. Partials receive their page's code block, and JSX spreads are evaluated. Also drops a leftover Vue block on LogoutManager from the master merge. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DE1vvoaeNDUbYnk4ewofap
ntucker
marked this pull request as ready for review
October 5, 2026 07:32
…ad-bmcv3q Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DE1vvoaeNDUbYnk4ewofap
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DE1vvoaeNDUbYnk4ewofap
…in docsToMarkdown Partials get their raw children; the ProviderSetupCode case extracts the code block, matching the site component. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DE1vvoaeNDUbYnk4ewofap
ntucker
commented
Oct 5, 2026
ntucker
left a comment
Collaborator
Author
There was a problem hiding this comment.
One actionable issue in the validation triggers for the new shared snippet generator.
…ecks see it Skill references depend on the provider setup generator; the skills workflow and pre-push hook already watch website/framework-docs/. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DE1vvoaeNDUbYnk4ewofap
This branch was successfully deployed
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.
Requested by Nathaniel · project thread
Includes #4145.
Motivation
Six API pages each carried their own copy of the "pass
managersto the provider" setup: a 100+ line Web / React Native / NextJS / Expo tab block for React (LogoutManager, Manager) or a single web snippet (Controller, DevToolsManager ×2, PollingSubscription, getDefaultManagers), plus a Vuemain.tsbeside each. The installation page hand-wrote the same root files again. The copies had drifted (ReactDOM.render, unused imports, NextJS layout titled_layout.tsx).Solution
website/src/components/providerSetup.mjsgenerates one platform's setup file (web, native, nextjs, expo, vue).ProviderSetupCode.tsxrenders it on the site, and the skill-reference / llms.txt generator (docsToMarkdown.mjs) uses it too, so agents see the same code. Two partials use it:docs/core/shared/_provider_managers.mdx: React platform tabs + Vuemain.tsfor a page'smanagersblock. Used by LogoutManager, Manager, DevToolsManager, PollingSubscription, getDefaultManagers and Controller.docs/core/shared/_installation.mdx(docs: Generate installation provider setup tabs from ProviderSetupCode #4145): the same tabs without managers. Installation-only extras (Anansi tab, redux links, NextJS guide button) stay as MDX around it.Before (LogoutManager.md, ~170 lines):
After:
managersblock is read with the playground's existingparseCodeDocuments. Highlight comments carry through, and animportat the top of the block (Controller'sunAuth) continues the generated import list.docsToMarkdown.mjsnow passes a partial its page's code block and evaluates JSX spreads ({...props}); skill references are regenerated.Verified with a full
websiteproduction build, the rendered/docs/...and/vue/...pages and their generated markdown, andyarn build:skills --check. Website typecheck and lint pass. Docs only, so no changeset.🤖 Generated with Claude Code
https://claude.ai/code/session_01DE1vvoaeNDUbYnk4ewofap
Note
Low Risk
Documentation and doc-build tooling only; no library runtime or auth behavior changes.
Overview
Deduplicates DataProvider /
DataClientPluginsetup examples across API and installation docs by generating platform-specific snippets from one shared module.Adds
providerSetup.mjsandProviderSetupCode, plus_provider_managers.mdx, so pages only supply a shortmanagerscode block (and optionalimports) instead of repeating Web / React Native / Next.js / Expo / Vue tab content. LogoutManager, Manager, Controller, DevToolsManager, PollingSubscription, and getDefaultManagers are refactored to use this partial; installation uses the same generator without managers.Updates
docsToMarkdown.mjsto renderProviderSetupCode, forward partial children, and evaluate JSX spreads so regenerated agent skill references match the live site. Vue installation copy is tightened (defaultapp.use(DataClientPlugin)with options described in prose).Reviewed by Cursor Bugbot for commit fa82596. Bugbot is set up for automated code reviews on this repo. Configure here.