diff --git a/CHANGELOG.md b/CHANGELOG.md index 155ae59e..fd17d283 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- **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. + - **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. - **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). diff --git a/apps/console/src/__tests__/ListToolbarActions.test.tsx b/apps/console/src/__tests__/ListToolbarActions.test.tsx index c4ea28ca..363d82f4 100644 --- a/apps/console/src/__tests__/ListToolbarActions.test.tsx +++ b/apps/console/src/__tests__/ListToolbarActions.test.tsx @@ -31,11 +31,11 @@ vi.mock('@object-ui/plugin-grid', () => ({ })); vi.mock('@object-ui/plugin-kanban', () => ({ - ObjectKanban: (props: any) =>