From 860a00c11c132c40d70f7b96aa9ac21620ec926b Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 3 Mar 2026 01:41:07 +0000
Subject: [PATCH 01/12] Initial plan
From 19fa65f5b4bf7933b8a155f8d97de98fb8255607 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 3 Mar 2026 01:45:17 +0000
Subject: [PATCH 02/12] fix: skip memory-hungry plugins and src aliases in
Vercel/CI builds
On Vercel/CI, the turbo pipeline already builds every workspace package
to dist/ before Vite runs. This change:
1. Skips gzip/brotli compression plugins (Vercel CDN handles this)
2. Skips rollup-plugin-visualizer (not needed in CI)
3. Removes resolve.alias src/ overrides so Vite uses pre-built dist/
Together these reduce Vite/Rollup peak memory by ~2 GB, resolving the
OOM failures on Vercel without needing --concurrency or NODE_OPTIONS
workarounds.
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
---
apps/console/vite.config.ts | 58 ++++++++++++++++++++++---------------
1 file changed, 34 insertions(+), 24 deletions(-)
diff --git a/apps/console/vite.config.ts b/apps/console/vite.config.ts
index 94596292f..9b4e4be8a 100644
--- a/apps/console/vite.config.ts
+++ b/apps/console/vite.config.ts
@@ -40,6 +40,14 @@ function preloadCriticalChunks(): Plugin {
// auto-mount slug. Override with VITE_BASE_PATH only if deploying standalone.
const basePath = process.env.VITE_BASE_PATH || '/console/';
+// On Vercel/CI the turbo pipeline already builds every workspace package to
+// dist/ before Vite runs, so we can skip the memory-hungry src/ aliases and
+// let Vite resolve each @object-ui/* package through its normal package.json
+// "exports" → dist/. We also skip the compression and visualizer plugins
+// because the Vercel CDN handles gzip/brotli automatically and bundle analysis
+// is not needed during CI builds. Together this reduces peak memory by ~2 GB.
+const isCI = !!(process.env.VERCEL || process.env.CI);
+
// https://vitejs.dev/config/
export default defineConfig({
base: basePath,
@@ -54,29 +62,33 @@ export default defineConfig({
react(),
// Inject for critical chunks
preloadCriticalChunks(),
- // Gzip compression for production assets
- compression({
- algorithm: 'gzip',
- exclude: [/\.(br)$/, /\.(gz)$/],
- threshold: 1024,
- }),
- // Brotli compression for modern browsers
- compression({
- algorithm: 'brotliCompress',
- exclude: [/\.(br)$/, /\.(gz)$/],
- threshold: 1024,
- }),
- // Bundle analysis (generates stats.html in dist/)
- visualizer({
- filename: 'dist/stats.html',
- gzipSize: true,
- brotliSize: true,
- open: false,
- }),
+ // Gzip/Brotli compression & bundle visualizer are skipped on Vercel/CI to
+ // reduce memory usage — Vercel's CDN compresses assets automatically.
+ ...(!isCI ? [
+ compression({
+ algorithm: 'gzip',
+ exclude: [/\.(br)$/, /\.(gz)$/],
+ threshold: 1024,
+ }),
+ compression({
+ algorithm: 'brotliCompress',
+ exclude: [/\.(br)$/, /\.(gz)$/],
+ threshold: 1024,
+ }),
+ visualizer({
+ filename: 'dist/stats.html',
+ gzipSize: true,
+ brotliSize: true,
+ open: false,
+ }),
+ ] : []),
],
resolve: {
extensions: ['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json'],
- alias: {
+ // In CI/Vercel builds, all workspace packages are pre-built to dist/ by
+ // turbo so Vite resolves them through package.json "exports". During local
+ // dev, src/ aliases give us instant HMR without a prior build step.
+ alias: isCI ? {} : {
'@object-ui/components': path.resolve(__dirname, '../../packages/components/src'),
'@object-ui/core': path.resolve(__dirname, '../../packages/core/src'),
'@object-ui/fields': path.resolve(__dirname, '../../packages/fields/src'),
@@ -93,8 +105,8 @@ export default defineConfig({
'@object-ui/collaboration': path.resolve(__dirname, '../../packages/collaboration/src'),
'@object-ui/tenant': path.resolve(__dirname, '../../packages/tenant/src'),
'@object-ui/i18n': path.resolve(__dirname, '../../packages/i18n/src'),
-
- // Missing Plugin Aliases
+
+ // Plugin Aliases
'@object-ui/plugin-aggrid': path.resolve(__dirname, '../../packages/plugin-aggrid/src'),
'@object-ui/plugin-calendar': path.resolve(__dirname, '../../packages/plugin-calendar/src'),
'@object-ui/plugin-charts': path.resolve(__dirname, '../../packages/plugin-charts/src'),
@@ -108,8 +120,6 @@ export default defineConfig({
'@object-ui/plugin-markdown': path.resolve(__dirname, '../../packages/plugin-markdown/src'),
'@object-ui/plugin-timeline': path.resolve(__dirname, '../../packages/plugin-timeline/src'),
'@object-ui/plugin-view': path.resolve(__dirname, '../../packages/plugin-view/src'),
-
-
},
},
optimizeDeps: {
From 88aeae3f8d4c830d6dfbe2efb57fce0177ab7295 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 3 Mar 2026 01:46:26 +0000
Subject: [PATCH 03/12] refactor: extract localDevAliases constant for
readability
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
---
apps/console/vite.config.ts | 70 ++++++++++++++++++++-----------------
1 file changed, 37 insertions(+), 33 deletions(-)
diff --git a/apps/console/vite.config.ts b/apps/console/vite.config.ts
index 9b4e4be8a..7271ef814 100644
--- a/apps/console/vite.config.ts
+++ b/apps/console/vite.config.ts
@@ -48,6 +48,42 @@ const basePath = process.env.VITE_BASE_PATH || '/console/';
// is not needed during CI builds. Together this reduces peak memory by ~2 GB.
const isCI = !!(process.env.VERCEL || process.env.CI);
+// Workspace src/ aliases for local development — gives instant HMR without a
+// prior build step. Skipped in CI where turbo pre-builds everything to dist/.
+const localDevAliases: Record = {
+ '@object-ui/components': path.resolve(__dirname, '../../packages/components/src'),
+ '@object-ui/core': path.resolve(__dirname, '../../packages/core/src'),
+ '@object-ui/fields': path.resolve(__dirname, '../../packages/fields/src'),
+ '@object-ui/layout': path.resolve(__dirname, '../../packages/layout/src'),
+ '@object-ui/plugin-dashboard': path.resolve(__dirname, '../../packages/plugin-dashboard/src'),
+ '@object-ui/plugin-report': path.resolve(__dirname, '../../packages/plugin-report/src'),
+ '@object-ui/plugin-form': path.resolve(__dirname, '../../packages/plugin-form/src'),
+ '@object-ui/plugin-grid': path.resolve(__dirname, '../../packages/plugin-grid/src'),
+ '@object-ui/react': path.resolve(__dirname, '../../packages/react/src'),
+ '@object-ui/types': path.resolve(__dirname, '../../packages/types/src'),
+ '@object-ui/data-objectstack': path.resolve(__dirname, '../../packages/data-objectstack/src'),
+ '@object-ui/auth': path.resolve(__dirname, '../../packages/auth/src'),
+ '@object-ui/permissions': path.resolve(__dirname, '../../packages/permissions/src'),
+ '@object-ui/collaboration': path.resolve(__dirname, '../../packages/collaboration/src'),
+ '@object-ui/tenant': path.resolve(__dirname, '../../packages/tenant/src'),
+ '@object-ui/i18n': path.resolve(__dirname, '../../packages/i18n/src'),
+
+ // Plugin Aliases
+ '@object-ui/plugin-aggrid': path.resolve(__dirname, '../../packages/plugin-aggrid/src'),
+ '@object-ui/plugin-calendar': path.resolve(__dirname, '../../packages/plugin-calendar/src'),
+ '@object-ui/plugin-charts': path.resolve(__dirname, '../../packages/plugin-charts/src'),
+ '@object-ui/plugin-chatbot': path.resolve(__dirname, '../../packages/plugin-chatbot/src'),
+ '@object-ui/plugin-detail': path.resolve(__dirname, '../../packages/plugin-detail/src'),
+ '@object-ui/plugin-editor': path.resolve(__dirname, '../../packages/plugin-editor/src'),
+ '@object-ui/plugin-gantt': path.resolve(__dirname, '../../packages/plugin-gantt/src'),
+ '@object-ui/plugin-kanban': path.resolve(__dirname, '../../packages/plugin-kanban/src'),
+ '@object-ui/plugin-list': path.resolve(__dirname, '../../packages/plugin-list/src'),
+ '@object-ui/plugin-map': path.resolve(__dirname, '../../packages/plugin-map/src'),
+ '@object-ui/plugin-markdown': path.resolve(__dirname, '../../packages/plugin-markdown/src'),
+ '@object-ui/plugin-timeline': path.resolve(__dirname, '../../packages/plugin-timeline/src'),
+ '@object-ui/plugin-view': path.resolve(__dirname, '../../packages/plugin-view/src'),
+};
+
// https://vitejs.dev/config/
export default defineConfig({
base: basePath,
@@ -88,39 +124,7 @@ export default defineConfig({
// In CI/Vercel builds, all workspace packages are pre-built to dist/ by
// turbo so Vite resolves them through package.json "exports". During local
// dev, src/ aliases give us instant HMR without a prior build step.
- alias: isCI ? {} : {
- '@object-ui/components': path.resolve(__dirname, '../../packages/components/src'),
- '@object-ui/core': path.resolve(__dirname, '../../packages/core/src'),
- '@object-ui/fields': path.resolve(__dirname, '../../packages/fields/src'),
- '@object-ui/layout': path.resolve(__dirname, '../../packages/layout/src'),
- '@object-ui/plugin-dashboard': path.resolve(__dirname, '../../packages/plugin-dashboard/src'),
- '@object-ui/plugin-report': path.resolve(__dirname, '../../packages/plugin-report/src'),
- '@object-ui/plugin-form': path.resolve(__dirname, '../../packages/plugin-form/src'),
- '@object-ui/plugin-grid': path.resolve(__dirname, '../../packages/plugin-grid/src'),
- '@object-ui/react': path.resolve(__dirname, '../../packages/react/src'),
- '@object-ui/types': path.resolve(__dirname, '../../packages/types/src'),
- '@object-ui/data-objectstack': path.resolve(__dirname, '../../packages/data-objectstack/src'),
- '@object-ui/auth': path.resolve(__dirname, '../../packages/auth/src'),
- '@object-ui/permissions': path.resolve(__dirname, '../../packages/permissions/src'),
- '@object-ui/collaboration': path.resolve(__dirname, '../../packages/collaboration/src'),
- '@object-ui/tenant': path.resolve(__dirname, '../../packages/tenant/src'),
- '@object-ui/i18n': path.resolve(__dirname, '../../packages/i18n/src'),
-
- // Plugin Aliases
- '@object-ui/plugin-aggrid': path.resolve(__dirname, '../../packages/plugin-aggrid/src'),
- '@object-ui/plugin-calendar': path.resolve(__dirname, '../../packages/plugin-calendar/src'),
- '@object-ui/plugin-charts': path.resolve(__dirname, '../../packages/plugin-charts/src'),
- '@object-ui/plugin-chatbot': path.resolve(__dirname, '../../packages/plugin-chatbot/src'),
- '@object-ui/plugin-detail': path.resolve(__dirname, '../../packages/plugin-detail/src'),
- '@object-ui/plugin-editor': path.resolve(__dirname, '../../packages/plugin-editor/src'),
- '@object-ui/plugin-gantt': path.resolve(__dirname, '../../packages/plugin-gantt/src'),
- '@object-ui/plugin-kanban': path.resolve(__dirname, '../../packages/plugin-kanban/src'),
- '@object-ui/plugin-list': path.resolve(__dirname, '../../packages/plugin-list/src'),
- '@object-ui/plugin-map': path.resolve(__dirname, '../../packages/plugin-map/src'),
- '@object-ui/plugin-markdown': path.resolve(__dirname, '../../packages/plugin-markdown/src'),
- '@object-ui/plugin-timeline': path.resolve(__dirname, '../../packages/plugin-timeline/src'),
- '@object-ui/plugin-view': path.resolve(__dirname, '../../packages/plugin-view/src'),
- },
+ alias: isCI ? {} : localDevAliases,
},
optimizeDeps: {
include: [
From 0c3236b46ae421b0a89e2bc193ec13d425de5bfd Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 3 Mar 2026 02:32:32 +0000
Subject: [PATCH 04/12] fix: resolve TypeScript errors in plugin-dashboard and
plugin-grid
- Add `filter` to isObjectProvider type guard return type
- Add `searchable` and `pagination` to DashboardWidgetSchema
- Annotate normalizedConfig as Record to preserve index signature
- Resolve I18nLabel col.label to string in ObjectGrid ListColumn path
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
---
packages/plugin-dashboard/src/WidgetConfigPanel.tsx | 2 +-
packages/plugin-dashboard/src/utils.ts | 2 +-
packages/plugin-grid/src/ObjectGrid.tsx | 3 ++-
packages/types/src/complex.ts | 10 ++++++++++
4 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/packages/plugin-dashboard/src/WidgetConfigPanel.tsx b/packages/plugin-dashboard/src/WidgetConfigPanel.tsx
index 6f48d8b2e..a2175aa82 100644
--- a/packages/plugin-dashboard/src/WidgetConfigPanel.tsx
+++ b/packages/plugin-dashboard/src/WidgetConfigPanel.tsx
@@ -509,7 +509,7 @@ export function WidgetConfigPanel({
availableFields,
}: WidgetConfigPanelProps) {
// Pre-process config to resolve any I18nLabel values for title/description
- const normalizedConfig = React.useMemo(() => ({
+ const normalizedConfig: Record = React.useMemo(() => ({
...config,
title: typeof config.title === 'object' ? resolveLabel(config.title) : config.title,
description: typeof config.description === 'object' ? resolveLabel(config.description) : config.description,
diff --git a/packages/plugin-dashboard/src/utils.ts b/packages/plugin-dashboard/src/utils.ts
index da0207323..66761af78 100644
--- a/packages/plugin-dashboard/src/utils.ts
+++ b/packages/plugin-dashboard/src/utils.ts
@@ -7,7 +7,7 @@
*/
/** Returns true when the widget data config uses provider: 'object' (async data source). */
-export function isObjectProvider(widgetData: unknown): widgetData is { provider: 'object'; object?: string; aggregate?: any } {
+export function isObjectProvider(widgetData: unknown): widgetData is { provider: 'object'; object?: string; aggregate?: any; filter?: any } {
return (
widgetData != null &&
typeof widgetData === 'object' &&
diff --git a/packages/plugin-grid/src/ObjectGrid.tsx b/packages/plugin-grid/src/ObjectGrid.tsx
index 0db037e3f..4298efe37 100644
--- a/packages/plugin-grid/src/ObjectGrid.tsx
+++ b/packages/plugin-grid/src/ObjectGrid.tsx
@@ -619,7 +619,8 @@ export const ObjectGrid: React.FC = ({
return (cols as ListColumn[])
.filter((col) => col?.field && typeof col.field === 'string' && !col.hidden)
.map((col, colIndex) => {
- const rawHeader = col.label || col.field.charAt(0).toUpperCase() + col.field.slice(1).replace(/_/g, ' ');
+ const rawLabel = col.label;
+ const rawHeader = (typeof rawLabel === 'string' ? rawLabel : typeof rawLabel === 'object' && rawLabel ? (rawLabel as any).defaultValue || (rawLabel as any).key : null) || col.field.charAt(0).toUpperCase() + col.field.slice(1).replace(/_/g, ' ');
const header = schema.objectName ? resolveFieldLabel(schema.objectName, col.field, rawHeader) : rawHeader;
// Build custom cell renderer based on column configuration
diff --git a/packages/types/src/complex.ts b/packages/types/src/complex.ts
index bd54c3307..7df5614b7 100644
--- a/packages/types/src/complex.ts
+++ b/packages/types/src/complex.ts
@@ -544,6 +544,16 @@ export interface DashboardWidgetSchema {
* Aligned with @objectstack/spec DashboardWidgetSchema.responsive.
*/
responsive?: any;
+ /**
+ * Enable search input for table-type widgets.
+ * @default false
+ */
+ searchable?: boolean;
+ /**
+ * Enable pagination for table-type widgets.
+ * @default false
+ */
+ pagination?: boolean;
/**
* ARIA accessibility attributes.
* Aligned with @objectstack/spec AriaPropsSchema.
From 59ba8dc2a56cbcd584f39029a3afa4bca98adc32 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 3 Mar 2026 02:34:10 +0000
Subject: [PATCH 05/12] refactor: extract resolveColumnLabel helper for
I18nLabel type safety in ObjectGrid
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
---
packages/plugin-grid/src/ObjectGrid.tsx | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/packages/plugin-grid/src/ObjectGrid.tsx b/packages/plugin-grid/src/ObjectGrid.tsx
index 4298efe37..a7600e2c4 100644
--- a/packages/plugin-grid/src/ObjectGrid.tsx
+++ b/packages/plugin-grid/src/ObjectGrid.tsx
@@ -23,6 +23,7 @@
import React, { useEffect, useState, useCallback, useMemo } from 'react';
import type { ObjectGridSchema, DataSource, ListColumn, ViewData } from '@object-ui/types';
+import type { I18nLabel } from '@objectstack/spec/ui';
import { SchemaRenderer, useDataScope, useNavigationOverlay, useAction, useObjectTranslation, useSafeFieldLabel } from '@object-ui/react';
import { getCellRenderer, formatCurrency, formatCompactCurrency, formatDate, formatPercent, humanizeLabel } from '@object-ui/fields';
import {
@@ -90,6 +91,13 @@ function useGridTranslation() {
}
}
+/** Resolve an I18nLabel (string | {key, defaultValue}) to a plain string. */
+function resolveColumnLabel(label: string | I18nLabel | undefined): string | undefined {
+ if (label == null) return undefined;
+ if (typeof label === 'string') return label;
+ return label.defaultValue || label.key;
+}
+
export interface ObjectGridProps {
schema: ObjectGridSchema;
dataSource?: DataSource;
@@ -619,8 +627,7 @@ export const ObjectGrid: React.FC = ({
return (cols as ListColumn[])
.filter((col) => col?.field && typeof col.field === 'string' && !col.hidden)
.map((col, colIndex) => {
- const rawLabel = col.label;
- const rawHeader = (typeof rawLabel === 'string' ? rawLabel : typeof rawLabel === 'object' && rawLabel ? (rawLabel as any).defaultValue || (rawLabel as any).key : null) || col.field.charAt(0).toUpperCase() + col.field.slice(1).replace(/_/g, ' ');
+ const rawHeader = resolveColumnLabel(col.label) || col.field.charAt(0).toUpperCase() + col.field.slice(1).replace(/_/g, ' ');
const header = schema.objectName ? resolveFieldLabel(schema.objectName, col.field, rawHeader) : rawHeader;
// Build custom cell renderer based on column configuration
From d744723b374c048c63eaa51349e38465e3c351da Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 3 Mar 2026 03:33:41 +0000
Subject: [PATCH 06/12] fix: skip tsc and build:plugin in Vercel build to avoid
45-min timeout
The console tsconfig has noEmit:true (type-check only) and build:plugin
compiles a server-side plugin not needed for Vercel's static SPA.
Inlining just msw:init + vite build saves ~3-7 minutes.
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
---
apps/console/vercel.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/console/vercel.json b/apps/console/vercel.json
index 0cc3ddb22..e00f67e42 100644
--- a/apps/console/vercel.json
+++ b/apps/console/vercel.json
@@ -1,7 +1,7 @@
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"installCommand": "cd ../.. && pnpm install --frozen-lockfile",
- "buildCommand": "cd ../.. && pnpm turbo run build --filter=@object-ui/console^... && cd apps/console && VITE_BASE_PATH=/ pnpm build:vercel",
+ "buildCommand": "cd ../.. && pnpm turbo run build --filter=@object-ui/console^... && cd apps/console && pnpm msw:init && VITE_BASE_PATH=/ VITE_USE_MOCK_SERVER=true vite build",
"outputDirectory": "dist",
"framework": "vite",
"rewrites": [
From 2dd45fddb1590363fbd83f15154416c9f6c52a0d Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 3 Mar 2026 04:45:08 +0000
Subject: [PATCH 07/12] fix: add turbo --concurrency=3 and NODE_OPTIONS to
prevent OOM/timeout on Vercel
Turbo builds 30+ workspace packages, 20+ of which use vite build. Without
concurrency limits, turbo runs ~10 Vite processes simultaneously on Vercel's
2-core/8GB machine, causing OOM or extreme memory pressure that pushes the
build past the 45-minute limit.
With --concurrency=3, only 3 builds run in parallel (~3-4.5GB peak), staying
within memory limits while completing in ~10-20 minutes. NODE_OPTIONS gives
each child process 4GB heap headroom.
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
---
apps/console/vercel.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/console/vercel.json b/apps/console/vercel.json
index e00f67e42..bd292a3e0 100644
--- a/apps/console/vercel.json
+++ b/apps/console/vercel.json
@@ -1,7 +1,7 @@
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"installCommand": "cd ../.. && pnpm install --frozen-lockfile",
- "buildCommand": "cd ../.. && pnpm turbo run build --filter=@object-ui/console^... && cd apps/console && pnpm msw:init && VITE_BASE_PATH=/ VITE_USE_MOCK_SERVER=true vite build",
+ "buildCommand": "cd ../.. && NODE_OPTIONS=--max-old-space-size=4096 pnpm turbo run build --filter=@object-ui/console^... --concurrency=3 && cd apps/console && pnpm msw:init && VITE_BASE_PATH=/ VITE_USE_MOCK_SERVER=true vite build",
"outputDirectory": "dist",
"framework": "vite",
"rewrites": [
From 7f9bb2ce18676eb61de3988101e3b9acc5f42d25 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 3 Mar 2026 05:18:04 +0000
Subject: [PATCH 08/12] fix: annotate effectiveRelated type in DetailView to
fix TS2339 errors for api/columns properties
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
---
packages/plugin-detail/src/DetailView.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/plugin-detail/src/DetailView.tsx b/packages/plugin-detail/src/DetailView.tsx
index 990834e95..40006b7a1 100644
--- a/packages/plugin-detail/src/DetailView.tsx
+++ b/packages/plugin-detail/src/DetailView.tsx
@@ -319,7 +319,7 @@ export const DetailView: React.FC = ({
}, [schema.autoDiscoverRelated, schema.related, objectSchema]);
// Merge explicit and auto-discovered related lists
- const effectiveRelated = React.useMemo(() => {
+ const effectiveRelated: NonNullable = React.useMemo(() => {
if (schema.related && schema.related.length > 0) return schema.related;
return discoveredRelated.map((r) => ({
title: r.title,
From e1b90d26851c1e73fe2409ae4dc66cc760424b83 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 3 Mar 2026 05:43:27 +0000
Subject: [PATCH 09/12] fix: add default export condition to packages missing
it for Rollup commonjs resolver compatibility
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
---
packages/auth/package.json | 3 ++-
packages/cli/package.json | 3 ++-
packages/collaboration/package.json | 3 ++-
packages/core/package.json | 3 ++-
packages/i18n/package.json | 6 ++++--
packages/mobile/package.json | 3 ++-
packages/permissions/package.json | 3 ++-
packages/react/package.json | 3 ++-
packages/tenant/package.json | 3 ++-
9 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/packages/auth/package.json b/packages/auth/package.json
index 5155a2ab8..b35a4b374 100644
--- a/packages/auth/package.json
+++ b/packages/auth/package.json
@@ -16,7 +16,8 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.js"
+ "import": "./dist/index.js",
+ "default": "./dist/index.js"
}
},
"files": [
diff --git a/packages/cli/package.json b/packages/cli/package.json
index 0f360b4d9..5310dbc26 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -18,7 +18,8 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.js"
+ "import": "./dist/index.js",
+ "default": "./dist/index.js"
}
},
"files": [
diff --git a/packages/collaboration/package.json b/packages/collaboration/package.json
index 6f8d19f64..11608201e 100644
--- a/packages/collaboration/package.json
+++ b/packages/collaboration/package.json
@@ -16,7 +16,8 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.js"
+ "import": "./dist/index.js",
+ "default": "./dist/index.js"
}
},
"files": [
diff --git a/packages/core/package.json b/packages/core/package.json
index c48b28fc1..3821ae3d9 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -20,7 +20,8 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.js"
+ "import": "./dist/index.js",
+ "default": "./dist/index.js"
}
},
"scripts": {
diff --git a/packages/i18n/package.json b/packages/i18n/package.json
index 0afde714a..6f76549bd 100644
--- a/packages/i18n/package.json
+++ b/packages/i18n/package.json
@@ -20,11 +20,13 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.js"
+ "import": "./dist/index.js",
+ "default": "./dist/index.js"
},
"./locales/*": {
"types": "./dist/locales/*.d.ts",
- "import": "./dist/locales/*.js"
+ "import": "./dist/locales/*.js",
+ "default": "./dist/locales/*.js"
}
},
"scripts": {
diff --git a/packages/mobile/package.json b/packages/mobile/package.json
index 599b9a478..e7046680a 100644
--- a/packages/mobile/package.json
+++ b/packages/mobile/package.json
@@ -16,7 +16,8 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.js"
+ "import": "./dist/index.js",
+ "default": "./dist/index.js"
}
},
"files": [
diff --git a/packages/permissions/package.json b/packages/permissions/package.json
index bc1cf233f..744cd9531 100644
--- a/packages/permissions/package.json
+++ b/packages/permissions/package.json
@@ -16,7 +16,8 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.js"
+ "import": "./dist/index.js",
+ "default": "./dist/index.js"
}
},
"files": [
diff --git a/packages/react/package.json b/packages/react/package.json
index e17efddbe..f96b3b3ff 100644
--- a/packages/react/package.json
+++ b/packages/react/package.json
@@ -19,7 +19,8 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.js"
+ "import": "./dist/index.js",
+ "default": "./dist/index.js"
}
},
"scripts": {
diff --git a/packages/tenant/package.json b/packages/tenant/package.json
index 2356d12df..063cdb2bf 100644
--- a/packages/tenant/package.json
+++ b/packages/tenant/package.json
@@ -16,7 +16,8 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.js"
+ "import": "./dist/index.js",
+ "default": "./dist/index.js"
}
},
"files": [
From 0eedfe7b8e6bdd476b483ed6179bf4cdcf001beb Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 3 Mar 2026 06:13:29 +0000
Subject: [PATCH 10/12] fix: restore src/ aliases in CI to fix "Unknown
component type" runtime errors
Resolving from dist/ in CI caused plugin side-effect imports
(ComponentRegistry.register) to silently fail on Vercel, resulting in
"Unknown component type: object-grid" and similar runtime errors for
kanban, calendar, and other plugins.
Root cause: when Vite resolves plugins from pre-built dist/ bundles
(instead of src/ via aliases), the ComponentRegistry singleton can get
duplicated across Rollup chunks, so registrations happen on a different
instance than the one SchemaRenderer queries.
Fix: keep src/ aliases in ALL environments. The turbo build step is now
removed from the Vercel buildCommand since Vite processes sources
directly. Memory savings are still achieved by skipping compression
and visualizer plugins in CI (~1.5 GB reduction).
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
---
apps/console/vercel.json | 2 +-
apps/console/vite.config.ts | 26 +++++++++++++-------------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/apps/console/vercel.json b/apps/console/vercel.json
index bd292a3e0..6ec09f16b 100644
--- a/apps/console/vercel.json
+++ b/apps/console/vercel.json
@@ -1,7 +1,7 @@
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"installCommand": "cd ../.. && pnpm install --frozen-lockfile",
- "buildCommand": "cd ../.. && NODE_OPTIONS=--max-old-space-size=4096 pnpm turbo run build --filter=@object-ui/console^... --concurrency=3 && cd apps/console && pnpm msw:init && VITE_BASE_PATH=/ VITE_USE_MOCK_SERVER=true vite build",
+ "buildCommand": "cd apps/console && pnpm msw:init && NODE_OPTIONS=--max-old-space-size=4096 VITE_BASE_PATH=/ VITE_USE_MOCK_SERVER=true vite build",
"outputDirectory": "dist",
"framework": "vite",
"rewrites": [
diff --git a/apps/console/vite.config.ts b/apps/console/vite.config.ts
index 7271ef814..cb9e2c4a0 100644
--- a/apps/console/vite.config.ts
+++ b/apps/console/vite.config.ts
@@ -40,17 +40,20 @@ function preloadCriticalChunks(): Plugin {
// auto-mount slug. Override with VITE_BASE_PATH only if deploying standalone.
const basePath = process.env.VITE_BASE_PATH || '/console/';
-// On Vercel/CI the turbo pipeline already builds every workspace package to
-// dist/ before Vite runs, so we can skip the memory-hungry src/ aliases and
-// let Vite resolve each @object-ui/* package through its normal package.json
-// "exports" → dist/. We also skip the compression and visualizer plugins
-// because the Vercel CDN handles gzip/brotli automatically and bundle analysis
-// is not needed during CI builds. Together this reduces peak memory by ~2 GB.
+// On Vercel/CI we skip the compression and visualizer plugins because the
+// Vercel CDN handles gzip/brotli automatically and bundle analysis is not
+// needed during CI builds. This reduces peak memory by ~1.5 GB.
+//
+// Workspace src/ aliases are kept in ALL environments (dev + CI) so that
+// plugin side-effect imports (ComponentRegistry.register) resolve correctly.
+// Without them, Vite would import pre-built dist/ bundles where the
+// singleton ComponentRegistry can get duplicated across chunks, causing
+// "Unknown component type" errors at runtime.
const isCI = !!(process.env.VERCEL || process.env.CI);
-// Workspace src/ aliases for local development — gives instant HMR without a
-// prior build step. Skipped in CI where turbo pre-builds everything to dist/.
-const localDevAliases: Record = {
+// Workspace src/ aliases — gives instant HMR in dev and ensures correct
+// side-effect resolution (plugin registrations) in production builds.
+const workspaceAliases: Record = {
'@object-ui/components': path.resolve(__dirname, '../../packages/components/src'),
'@object-ui/core': path.resolve(__dirname, '../../packages/core/src'),
'@object-ui/fields': path.resolve(__dirname, '../../packages/fields/src'),
@@ -121,10 +124,7 @@ export default defineConfig({
],
resolve: {
extensions: ['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json'],
- // In CI/Vercel builds, all workspace packages are pre-built to dist/ by
- // turbo so Vite resolves them through package.json "exports". During local
- // dev, src/ aliases give us instant HMR without a prior build step.
- alias: isCI ? {} : localDevAliases,
+ alias: workspaceAliases,
},
optimizeDeps: {
include: [
From c58dad8f6305e52459f747d1393a24dcf44fd23a Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 3 Mar 2026 06:44:50 +0000
Subject: [PATCH 11/12] fix: add missing mobile and plugin-designer workspace
aliases to fix Vercel build
Without turbo pre-building to dist/, all workspace packages must be in
the src/ alias map for Vite to resolve them. @object-ui/mobile and
@object-ui/plugin-designer were missing, causing:
[commonjs--resolver] Failed to resolve entry for package "@object-ui/mobile"
Build now succeeds in ~18s locally.
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
---
apps/console/vite.config.ts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/apps/console/vite.config.ts b/apps/console/vite.config.ts
index cb9e2c4a0..bd0a8482d 100644
--- a/apps/console/vite.config.ts
+++ b/apps/console/vite.config.ts
@@ -70,6 +70,7 @@ const workspaceAliases: Record = {
'@object-ui/collaboration': path.resolve(__dirname, '../../packages/collaboration/src'),
'@object-ui/tenant': path.resolve(__dirname, '../../packages/tenant/src'),
'@object-ui/i18n': path.resolve(__dirname, '../../packages/i18n/src'),
+ '@object-ui/mobile': path.resolve(__dirname, '../../packages/mobile/src'),
// Plugin Aliases
'@object-ui/plugin-aggrid': path.resolve(__dirname, '../../packages/plugin-aggrid/src'),
@@ -85,6 +86,7 @@ const workspaceAliases: Record = {
'@object-ui/plugin-markdown': path.resolve(__dirname, '../../packages/plugin-markdown/src'),
'@object-ui/plugin-timeline': path.resolve(__dirname, '../../packages/plugin-timeline/src'),
'@object-ui/plugin-view': path.resolve(__dirname, '../../packages/plugin-view/src'),
+ '@object-ui/plugin-designer': path.resolve(__dirname, '../../packages/plugin-designer/src'),
};
// https://vitejs.dev/config/
From b7c69fd197219e9da5b6e16f43abd5a3a139da0a Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 3 Mar 2026 06:53:10 +0000
Subject: [PATCH 12/12] fix: remove erroneous 'cd apps/console' from Vercel
buildCommand
Vercel's working directory is already apps/console (as confirmed by
installCommand using 'cd ../..'), so 'cd apps/console' fails with
'No such file or directory'.
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
---
apps/console/vercel.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/console/vercel.json b/apps/console/vercel.json
index 6ec09f16b..94620d4b2 100644
--- a/apps/console/vercel.json
+++ b/apps/console/vercel.json
@@ -1,7 +1,7 @@
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"installCommand": "cd ../.. && pnpm install --frozen-lockfile",
- "buildCommand": "cd apps/console && pnpm msw:init && NODE_OPTIONS=--max-old-space-size=4096 VITE_BASE_PATH=/ VITE_USE_MOCK_SERVER=true vite build",
+ "buildCommand": "pnpm msw:init && NODE_OPTIONS=--max-old-space-size=4096 VITE_BASE_PATH=/ VITE_USE_MOCK_SERVER=true vite build",
"outputDirectory": "dist",
"framework": "vite",
"rewrites": [