[WIP] Update objectstack to latest version and adjust code#852
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…ormat) Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR upgrades the monorepo to @objectstack/* v3.0.10 and updates ObjectUI’s type re-exports and example metadata to conform to the updated spec protocol (notably view filter rule format and dashboard widget id requirements).
Changes:
- Bump all
@objectstack/*dependencies to^3.0.10and updatepnpm-lock.yaml. - Re-export newly added spec/UI types in
@object-ui/typesand extend export validation tests. - Migrate example view filters to
{ field, operator, value }objects and add requiredidfields to example dashboard widgets; document the upgrade inROADMAP.md.
Reviewed changes
Copilot reviewed 26 out of 27 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updates resolved dependency graph for @objectstack/* v3.0.10 (and transitive bumps). |
| packages/types/src/theme.ts | Adds ThemeModeSchema type re-export from @objectstack/spec/ui. |
| packages/types/src/index.ts | Adds new v3.0.10 spec/UI type re-exports (e.g., DensityModeSchema, ViewFilterRule*, WcagContrastLevelSchema). |
| packages/types/src/tests/p2-spec-exports.test.ts | Extends tests to cover new spec types and schema availability/behavior (runtime checks via spec import, compile-time via type imports). |
| packages/types/package.json | Bumps @objectstack/spec dependency to ^3.0.10. |
| packages/react/package.json | Bumps @objectstack/spec dependency to ^3.0.10. |
| packages/plugin-timeline/package.json | Bumps @objectstack/spec dependency to ^3.0.10. |
| packages/plugin-map/package.json | Bumps @objectstack/spec dependency to ^3.0.10. |
| packages/plugin-gantt/package.json | Bumps @objectstack/spec dependency to ^3.0.10. |
| packages/data-objectstack/package.json | Bumps @objectstack/client dependency to ^3.0.10. |
| packages/core/package.json | Bumps @objectstack/spec dependency to ^3.0.10. |
| package.json | Bumps root @objectstack/* deps to ^3.0.10 (dev + runtime). |
| examples/todo/package.json | Bumps example deps to ^3.0.10. |
| examples/todo/objectstack.config.ts | Converts list view filter to object rules and adds required widget ids. |
| examples/msw-todo/package.json | Bumps example deps to ^3.0.10. |
| examples/kitchen-sink/package.json | Bumps example deps to ^3.0.10. |
| examples/kitchen-sink/objectstack.config.ts | Adds required widget ids to dashboard widgets. |
| examples/crm/src/views/user.view.ts | Converts view filter to object rule format. |
| examples/crm/src/views/product.view.ts | Converts view filter to object rule format. |
| examples/crm/src/views/order.view.ts | Converts view filter to object rule format. |
| examples/crm/src/views/event.view.ts | Converts view filter to object rule format. |
| examples/crm/src/views/contact.view.ts | Converts view filter to object rule format. |
| examples/crm/src/views/account.view.ts | Converts view filter to object rule format. |
| examples/crm/src/dashboards/crm.dashboard.ts | Adds required widget ids to CRM dashboard widgets. |
| examples/crm/package.json | Bumps example deps to ^3.0.10. |
| apps/console/package.json | Bumps app deps to ^3.0.10. |
| ROADMAP.md | Documents the v3.0.10 upgrade and protocol changes applied. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
examples/crm/src/dashboards/crm.dashboard.ts:66
- This section has inconsistent indentation compared to the KPI widgets above (e.g.,
id/title/typeare indented further than other widget objects in the same array). Running Prettier (or aligning indentation manually) would avoid noisy diffs and reduce the chance of failing formatting/lint checks.
// --- Row 2: Charts (provider: 'object' — dynamic aggregation) ---
{
id: 'revenue_trends',
title: 'Revenue Trends',
type: 'area' as const,
object: 'opportunity',
categoryField: 'stage',
| // ============================================================================ | ||
| // v3.0.10 Spec UI Types — View Filter Rules | ||
| // ============================================================================ | ||
| export type { | ||
| ViewFilterRule, | ||
| ViewFilterRuleSchema, | ||
| } from '@objectstack/spec/ui'; |
There was a problem hiding this comment.
ThemeModeSchema is not re-exported from the package entrypoint. Since packages/types/package.json does not export a ./theme subpath, consumers can’t import ThemeModeSchema from @object-ui/types/theme and it also isn’t available via @object-ui/types.
To match the PR description and make the new spec schema type usable, re-export ThemeModeSchema from packages/types/src/index.ts (e.g., include it in the export type { … } from './theme' block or re-export it from @objectstack/spec/ui alongside the other *Schema types).
| import type { | ||
| ThemeModeSchema, | ||
| } from '../theme'; |
There was a problem hiding this comment.
The test imports ThemeModeSchema from ../theme, but that subpath isn’t part of @object-ui/types’ public exports map (only . / ./base / ./layout / etc. are exported). To ensure the test reflects the public API (and avoids unused-import warnings), import ThemeModeSchema from ../index after it’s re-exported there, and reference it in a small type annotation so the compile-time check is meaningful.
|
|
||
| /** | ||
| * Theme Mode Schema | ||
| * Canonical Zod schema from @objectstack/spec/ui. |
There was a problem hiding this comment.
The comment says “Canonical Zod schema”, but this module only re-exports ThemeModeSchema as a type (export type { … }), not the runtime Zod schema value. Consider clarifying the wording (e.g., “Type of the canonical Zod schema”) to avoid implying that ThemeModeSchema.parse() is available from @object-ui/types.
| * Canonical Zod schema from @objectstack/spec/ui. | |
| * Type of the canonical Zod schema from @objectstack/spec/ui. |
@objectstack/*package versions from^3.0.9to^3.0.10across all 14 package.json filespnpm installto update lockfile@object-ui/types:DensityModeSchema,ViewFilterRule,ViewFilterRuleSchema,ThemeModeSchema,WcagContrastLevelSchemap2-spec-exports.test.tsto cover new types (29/29 pass)['field', '=', 'value']→ object[{ field, operator, value }](6 files)[['status', '!=', 'Done']]→[{ field: 'status', operator: '!=', value: 'Done' }]idto 7 widgetsidto 6 widgetsidto 12 widgetsROADMAP.mdwith v3.0.10 upgrade notesOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.