Skip to content

fix: resolve CI build and test errors - #1170

Merged
hotlong merged 3 commits into
mainfrom
copilot/fix-ci-build-test-errors-one-more-time
Apr 1, 2026
Merged

fix: resolve CI build and test errors#1170
hotlong merged 3 commits into
mainfrom
copilot/fix-ci-build-test-errors-one-more-time

Conversation

CopilotAI commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Four TS build errors and one test failure on main after #1169 merge.

Build errors

  • i18n-translations.test.ts: appConfig (undefined) → appConfigs[0] — the import is the array, two test cases referenced a nonexistent singular variable
  • HomePage.tsx: Remove unused import resolveI18nLabel
  • QuickActions.tsx: Remove unused imports Upload, FileText

Test failure: ReportView

sales_performance_q1 report was defined only in the aggregated sharedConfig.reports but never in any individual app config. The mock kernel loads metadata per-config via AppPlugin, so the report was invisible to tests.

Extracted the custom report into a standalone customReportsConfig export and added it to both mock server and browser kernel initialization:

// objectstack.shared.tsexportconstcustomReportsConfig={reports: [{name: 'sales_performance_q1',label: 'Q1 Sales Performance', ... }],manifest: {id: 'reports',name: 'reports'},};// server.ts / browser.tsappConfigs: [...appConfigs,setupAppConfig,customReportsConfig],

sharedConfig.reports now references customReportsConfig.reports instead of duplicating the definition.

@vercel

vercelBot commented Apr 1, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
objectui-demoReadyReadyPreview, CommentApr 1, 2026 10:21am
1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
objectuiIgnoredIgnoredApr 1, 2026 10:21am

Request Review

- Fix appConfig → appConfigs[0] in i18n-translations.test.ts (lines 138, 165)
- Remove unused import resolveI18nLabel from HomePage.tsx
- Remove unused imports Upload and FileText from QuickActions.tsx
- Export customReportsConfig from objectstack.shared.ts and include in mock server/browser to make sales_performance_q1 report available in test metadata
Agent-Logs-Url: https://github.com/objectstack-ai/objectui/sessions/9f8790f4-e34a-4ac2-9322-7a3347f499c6
Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
…NGELOG
Agent-Logs-Url: https://github.com/objectstack-ai/objectui/sessions/9f8790f4-e34a-4ac2-9322-7a3347f499c6
Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
CopilotAI changed the title [WIP] Fix all CI build and test errorsfix: resolve CI build and test errorsApr 1, 2026
@hotlong
hotlong marked this pull request as ready for review April 1, 2026 10:44
CopilotAI review requested due to automatic review settings April 1, 2026 10:44
@hotlong
hotlong merged commit 6974168 into mainApr 1, 2026
5 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

Fixes newly introduced CI TypeScript build errors and a failing ReportView test in @object-ui/console by removing unused imports, correcting a broken test reference, and ensuring a custom report is loaded into the mock kernel metadata.

Changes:

  • Removed unused imports triggering TS6133 in HomePage.tsx and QuickActions.tsx.
  • Fixed i18n-translations.test.ts to reference appConfigs[0] (array import) instead of a nonexistent appConfig.
  • Extracted sales_performance_q1 into customReportsConfig and added it to MSW mock kernel initialization; updated sharedConfig to reference it.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
CHANGELOG.mdDocuments the CI build/test fixes.
apps/console/src/pages/home/QuickActions.tsxRemoves unused Lucide icon imports to fix TS6133.
apps/console/src/pages/home/HomePage.tsxRemoves unused resolveI18nLabel import to fix TS6133.
apps/console/src/mocks/server.tsAdds customReportsConfig to mock kernel appConfigs so report metadata is available in tests.
apps/console/src/mocks/browser.tsAdds customReportsConfig to browser mock kernel appConfigs for consistency with test mocks.
apps/console/src/tests/i18n-translations.test.tsFixes references from appConfigappConfigs[0] to resolve TS build errors.
apps/console/objectstack.shared.tsIntroduces customReportsConfig and wires it into sharedConfig.reports.

Comment on lines +54 to +59
/**
* Additional reports that are not part of any individual app config.
* Loaded as a separate AppPlugin instance by the mock server (server.ts)
* and browser mock (browser.ts) so that these reports appear in the
* kernel's metadata alongside the app-specific reports.
*/

CopilotAIApr 1, 2026

Copy link

Choose a reason for hiding this comment

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

customReportsConfig is only appended to the MSW/mock kernels (src/mocks/server.ts + src/mocks/browser.ts). In server mode, apps/console/objectstack.config.ts registers metadata via per-config new AppPlugin(config) for appConfigs and setupAppConfig only, so sales_performance_q1 may still be missing when running pnpm start (and the CRM navigation link will lead to “Report Not Found”). Consider also loading customReportsConfig in server mode (e.g., add new AppPlugin(customReportsConfig) there or fold it into the exported appConfigs list).

Copilot uses AI. Check for mistakes.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@hotlong@xuyushun441-sys