Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

Storybook CI failing with useSchemaContext must be used within a SchemaRendererProvider error for object-view stories.

Changes

  • Import SchemaRendererProvider from @object-ui/react (aligns with other story files)
  • Wrap SchemaRenderer with provider in renderStory function
-import { SchemaRenderer } from '../SchemaRenderer';
+import { SchemaRenderer, SchemaRendererProvider } from '@object-ui/react';

-const renderStory = (args: any) => <SchemaRenderer schema={args as unknown as BaseSchema} />;
+const renderStory = (args: any) => (
+  <SchemaRendererProvider dataSource={{}}>
+    <SchemaRenderer schema={args as unknown as BaseSchema} />
+  </SchemaRendererProvider>
+);

Components using useSchemaContext hook require the provider context. Pattern matches object-grid.stories.tsx and page.stories.tsx.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • broken-link
    • Triggering command: /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-linux64/chrome-headless-shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-linux64/chrome-headless-shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Transl (dns block)
  • grainy-gradients.vercel.app
    • Triggering command: /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-linux64/chrome-headless-shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-linux64/chrome-headless-shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Transl (dns block)
  • images.unsplash.com
    • Triggering command: /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-linux64/chrome-headless-shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-linux64/chrome-headless-shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Transl (dns block)
  • storybook.js.org
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/objectui/objectui/node_modules/.bin/../storybook/bin/index.cjs dev -p 6006 --no-open (dns block)
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/objectui/objectui/node_modules/.bin/../@storybook/test-REDACTED/dist/test-storybook.js --testTimeout=90000 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

引用: https://github.com/objectstack-ai/objectui/actions/runs/21471093782/job/61843608006#step:7:1


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Jan 29, 2026

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

Project Deployment Review Updated (UTC)
objectui Ready Ready Preview, Comment Jan 29, 2026 10:54am
objectui-components Ready Ready Preview, Comment Jan 29, 2026 10:54am
objectui-crm-app Error Error Jan 29, 2026 10:54am

Request Review

…dererProvider

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix build issue in CI workflow Fix SchemaRendererProvider missing in object-view stories Jan 29, 2026
Copilot AI requested a review from hotlong January 29, 2026 10:51
@hotlong hotlong marked this pull request as ready for review January 29, 2026 10:58
Copilot AI review requested due to automatic review settings January 29, 2026 10:58
@hotlong hotlong merged commit 2db1f41 into copilot/update-crm-app-to-msw-mode Jan 29, 2026
9 of 10 checks passed
Copy link
Contributor

Copilot AI left a 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 fixes a Storybook CI failure where object-view stories were failing with a "useSchemaContext must be used within a SchemaRendererProvider" error. The fix aligns the object-view stories with the established pattern used in other similar story files.

Changes:

  • Updated import to use SchemaRendererProvider from @object-ui/react instead of local SchemaRenderer
  • Wrapped SchemaRenderer with SchemaRendererProvider in the renderStory function, passing an empty dataSource object

@github-actions
Copy link

✅ All checks passed!

  • ✅ Type check passed
  • ✅ Tests passed
  • ✅ Lint check completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants