Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- 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>
There was a problem hiding this comment.
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.tsxandQuickActions.tsx. - Fixed
i18n-translations.test.tsto referenceappConfigs[0](array import) instead of a nonexistentappConfig. - Extracted
sales_performance_q1intocustomReportsConfigand added it to MSW mock kernel initialization; updatedsharedConfigto 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 appConfig → appConfigs[0] to resolve TS build errors. |
| apps/console/objectstack.shared.ts | Introduces customReportsConfig and wires it into sharedConfig.reports. |
| /** | ||
| * 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. | ||
| */ |
There was a problem hiding this comment.
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).
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 variableHomePage.tsx: Remove unused importresolveI18nLabelQuickActions.tsx: Remove unused importsUpload,FileTextTest failure: ReportView
sales_performance_q1report was defined only in the aggregatedsharedConfig.reportsbut never in any individual app config. The mock kernel loads metadata per-config viaAppPlugin, so the report was invisible to tests.Extracted the custom report into a standalone
customReportsConfigexport and added it to both mock server and browser kernel initialization:sharedConfig.reportsnow referencescustomReportsConfig.reportsinstead of duplicating the definition.