-
Notifications
You must be signed in to change notification settings - Fork 0
Switch remaining object stories to MSW mode #265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch remaining object stories to MSW mode #265
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR completes the MSW (Mock Service Worker) integration for object-related Storybook components, building on the foundation established in PR #264. It migrates the remaining three object story files to use a MSW-backed ObjectStack runtime instead of empty or hardcoded data sources.
Changes:
- Updated three story files (
object-view,object-gantt,object-map) to usecreateStorybookDataSource()from@storybook-config/datasource - Standardized import paths to use
@object-ui/reactforSchemaRendererandSchemaRendererProvider - Wrapped all story renderers with
SchemaRendererProviderusing the MSW data source
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
packages/components/src/stories-json/object-view.stories.tsx |
Added MSW data source import and replaced empty object {} with actual dataSource instance (already had SchemaRendererProvider) |
packages/components/src/stories-json/object-map.stories.tsx |
Updated imports to use @object-ui/react, added MSW data source, and wrapped renderer with SchemaRendererProvider |
packages/components/src/stories-json/object-gantt.stories.tsx |
Updated imports to use @object-ui/react, added MSW data source, and wrapped renderer with SchemaRendererProvider |
|
@copilot Error fetching Note to agents accessing this page:This page requires Vercel authentication. Here are your options: Option 1: vercel curl (Recommended if Vercel CLI installed) Option 2: Vercel MCP Server (Recommended if Vercel CLI not installed) Option 3: Bypass token (Manual) Authenticat |
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Fixed in commit 8299c55. The error was caused by the |
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
3f2c71e
into
copilot/integrate-msw-into-storybook
|
✅ All checks passed!
|
Switch all object-related Storybook components to MSW mode
Based on PR #264, this task switches all remaining object-related components in Storybook to use MSW (Mock Service Worker) mode for data fetching.
Completed Tasks
Files Updated
Bug Fix
Fixed the "Error fetching
/index.json" issue by adding a handler for/api/v1/index.jsonendpoint in.storybook/msw-browser.ts. TheObjectStackClient.connect()method was trying to fetch this endpoint to get server metadata, but it wasn't being handled by MSW, causing stories to fail to render.Security Summary
No security vulnerabilities were found in the changes.
All object-related components in Storybook now use MSW mode for consistent data fetching from the ObjectStack runtime.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.