feat: upgrade @objectstack to 3.0.4, add preview mode support#507
feat: upgrade @objectstack to 3.0.4, add preview mode support#507
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…pport - Upgrade all @objectstack/* dependencies from ^3.0.2 to ^3.0.4 - Add PreviewModeOptions type and previewMode prop to AuthProvider - Add isPreviewMode and previewMode to AuthContextValue - Create PreviewBanner component for preview mode UI indication - Update ConditionalAuthWrapper to detect preview mode from discovery - Update console App to render PreviewBanner - Add tests for preview mode in AuthProvider and PreviewBanner Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
|
@copilot 更新相关文档 |
…d changelogs - packages/auth/README.md: Add Preview Mode section with usage, PreviewModeOptions table, PreviewBanner docs, and detection example - packages/auth/README.md: Update useAuth hook docs with isPreviewMode and previewMode fields - packages/auth/CHANGELOG.md: Add preview mode feature entries - packages/react/README.md: Add useDiscovery hook docs with DiscoveryInfo and preview mode fields - CHANGELOG.md: Add @objectstack v3.0.4 upgrade and preview mode feature entries Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
已在 a4df074 中更新了相关文档:
|
❌ Console Performance Budget
|
|
更新现有example,fix ci build and test @copilot |
Replace @object-ui/console workspace dependency in examples/crm with relative path imports to apps/console/plugin.ts. This resolves the turbo build failure caused by the cyclic dependency: @object-ui/console → @object-ui/example-crm → @object-ui/console Updated files: - examples/crm/package.json: Remove @object-ui/console dependency - examples/crm/objectstack.config.ts: Use relative import - examples/crm/server.ts: Use relative import - examples/crm/console-plugin.ts: Use relative import All 215 test files pass (3998 tests), all 37 packages build, lint passes. Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Fixed in 7169d99. The CI failure was caused by a cyclic dependency between All examples already use |
There was a problem hiding this comment.
Pull request overview
This PR upgrades all @objectstack/* dependencies from ^3.0.2 to ^3.0.4 and introduces preview mode support for marketplace demos and app showcases, aligning with the PreviewModeConfig spec from objectstack-ai/spec#676.
Changes:
- Upgraded 12
@objectstack/*packages across 42 references in package.json files - Added preview mode to
@object-ui/authwithPreviewModeOptionstype,PreviewBannercomponent, and auto-authentication logic - Extended
DiscoveryInfointerface in@object-ui/reactwithmodeandpreviewModefields for server-driven preview detection - Fixed cyclic dependency between
@object-ui/consoleandexamples/crmby switching to relative path imports
Reviewed changes
Copilot reviewed 31 out of 32 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Lock file updates for @objectstack 3.0.4 across all packages |
| package.json | Root devDependencies upgraded to @objectstack 3.0.4 |
| packages/auth/src/types.ts | Added PreviewModeOptions interface matching spec's PreviewModeConfig |
| packages/auth/src/AuthProvider.tsx | Implemented preview mode auto-authentication with simulated user |
| packages/auth/src/AuthContext.ts | Added isPreviewMode and previewMode fields to context |
| packages/auth/src/useAuth.ts | Exposed preview mode state in hook defaults |
| packages/auth/src/PreviewBanner.tsx | New component for preview mode status banner |
| packages/auth/src/index.ts | Exported PreviewBanner and PreviewModeOptions |
| packages/auth/src/tests/AuthProvider.preview.test.tsx | Comprehensive tests for preview mode authentication |
| packages/auth/src/tests/PreviewBanner.test.tsx | Tests for banner rendering and messages |
| packages/auth/README.md | Documented preview mode usage with examples and API reference |
| packages/auth/CHANGELOG.md | Documented preview mode additions and @objectstack upgrade |
| packages/react/src/hooks/useDiscovery.ts | Extended DiscoveryInfo with mode and previewMode fields |
| packages/react/README.md | Documented useDiscovery preview mode detection |
| apps/console/src/components/ConditionalAuthWrapper.tsx | Auto-detect preview mode from server discovery and configure AuthProvider |
| apps/console/src/App.tsx | Added PreviewBanner to console UI |
| examples/crm/server.ts | Changed ConsolePlugin import to relative path |
| examples/crm/objectstack.config.ts | Changed ConsolePlugin import to relative path |
| examples/crm/console-plugin.ts | Changed ConsolePlugin re-export to relative path |
| examples/crm/package.json | Removed @object-ui/console dependency, upgraded @objectstack packages |
| packages/*/package.json | Upgraded @objectstack/spec and other @objectstack dependencies to 3.0.4 |
| CHANGELOG.md | Documented @objectstack upgrade and preview mode features |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| style={{ | ||
| padding: '8px 16px', | ||
| backgroundColor: '#fef3c7', | ||
| color: '#92400e', | ||
| textAlign: 'center', | ||
| fontSize: '14px', | ||
| borderBottom: '1px solid #fcd34d', | ||
| }} |
There was a problem hiding this comment.
This component uses inline styles with the style={{}} pattern, which violates Coding Rule #4 ("Forbidden: Inline styles"). ObjectUI strictly requires Tailwind CSS utility classes for all styling. The PreviewBanner should use Tailwind classes instead, for example: className={cn("p-2 px-4 bg-amber-100 text-amber-900 text-center text-sm border-b border-amber-300", className)}. This ensures consistency with the "Shadcn Native" aesthetic and allows users to override styles via the className prop with Tailwind utilities.
@object-ui/consolefrom examples/crm dependenciesOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.