Skip to content

feat: upgrade @objectstack to 3.0.4, add preview mode support - #507

Merged
hotlong merged 4 commits into
mainfrom
copilot/update-objectstack-to-latest-again
Feb 14, 2026
Merged

feat: upgrade @objectstack to 3.0.4, add preview mode support#507
hotlong merged 4 commits into
mainfrom
copilot/update-objectstack-to-latest-again

Conversation

CopilotAI commented Feb 14, 2026

Copy link
Copy Markdown
Contributor
  • Upgrade all @objectstack packages from ^3.0.2 to ^3.0.4 across the monorepo
  • Add preview mode support to auth package
  • Update documentation
  • Fix CI build failure (cyclic dependency between @object-ui/console ↔ @object-ui/example-crm)
    • Remove @object-ui/console from examples/crm dependencies
    • Update examples/crm imports to use relative path for ConsolePlugin
    • Verified: All 215 test files pass (3998 tests), 37 packages build, lint passes
Original prompt

升级@objectstack到最新版,并参考这个开发支持预览模式

拉取请求: objectstack-ai/objectstack#676


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel

vercelBot commented Feb 14, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
objectuiErrorErrorFeb 14, 2026 11:49am
objectui-demoErrorErrorFeb 14, 2026 11:49am
objectui-storybookErrorErrorFeb 14, 2026 11:49am

Request Review

…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>
@hotlong

Copy link
Copy Markdown
Contributor

@copilot 更新相关文档

CopilotAI changed the title [WIP] Upgrade @objectstack to the latest version with preview modefeat: upgrade @objectstack to 3.0.4, add preview mode supportFeb 14, 2026
CopilotAI requested a review from hotlongFebruary 14, 2026 11:31
…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>

CopilotAI commented Feb 14, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot 更新相关文档

已在 a4df074 中更新了相关文档:

  • packages/auth/README.md — 新增 Preview Mode 章节(用法示例、PreviewModeOptions 属性表、PreviewBanner 组件、useAuth 检测方式)以及 useAuth API 表格中的 isPreviewMode / previewMode 字段
  • packages/auth/CHANGELOG.md — 新增 Preview Mode feature 条目
  • packages/react/README.md — 新增 useDiscovery hook 文档及 DiscoveryInfo 接口(含 modepreviewMode 字段说明)
  • CHANGELOG.md — 新增 @objectstack v3.0.4 升级和 Preview Mode 功能条目

@github-actions

Copy link
Copy Markdown
Contributor

❌ Console Performance Budget

MetricValueBudget
Main entry (gzip)** KB**KB
Entry file``
StatusFAIL

@hotlong

Copy link
Copy Markdown
Contributor

更新现有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>

CopilotAI commented Feb 14, 2026

Copy link
Copy Markdown
ContributorAuthor

更新现有example,fix ci build and test @copilot

Fixed in 7169d99. The CI failure was caused by a cyclic dependency between @object-ui/console and @object-ui/example-crm. Resolved by removing @object-ui/console from the CRM example's dependencies and switching to relative path imports for ConsolePlugin (consistent with the existing pattern in objectstack.shared.tshotcrm-bridge.js).

All examples already use @objectstack/*@^3.0.4 from the earlier upgrade. Verified: 215 test files pass (3998 tests), 37 packages build, lint passes (35 tasks, 0 errors).

@hotlong
hotlong marked this pull request as ready for review February 14, 2026 12:03
CopilotAI review requested due to automatic review settings February 14, 2026 12:03
@hotlong
hotlong merged commit 9348936 into mainFeb 14, 2026
1 of 4 checks passed

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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 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/auth with PreviewModeOptions type, PreviewBanner component, and auto-authentication logic
  • Extended DiscoveryInfo interface in @object-ui/react with mode and previewMode fields for server-driven preview detection
  • Fixed cyclic dependency between @object-ui/console and examples/crm by 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
FileDescription
pnpm-lock.yamlLock file updates for @objectstack 3.0.4 across all packages
package.jsonRoot devDependencies upgraded to @objectstack 3.0.4
packages/auth/src/types.tsAdded PreviewModeOptions interface matching spec's PreviewModeConfig
packages/auth/src/AuthProvider.tsxImplemented preview mode auto-authentication with simulated user
packages/auth/src/AuthContext.tsAdded isPreviewMode and previewMode fields to context
packages/auth/src/useAuth.tsExposed preview mode state in hook defaults
packages/auth/src/PreviewBanner.tsxNew component for preview mode status banner
packages/auth/src/index.tsExported PreviewBanner and PreviewModeOptions
packages/auth/src/tests/AuthProvider.preview.test.tsxComprehensive tests for preview mode authentication
packages/auth/src/tests/PreviewBanner.test.tsxTests for banner rendering and messages
packages/auth/README.mdDocumented preview mode usage with examples and API reference
packages/auth/CHANGELOG.mdDocumented preview mode additions and @objectstack upgrade
packages/react/src/hooks/useDiscovery.tsExtended DiscoveryInfo with mode and previewMode fields
packages/react/README.mdDocumented useDiscovery preview mode detection
apps/console/src/components/ConditionalAuthWrapper.tsxAuto-detect preview mode from server discovery and configure AuthProvider
apps/console/src/App.tsxAdded PreviewBanner to console UI
examples/crm/server.tsChanged ConsolePlugin import to relative path
examples/crm/objectstack.config.tsChanged ConsolePlugin import to relative path
examples/crm/console-plugin.tsChanged ConsolePlugin re-export to relative path
examples/crm/package.jsonRemoved @object-ui/console dependency, upgraded @objectstack packages
packages/*/package.jsonUpgraded @objectstack/spec and other @objectstack dependencies to 3.0.4
CHANGELOG.mdDocumented @objectstack upgrade and preview mode features
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment on lines +40 to +47
style={{
padding: '8px 16px',
backgroundColor: '#fef3c7',
color: '#92400e',
textAlign: 'center',
fontSize: '14px',
borderBottom: '1px solid #fcd34d',
}}

CopilotAIFeb 14, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot generated this review using guidance from repository custom instructions.
Sign up for freeto 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.

3 participants

@hotlong