Skip to content

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

Merged
hotlong merged 4 commits intomainfrom
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 intomainfrom
copilot/update-objectstack-to-latest-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 14, 2026

  • 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/spec#676


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

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 14, 2026

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

Project Deployment Actions Updated (UTC)
objectui Error Error Feb 14, 2026 11:49am
objectui-demo Error Error Feb 14, 2026 11:49am
objectui-storybook Error Error Feb 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

hotlong commented Feb 14, 2026

@copilot 更新相关文档

Copilot AI changed the title [WIP] Upgrade @objectstack to the latest version with preview mode feat: upgrade @objectstack to 3.0.4, add preview mode support Feb 14, 2026
Copilot AI requested a review from hotlong February 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>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 14, 2026

@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

Metric Value Budget
Main entry (gzip) ** KB** KB
Entry file ``
Status FAIL

@hotlong
Copy link
Copy Markdown
Contributor

hotlong commented Feb 14, 2026

更新现有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>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 14, 2026

更新现有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
Copilot AI review requested due to automatic review settings February 14, 2026 12:03
@hotlong hotlong merged commit 9348936 into main Feb 14, 2026
1 of 4 checks passed
Copy link
Copy Markdown
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 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
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

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

Copilot AI Feb 14, 2026

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 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.

3 participants