Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

  • Analyze the repository structure and understand the issue
  • Identify root causes
  • Fix ObjectForm null schema handling in plugin-form/src/ObjectForm.tsx
  • Fix browser.ts double data seeding
  • Fix PluginObjectView layout for non-grid view height chain
  • Add regression test cases (11 tests)
  • Run tests to validate changes (all pass)
  • Fix CI build: remove unused imports in ConsoleIssues.test.tsx (TS6133)
  • Fix CI tests: add missing vitest aliases for @object-ui/types/zod and @object-ui/plugin-report
  • All 117 test files pass (2472 tests, 0 failures)
  • Code review and security scan

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

@vercel
Copy link

vercel bot commented Feb 8, 2026

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

Project Deployment Actions Updated (UTC)
objectui Ready Ready Preview, Comment Feb 8, 2026 7:54am
objectui-console Ready Ready Preview, Comment Feb 8, 2026 7:54am
objectui-storybook Ready Ready Preview, Comment Feb 8, 2026 7:54am

Request Review

Copilot AI and others added 2 commits February 8, 2026 04:43
… issues

- ObjectForm: handle null schema from getObjectSchema by throwing error
- ObjectForm: handle missing objectName/dataSource by clearing loading state
- browser.ts: remove duplicate data seeding (AppPlugin already seeds during bootstrap)
- ObjectView: fix layout to use flex column with proper height chain for non-grid views

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…grid views

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix loading issues in apps/console Fix console form infinite loading, duplicate data seeding, and non-grid view rendering Feb 8, 2026
Copilot AI requested a review from hotlong February 8, 2026 04:52
@hotlong
Copy link
Contributor

hotlong commented Feb 8, 2026

@copilot fix ci build and test

Remove unused imports (beforeAll, afterAll, within, fireEvent) that caused
TS6133 errors during the console app build.

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 8, 2026

@copilot fix ci build and test

Fixed in f23c7c5. The build failure was caused by unused imports (beforeAll, afterAll, within, fireEvent) in ConsoleIssues.test.tsx which triggered TS6133 errors due to noUnusedLocals: true in tsconfig.json. Removed the unused imports.

The 3 test failures (ListColumnSchema.test.ts, BrowserSimulation.test.tsx, ConsoleApp.test.tsx) are pre-existing — they fail due to unresolved @object-ui/types/zod and @object-ui/plugin-report packages respectively, none of which were introduced or modified by this PR.

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

📦 Bundle Size Report

Package Size Gzipped
components (index.js) 1808.45KB 425.11KB
core (index.js) 0.70KB 0.31KB
create-plugin (index.js) 9.28KB 2.98KB
data-objectstack (index.js) 22.92KB 5.60KB
fields (index.js) 87.61KB 17.17KB
layout (index.js) 14.61KB 4.51KB
plugin-aggrid (AddressField-BOOmnmjw.js) 3.05KB 0.76KB
plugin-aggrid (AgGridImpl-C6tmNFRA.js) 5.27KB 1.92KB
plugin-aggrid (AutoNumberField-jwAcEtba.js) 0.28KB 0.27KB
plugin-aggrid (FileField-C4nU7miP.js) 3.50KB 1.34KB
plugin-aggrid (FormulaField-D1GL121M.js) 0.52KB 0.38KB
plugin-aggrid (GeolocationField-C1rZIU8y.js) 4.46KB 1.50KB
plugin-aggrid (GridField-CPgulvWp.js) 1.71KB 0.68KB
plugin-aggrid (LocationField-RR6ofgYb.js) 0.93KB 0.54KB
plugin-aggrid (MasterDetailField-BhnckP0p.js) 3.86KB 1.17KB
plugin-aggrid (ObjectAgGridImpl-B-5mB-ka.js) 919.77KB 203.53KB
plugin-aggrid (ObjectField-B_XsSVG6.js) 1.61KB 0.77KB
plugin-aggrid (QRCodeField-DaUmd72E.js) 3.38KB 1.23KB
plugin-aggrid (RichTextField-kBVmNoQx.js) 1.16KB 0.59KB
plugin-aggrid (SignatureField-C-p3Glla.js) 3.32KB 1.28KB
plugin-aggrid (SummaryField-C_zIAVHC.js) 0.48KB 0.37KB
plugin-aggrid (UserField-DMwir776.js) 2.44KB 0.93KB
plugin-aggrid (VectorField-BTIkrvgu.js) 0.79KB 0.45KB
plugin-aggrid (index-D86IZ-2v.js) 19.21KB 4.90KB
plugin-aggrid (index.js) 0.22KB 0.16KB
plugin-calendar (index.js) 31.63KB 8.05KB
plugin-charts (AdvancedChartImpl-DFmeUY4Q.js) 124.69KB 25.93KB
plugin-charts (BarChart-C_I0OFbj.js) 542.77KB 135.30KB
plugin-charts (ChartImpl-B5LY4On3.js) 3.17KB 1.10KB
plugin-charts (index-DSBO2Kdy.js) 15.18KB 4.46KB
plugin-charts (index.js) 0.19KB 0.16KB
plugin-chatbot (index.js) 1200.27KB 344.58KB
plugin-dashboard (index.js) 179.63KB 44.63KB
plugin-detail (index.js) 1708.01KB 402.97KB
plugin-editor (MonacoImpl-hfdmoz6k.js) 18.15KB 5.59KB
plugin-editor (index-CuYbY6xb.js) 10.10KB 3.32KB
plugin-editor (index.js) 0.19KB 0.15KB
plugin-form (index.js) 52.17KB 10.49KB
plugin-gantt (index.js) 159.96KB 37.59KB
plugin-grid (index.js) 45.16KB 12.17KB
plugin-kanban (KanbanEnhanced-DjadKL5D.js) 31.43KB 9.03KB
plugin-kanban (KanbanImpl-BHAT_ney.js) 5.28KB 1.91KB
plugin-kanban (index-BhdljdIe.js) 17.29KB 5.01KB
plugin-kanban (index.js) 0.27KB 0.17KB
plugin-kanban (sortable.esm-ZHwgFQIO.js) 71.42KB 18.98KB
plugin-list (index.js) 1722.35KB 406.47KB
plugin-map (index.js) 126.32KB 30.52KB
plugin-map (maplibre-gl-CNsW26De.js) 1418.32KB 302.53KB
plugin-markdown (MarkdownImpl-DufQ-eRU.js) 256.68KB 64.45KB
plugin-markdown (index-CrmE78vF.js) 9.63KB 3.17KB
plugin-markdown (index.js) 0.19KB 0.15KB
plugin-report (index.js) 46.62KB 8.81KB
plugin-timeline (index.js) 105.30KB 24.14KB
plugin-view (index.js) 47.39KB 12.11KB
react (LazyPluginLoader.js) 1.10KB 0.58KB
react (SchemaRenderer.js) 3.28KB 1.30KB
react (index.js) 0.39KB 0.25KB
react (index.test.js) 0.34KB 0.26KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 0.20KB 0.18KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (data-display.js) 0.20KB 0.18KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (disclosure.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (index.js) 0.34KB 0.25KB
types (layout.js) 0.20KB 0.18KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (theme.js) 0.20KB 0.18KB
types (ui-action.js) 0.20KB 0.18KB
types (views.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@hotlong
Copy link
Contributor

hotlong commented Feb 8, 2026

@copilot fix all ci test errors

…ui/plugin-report

Add two missing module resolution aliases in vitest.config.mts:
- @object-ui/types/zod → packages/types/src/zod/index.zod.ts
- @object-ui/plugin-report → packages/plugin-report/src

This fixes 3 test file failures:
- packages/plugin-grid/src/ListColumnSchema.test.ts (could not resolve @object-ui/types/zod)
- apps/console/src/__tests__/BrowserSimulation.test.tsx (could not resolve @object-ui/plugin-report)
- apps/console/src/__tests__/ConsoleApp.test.tsx (could not resolve @object-ui/plugin-report)

All 117 test files now pass (2472 tests).

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 8, 2026

@copilot fix all ci test errors

Fixed in 6af4860. The 3 test failures were caused by missing vitest module resolution aliases in vitest.config.mts:

  • @object-ui/types/zod — needed by ListColumnSchema.test.ts
  • @object-ui/plugin-report — needed by BrowserSimulation.test.tsx and ConsoleApp.test.tsx (via ReportView.tsx)

All 117 test files now pass (2472 tests, 0 failures).

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

📦 Bundle Size Report

Package Size Gzipped
components (index.js) 1808.45KB 425.11KB
core (index.js) 0.70KB 0.31KB
create-plugin (index.js) 9.28KB 2.98KB
data-objectstack (index.js) 22.92KB 5.60KB
fields (index.js) 87.61KB 17.17KB
layout (index.js) 14.61KB 4.51KB
plugin-aggrid (AddressField-BOOmnmjw.js) 3.05KB 0.76KB
plugin-aggrid (AgGridImpl-C6tmNFRA.js) 5.27KB 1.92KB
plugin-aggrid (AutoNumberField-jwAcEtba.js) 0.28KB 0.27KB
plugin-aggrid (FileField-C4nU7miP.js) 3.50KB 1.34KB
plugin-aggrid (FormulaField-D1GL121M.js) 0.52KB 0.38KB
plugin-aggrid (GeolocationField-C1rZIU8y.js) 4.46KB 1.50KB
plugin-aggrid (GridField-CPgulvWp.js) 1.71KB 0.68KB
plugin-aggrid (LocationField-RR6ofgYb.js) 0.93KB 0.54KB
plugin-aggrid (MasterDetailField-BhnckP0p.js) 3.86KB 1.17KB
plugin-aggrid (ObjectAgGridImpl-B-5mB-ka.js) 919.77KB 203.53KB
plugin-aggrid (ObjectField-B_XsSVG6.js) 1.61KB 0.77KB
plugin-aggrid (QRCodeField-DaUmd72E.js) 3.38KB 1.23KB
plugin-aggrid (RichTextField-kBVmNoQx.js) 1.16KB 0.59KB
plugin-aggrid (SignatureField-C-p3Glla.js) 3.32KB 1.28KB
plugin-aggrid (SummaryField-C_zIAVHC.js) 0.48KB 0.37KB
plugin-aggrid (UserField-DMwir776.js) 2.44KB 0.93KB
plugin-aggrid (VectorField-BTIkrvgu.js) 0.79KB 0.45KB
plugin-aggrid (index-D86IZ-2v.js) 19.21KB 4.90KB
plugin-aggrid (index.js) 0.22KB 0.16KB
plugin-calendar (index.js) 31.63KB 8.05KB
plugin-charts (AdvancedChartImpl-DFmeUY4Q.js) 124.69KB 25.93KB
plugin-charts (BarChart-C_I0OFbj.js) 542.77KB 135.30KB
plugin-charts (ChartImpl-B5LY4On3.js) 3.17KB 1.10KB
plugin-charts (index-DSBO2Kdy.js) 15.18KB 4.46KB
plugin-charts (index.js) 0.19KB 0.16KB
plugin-chatbot (index.js) 1200.27KB 344.58KB
plugin-dashboard (index.js) 179.63KB 44.63KB
plugin-detail (index.js) 1708.01KB 402.97KB
plugin-editor (MonacoImpl-hfdmoz6k.js) 18.15KB 5.59KB
plugin-editor (index-CuYbY6xb.js) 10.10KB 3.32KB
plugin-editor (index.js) 0.19KB 0.15KB
plugin-form (index.js) 52.17KB 10.49KB
plugin-gantt (index.js) 159.96KB 37.59KB
plugin-grid (index.js) 45.16KB 12.17KB
plugin-kanban (KanbanEnhanced-DjadKL5D.js) 31.43KB 9.03KB
plugin-kanban (KanbanImpl-BHAT_ney.js) 5.28KB 1.91KB
plugin-kanban (index-BhdljdIe.js) 17.29KB 5.01KB
plugin-kanban (index.js) 0.27KB 0.17KB
plugin-kanban (sortable.esm-ZHwgFQIO.js) 71.42KB 18.98KB
plugin-list (index.js) 1722.35KB 406.47KB
plugin-map (index.js) 126.32KB 30.52KB
plugin-map (maplibre-gl-CNsW26De.js) 1418.32KB 302.53KB
plugin-markdown (MarkdownImpl-DufQ-eRU.js) 256.68KB 64.45KB
plugin-markdown (index-CrmE78vF.js) 9.63KB 3.17KB
plugin-markdown (index.js) 0.19KB 0.15KB
plugin-report (index.js) 46.62KB 8.81KB
plugin-timeline (index.js) 105.30KB 24.14KB
plugin-view (index.js) 47.39KB 12.11KB
react (LazyPluginLoader.js) 1.10KB 0.58KB
react (SchemaRenderer.js) 3.28KB 1.30KB
react (index.js) 0.39KB 0.25KB
react (index.test.js) 0.34KB 0.26KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 0.20KB 0.18KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (data-display.js) 0.20KB 0.18KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (disclosure.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (index.js) 0.34KB 0.25KB
types (layout.js) 0.20KB 0.18KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (theme.js) 0.20KB 0.18KB
types (ui-action.js) 0.20KB 0.18KB
types (views.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@hotlong hotlong marked this pull request as ready for review February 8, 2026 08:35
Copilot AI review requested due to automatic review settings February 8, 2026 08:35
@hotlong hotlong merged commit 2296390 into main Feb 8, 2026
16 checks passed
Copy link
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

Fixes several console/runtime regressions around form schema fetching, MSW mock initialization, and non-grid view layout sizing, plus adds targeted regression coverage and test/build config updates.

Changes:

  • Update ObjectForm to handle falsy schema fetch results and clear loading on schema-fetch errors.
  • Prevent duplicate manifest data seeding in the console MSW browser mock startup.
  • Fix ObjectView height/scroll chain for non-grid view types and add Vitest aliases + regression tests.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
vitest.config.mts Adds missing module aliases needed for tests to resolve subpath/package imports.
packages/plugin-view/src/ObjectView.tsx Enforces a flex column + height chain and wraps content to allow non-grid views to render/scroll correctly.
packages/plugin-form/src/ObjectForm.tsx Improves schema-fetch failure handling to avoid infinite loading and adds an early loading-clear fallback.
apps/console/src/mocks/browser.ts Removes redundant manifest seeding to avoid duplicating records in browser MSW mode.
apps/console/src/__tests__/ConsoleIssues.test.tsx Adds regression tests covering form loading, initial data fetch, and non-grid view rendering paths.

Comment on lines +173 to +192
it('should not stay in loading when dataSource is missing', async () => {
render(
<ObjectForm
schema={{
type: 'object-form',
objectName: 'contact',
mode: 'create',
fields: ['name'],
}}
/>,
);

// Should not show loading forever — either shows empty form or no-loading state
await waitFor(
() => {
expect(screen.queryByText(/Loading form/i)).not.toBeInTheDocument();
},
{ timeout: 5000 },
);
});
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

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

This test currently only asserts that the loading indicator disappears when dataSource is missing. Given the form can’t function without a DataSource (and the component has a specific error UI), it would be stronger and less prone to false positives to assert the error state/message is rendered (e.g., “Error loading form” / “DataSource is required …”) rather than just “not loading”.

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +36
function createMockDataSource(overrides?: Partial<DataSource>): DataSource {
return {
async getObjectSchema(_objectName: string) {
return {
name: 'contact',
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

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

createMockDataSource() ends with } as DataSource, which disables compile-time checking of the mock’s method signatures (e.g. delete should take (resource, id) per DataSource). Consider using satisfies DataSource (or const base: DataSource = { ... }) so signature mismatches are caught by TypeScript, and only use a targeted cast in the one test that intentionally returns null from getObjectSchema.

Copilot uses AI. Check for mistakes.
Comment on lines 247 to +250
} else if (schema.objectName && dataSource) {
fetchObjectSchema();
} else if (!hasInlineFields) {
// No objectName or dataSource and no inline fields — cannot proceed
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

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

In the schema-fetching effect, the fetchObjectSchema() function contains a !dataSource error path, but it’s never reached because fetchObjectSchema() is only called when schema.objectName && dataSource. When objectName is set and inline fields are not provided, but dataSource is missing, the code currently just setLoading(false) and renders an empty form (no error). Consider setting an explicit error in this branch (or calling fetchObjectSchema() whenever schema.objectName is present so the existing error handling runs) so the UI shows a clear failure state instead of a blank form.

Suggested change
} else if (schema.objectName && dataSource) {
fetchObjectSchema();
} else if (!hasInlineFields) {
// No objectName or dataSource and no inline fields — cannot proceed
} else if (schema.objectName) {
// Fetch schema using objectName; fetchObjectSchema will handle missing dataSource
fetchObjectSchema();
} else if (!hasInlineFields) {
// No objectName and no inline fields — cannot proceed
setError(new Error('Object name is required when inline fields are not provided'));

Copilot uses AI. Check for mistakes.
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.

2 participants