Skip to content

docs: Generate installation provider setup tabs from ProviderSetupCode - #4145

Merged
ntucker merged 2 commits into
claude/project-thread-bmcv3qfrom
claude/project-thread-8m86ff
Oct 4, 2026
Merged

ntucker merged 2 commits into
claude/project-thread-bmcv3qfrom
claude/project-thread-8m86ff

Conversation

@ntucker

@ntucker ntucker commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Nathaniel · project thread

Stacked on #4129; will be retargeted to master once that merges.

Motivation

docs/core/shared/_installation.mdx (rendered on Installation and <DataProvider />) hand-wrote the same Web / React Native / NextJS / Expo app-root code and Vue main.ts that #4129 generates in ProviderSetupCode. Its web tab still had ReactDOM.createRoot imported from react-dom.

Solution

managers (the children code block) and imports are now optional in ProviderSetupCode. Without them it renders a plain <DataProvider> / app.use(DataClientPlugin), and NextJS renders app/layout.tsx using DataProvider from @data-client/react/nextjs directly (no separate client Provider.tsx needed).

Before:

<TabItem value="web">

```tsx title="index.tsx"
import { DataProvider } from '@data-client/react';
import ReactDOM from 'react-dom';

ReactDOM.createRoot(document.body).render(
  <DataProvider>
    <App />
  </DataProvider>,
);
```

Alternatively [integrate state with redux](../guides/redux.md)

After:

<TabItem value="web">

<ProviderSetupCode platform="web" />

Alternatively [integrate state with redux](../guides/redux.md)
  • Anansi tab, redux links and the NextJS guide button stay literal MDX.
  • The Vue code-comment list of optional plugin overrides is now a sentence under the code block, linking managers to getDefaultManagers.
  • The old NextJS/Expo blocks highlighted the DataProvider lines; generated blocks have no highlights.

Verified by rendering /docs/getting-started/installation, /vue/getting-started/installation, /docs/api/DataProvider and /docs|vue/api/LogoutManager (managers pages unchanged) in a local dev server; website typecheck and lint pass. Docs only, so no changeset.

Open questions

None.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WS9omUKcWVGuPunL3VoKc4


Generated by Claude Code


Note

Low Risk
Documentation and a docs-site component only; no runtime library or API behavior changes.

Overview
Installation docs for Web, React Native, Next.js, Expo, and Vue replace duplicated inline snippets with shared <ProviderSetupCode platform="…" />, so setup examples stay aligned with the managers guide.

ProviderSetupCode now works without a managers child or extra imports: it emits plain <DataProvider> / app.use(DataClientPlugin) wiring. managers={managers} and the managers block are only included when children are passed (managers pages unchanged). For Next.js without managers, the sample is app/layout.tsx using @data-client/react/nextjs instead of a separate client Provider.tsx; with managers it still shows the client Provider.tsx pattern.

The Vue installation tab moves optional plugin overrides out of code comments into a short prose line linking managers to getDefaultManagers. Generated samples use createRoot from react-dom/client (replacing older react-dom usage in the hand-written web tab). Next.js/Expo highlight comments from the old MDX blocks are dropped in generated output.

Reviewed by Cursor Bugbot for commit ee45e7a. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ee45e7a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ntucker ntucker self-assigned this Oct 4, 2026
@vercel

vercel Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs-site Ready Ready Preview Oct 4, 2026 6:07pm UTC

Request Review

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.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WS9omUKcWVGuPunL3VoKc4
@ntucker
ntucker force-pushed the claude/project-thread-8m86ff branch from 1c2494d to 7976d31 Compare October 4, 2026 16:22
@ntucker
ntucker merged commit 602add4 into claude/project-thread-bmcv3q Oct 4, 2026
20 checks passed
@ntucker
ntucker deleted the claude/project-thread-8m86ff branch October 4, 2026 19:02
ntucker added a commit that referenced this pull request Oct 5, 2026
* docs: Vue examples for Controller and manager API pages

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LfrAWX2uC23Ym1SNjRYvo5

* docs: Make Manager.md prose and editor imports framework-neutral

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LfrAWX2uC23Ym1SNjRYvo5

* docs: Fix Vue getState example timing claim

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LfrAWX2uC23Ym1SNjRYvo5

* docs: Simplify Vue examples on Controller and manager pages

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LfrAWX2uC23Ym1SNjRYvo5

* docs: Vue version of DevToolsManager predicate example

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LfrAWX2uC23Ym1SNjRYvo5

* docs: Simplify React DevToolsManager skipLogging example; define myDomain

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LfrAWX2uC23Ym1SNjRYvo5

* docs: Share provider-with-managers setup across API pages

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

* docs: Harden provider setup code extraction; drop redundant DataProvider note

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DE1vvoaeNDUbYnk4ewofap

* docs: Simplify provider setup partial into a per-platform CodeBlock component

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

* docs: Render nothing when the provider partial has no managers block

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

* docs: Generate installation provider setup tabs from ProviderSetupCode (#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>

* docs: Render provider setup partial in skill references and llms.txt

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

* internal(website): Lint import order in docsToMarkdown

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DE1vvoaeNDUbYnk4ewofap

* internal(website): Let ProviderSetupCode read its own managers block 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

* internal(website): Move providerSetup into framework-docs so skill checks 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

---------

Co-authored-by: Claude <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — ee45e7a5 Deployed Oct 4, 2026 by vercel[bot]
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.

2 participants