Skip to content

Commit c5e5142

Browse files
authored
Merge pull request #1101 from objectstack-ai/copilot/fix-ci-errors-build-test-please-work
2 parents d7253fc + 466aa36 commit c5e5142

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Fixed
1515

16+
- **CI Build Fix: Unused Parameters in Test Mocks** (`apps/console`): Fixed TypeScript `noUnusedParameters` errors (TS6133) in `ListToolbarActions.test.tsx` where mock component `props` parameters were declared but never used in `@object-ui/plugin-kanban` and `@object-ui/plugin-calendar` mocks, causing the console `tsc` build step to fail in CI.
17+
1618
- **i18n loadLanguage Not Compatible with Spec REST API Response Format** (`apps/console`): Fixed `loadLanguage` in `apps/console/src/main.tsx` to correctly unwrap the `@objectstack/spec` REST API envelope `{ data: { locale, translations } }`. Previously, the function returned the raw JSON response, which meant `useObjectLabel` and `useObjectTranslation` hooks received a wrapped object instead of the flat translation map, causing business object and field labels (e.g., CRM contact/account) to fall back to English. The fix extracts `data.translations` when the spec envelope is detected, while preserving backward compatibility with mock/dev environments that return flat translation objects. Includes 6 unit tests covering spec envelope unwrapping, flat fallback, HTTP errors, network failures, and edge cases.
1719

1820
- **List Toolbar Action Buttons Not Responding** (`apps/console`): Fixed a bug where schema-driven action buttons in the upper-right corner of the list view (rendered via `action:bar` with `locations: ['list_toolbar']`) did not respond to clicks. The root cause: the console `ObjectView` component rendered these action buttons via `SchemaRenderer` without wrapping them in an `ActionProvider`. This caused `useAction()` to fall back to a local `ActionRunner` with no handlers, toast, confirmation, or navigation capabilities — so clicks executed silently with no visible effect. Added `ActionProvider` with proper handlers (toast via Sonner, confirmation dialog, navigation via React Router, param collection dialog, and a generic API handler) to the console `ObjectView`, following the same pattern already used in `RecordDetailView`. Includes 4 new integration tests validating the full action chain (render, confirm, execute, cancel).

apps/console/src/__tests__/ListToolbarActions.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ vi.mock('@object-ui/plugin-grid', () => ({
3131
}));
3232

3333
vi.mock('@object-ui/plugin-kanban', () => ({
34-
ObjectKanban: (props: any) => <div data-testid="object-kanban">Kanban View</div>
34+
ObjectKanban: (_props: any) => <div data-testid="object-kanban">Kanban View</div>
3535
}));
3636

3737
vi.mock('@object-ui/plugin-calendar', () => ({
38-
ObjectCalendar: (props: any) => <div data-testid="object-calendar">Calendar View</div>
38+
ObjectCalendar: (_props: any) => <div data-testid="object-calendar">Calendar View</div>
3939
}));
4040

4141
vi.mock('@object-ui/plugin-list', () => ({

0 commit comments

Comments
 (0)