Skip to content

fix: resolve CI build and test errors#1170

Merged
hotlong merged 3 commits intomainfrom
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 intomainfrom
copilot/fix-ci-build-test-errors-one-more-time

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

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.ts
export const customReportsConfig = {
  reports: [{ name: 'sales_performance_q1', label: 'Q1 Sales Performance', ... }],
  manifest: { id: 'reports', name: 'reports' },
};

// server.ts / browser.ts
appConfigs: [...appConfigs, setupAppConfig, customReportsConfig],

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

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 1, 2026

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

Project Deployment Actions Updated (UTC)
objectui-demo Ready Ready Preview, Comment Apr 1, 2026 10:21am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectui Ignored Ignored Apr 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>
Copilot AI changed the title [WIP] Fix all CI build and test errors fix: resolve CI build and test errors Apr 1, 2026
Copilot AI requested a review from xuyushun441-sys April 1, 2026 10:21
@hotlong hotlong marked this pull request as ready for review April 1, 2026 10:44
Copilot AI review requested due to automatic review settings April 1, 2026 10:44
@hotlong hotlong merged commit 6974168 into main Apr 1, 2026
5 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

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
File Description
CHANGELOG.md Documents the CI build/test fixes.
apps/console/src/pages/home/QuickActions.tsx Removes unused Lucide icon imports to fix TS6133.
apps/console/src/pages/home/HomePage.tsx Removes unused resolveI18nLabel import to fix TS6133.
apps/console/src/mocks/server.ts Adds customReportsConfig to mock kernel appConfigs so report metadata is available in tests.
apps/console/src/mocks/browser.ts Adds customReportsConfig to browser mock kernel appConfigs for consistency with test mocks.
apps/console/src/tests/i18n-translations.test.ts Fixes references from appConfigappConfigs[0] to resolve TS build errors.
apps/console/objectstack.shared.ts Introduces 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.
*/
Copy link

Copilot AI Apr 1, 2026

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 free to 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