Repository navigation
docs: Make Managers page work for Vue; never import @data-client/core in examples - #4128
Conversation
Manager snippets import from @data-client/core; Sentry, IndexedDB setup and getManagers are split per framework; Coin App demo is React-only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbMoSgP3nZE1bn2HkHpXva
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
StreamManager uses EntityInterface from @data-client/core like Manager.md, and Manager.md's manager examples import from core so they read right on Vue. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbMoSgP3nZE1bn2HkHpXva
Apps install @data-client/react or @data-client/vue; core is only a transitive dependency, so importing it breaks under strict package managers. Code fences marked framework-imports show @data-client/vue on Vue pages, so manager examples stay single-sourced. The Playground editor gets @data-client/vue types so those blocks resolve on Vue pages. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbMoSgP3nZE1bn2HkHpXva
Collapse the README StreamManager react/vue pair with framework-imports (and fix its typeof EntityInterface), flag the DevTools predicate example, keep the oversimplified useQuery/useCache hooks React-only, and drop the last @data-client/core import from resource.md. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbMoSgP3nZE1bn2HkHpXva
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4128 +/- ##
=======================================
Coverage 98.06% 98.06%
=======================================
Files 163 163
Lines 3095 3095
Branches 616 616
=======================================
Hits 3035 3035
Misses 18 18
Partials 42 42 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RhxGsX5z7SGhQbUUNfsvsv
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbMoSgP3nZE1bn2HkHpXva
…ad-690ma3 # Conflicts: # .agents/skills/data-client-manager/references/Controller.md # .agents/skills/data-client-manager/references/Controller.vue.md # .agents/skills/data-client-react/references/Controller.md # .agents/skills/data-client-vue/references/Controller.md # docs/core/api/Controller.md # docs/core/api/DevToolsManager.md
Requested by Nathaniel · project thread
Motivation
/vue/concepts/managersshowed React-only code: managers imported from@data-client/react, the IndexedDB restore rendered<DataProvider>, and the React Coin App demo appeared at the bottom. Other examples imported@data-client/core, which apps don't install directly (it's a transitive dependency), so those imports break under strict package managers.Solution
Framework-agnostic code (managers, middleware) is written once with
@data-client/reactimports. A newframework-importsfence flag swaps them for@data-client/vueon Vue pages:React page:
Vue page:
website/framework-docs/remarkFramework.jsadds the rewrite. It's opt-in, so React-only blocks (likeDataProvidersetups) are never relabeled as Vue code. Documented inframework-docs/README.mdand the packages-documentation skill.@data-client/vuetypes, soTypeScriptEditorblocks resolve on Vue pages (checked in the browser: no type errors on/vue/api/Manager).@data-client/coreanymore: managers.md, Manager.md, Controller.md, the README StreamManager (now one block instead of a react/vue pair), render-as-you-fetch and resource.md.@sentry/reactvs@sentry/vue) and the IndexedDB restore, which gets a Vuemain.ts:useQuery/useCachehook examples are React-only.vue_titleadded.Docs and website only, no changeset. Verified with
yarn workspace rdc-website build: the Vue managers page shows only@data-client/vueimports and the React page only@data-client/react.Open questions
Other shared blocks that still render React-only code on Vue pages (expiry-policy, normalization, mockInitialState, parts of Controller,
_useCancelling/_useTransition) are handed off to a separate PR. Provider setups are covered by #4129.🤖 Generated with Claude Code
https://claude.ai/code/session_01XbMoSgP3nZE1bn2HkHpXva
Note
Low Risk
Documentation, remark plugin, and Playground type stubs only; no runtime library or API behavior changes.
Overview
Fixes Vue
/vue/concepts/managersshowing React-only snippets and documents manager/middleware examples against installable packages (@data-client/react/@data-client/vue) instead of@data-client/core.Adds an opt-in
framework-importscode-fence flag handled byremarkFramework.js: authors write@data-client/reactonce and Vue builds rewrite it to@data-client/vue. Shared examples (logging, streams, DevTools predicates, etc.) collapse from duplicated:::react/:::vuepairs into single fences; framework-specific setup stays split (Sentry packages, IndexedDB restore withDataProvidervsDataClientPlugin+main.ts). Policy is documented inframework-docs/README.mdand the packages-documentation skill.Playground/Monaco now loads
@data-client/vueeditor types (copywebsitetypes.sh,typeLibs.ts) soTypeScriptEditorblocks type-check on Vue pages. Generated agent skill references mirror the doc edits. React-only Coin App StackBlitz is wrapped in:::react;vue_titleadded for the managers concept page.Reviewed by Cursor Bugbot for commit 50ab2e0. Bugbot is set up for automated code reviews on this repo. Configure here.