Skip to content

Commit f9f9f51

Browse files
Merge ObjectManagerPage into MetadataManagerPage pipeline via listComponent + pageSchemaFactory
- Add `listComponent` and `MetadataListComponentProps` to MetadataTypeConfig - Create ObjectManagerListAdapter wrapping ObjectManager from plugin-designer - Configure object type with listComponent (removes customRoute) - Update MetadataManagerPage to render listComponent when configured - Replace ObjectManagerPage routes with redirects in App.tsx - Update sidebar, QuickActions to use /system/metadata/object route - Delete ObjectManagerPage.tsx - Migrate tests to ObjectManagerMetadataPipeline.test.tsx - Update metadataTypeRegistry and MetadataDetailPage tests - Update CHANGELOG.md and ROADMAP.md Agent-Logs-Url: https://github.com/objectstack-ai/objectui/sessions/089aad95-279a-44ed-852a-464a710ba509 Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
1 parent 2db5040 commit f9f9f51

13 files changed

+603
-582
lines changed

CHANGELOG.md

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

88
## [Unreleased]
99

10+
### Changed
11+
12+
- **Merged ObjectManagerPage into MetadataManagerPage pipeline** (`@object-ui/console`): Removed the standalone `ObjectManagerPage` component. Object management is now fully handled by the generic `MetadataManagerPage` (list view) and `MetadataDetailPage` (detail view) pipeline. The object type config in `metadataTypeRegistry` uses `listComponent: ObjectManagerListAdapter` for the custom list UI and `pageSchemaFactory: buildObjectDetailPageSchema` for the detail page, eliminating redundant page code and centralizing all metadata management through a single architecture.
13+
14+
- **`listComponent` extension point on MetadataTypeConfig** (`@object-ui/console`): New optional `listComponent` field allows metadata types to inject a fully custom list component into `MetadataManagerPage`, replacing the default card/grid rendering. The page shell (header, back button, title) is still rendered by the generic manager. `MetadataListComponentProps` interface provides `config`, `basePath`, `metadataType`, and `isAdmin` to the custom component.
15+
16+
- **Routes unified to `/system/metadata/object`** (`@object-ui/console`): All entry points (sidebar, QuickActions, SystemHubPage hub cards) now point to `/system/metadata/object` instead of `/system/objects`. Legacy `/system/objects` routes redirect to the new path for backward compatibility.
17+
18+
### Removed
19+
20+
- **`ObjectManagerPage`** (`@object-ui/console`): Deleted `pages/system/ObjectManagerPage.tsx`. All object management functionality is now delivered through the `ObjectManagerListAdapter` + `MetadataManagerPage`/`MetadataDetailPage` pipeline.
21+
22+
- **`customRoute` on object type config** (`@object-ui/console`): The object metadata type no longer uses `customRoute: '/system/objects'`. It now routes through the standard metadata pipeline at `/system/metadata/object`.
23+
1024
### Fixed
1125

1226
- **Protocol bridges** (`@object-ui/core`): Updated `DndProtocol`, `KeyboardProtocol`, and `NotificationProtocol` to align with `@objectstack/spec` v4 type changes where `ariaLabel`, `label`, `title`, and `message` fields are now plain strings instead of i18n translation objects (`{ key, defaultValue }`).

ROADMAP.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,8 +943,11 @@ Enterprise-grade visual designers for managing object definitions and configurin
943943
- [x] `boolean` field type — renders Shadcn Switch toggle with Yes/No label
944944

945945
**MetadataDetailPage & Provider Enhancements:**
946-
- [x] Auto-redirect for custom page types (object → `/system/objects/:name`)
946+
- [x] Auto-redirect for custom page types (object → `/system/objects/:name`) — removed; object now uses metadata pipeline
947947
- [x] `getItemsByType(type)` method on MetadataProvider for dynamic registry access
948+
- [x] Object type merged into MetadataManagerPage pipeline — `ObjectManagerPage` removed, replaced by `ObjectManagerListAdapter` via `listComponent` extension point
949+
- [x] `listComponent` extension point on MetadataTypeConfig for injecting custom list UIs
950+
- [x] All entry points (sidebar, QuickActions, hub cards) unified to `/system/metadata/object`
948951

949952
**Technical Debt Cleanup:**
950953
- [x] Unified icon resolver — consolidated 3 duplicated ICON_MAP/resolveIcon into shared `getIcon` utility

apps/console/src/App.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ const ForgotPasswordPage = lazy(() => import('./pages/ForgotPasswordPage').then(
4747
// System Admin Pages (lazy — rarely accessed)
4848
const SystemHubPage = lazy(() => import('./pages/system/SystemHubPage').then(m => ({ default: m.SystemHubPage })));
4949
const AppManagementPage = lazy(() => import('./pages/system/AppManagementPage').then(m => ({ default: m.AppManagementPage })));
50-
const ObjectManagerPage = lazy(() => import('./pages/system/ObjectManagerPage').then(m => ({ default: m.ObjectManagerPage })));
5150
const MetadataManagerPage = lazy(() => import('./pages/system/MetadataManagerPage').then(m => ({ default: m.MetadataManagerPage })));
5251
const MetadataDetailPage = lazy(() => import('./pages/system/MetadataDetailPage').then(m => ({ default: m.MetadataDetailPage })));
5352
const UserManagementPage = lazy(() => import('./pages/system/UserManagementPage').then(m => ({ default: m.UserManagementPage })));
@@ -294,8 +293,8 @@ export function AppContent() {
294293
<Route path="create-app" element={<CreateAppPage />} />
295294
<Route path="system" element={<SystemHubPage />} />
296295
<Route path="system/apps" element={<AppManagementPage />} />
297-
<Route path="system/objects" element={<ObjectManagerPage />} />
298-
<Route path="system/objects/:objectName" element={<ObjectManagerPage />} />
296+
<Route path="system/objects" element={<Navigate to="/system/metadata/object" replace />} />
297+
<Route path="system/objects/:objectName" element={<Navigate to="/system/metadata/object" replace />} />
299298
<Route path="system/users" element={<UserManagementPage />} />
300299
<Route path="system/organizations" element={<OrgManagementPage />} />
301300
<Route path="system/roles" element={<RoleManagementPage />} />
@@ -390,8 +389,8 @@ export function AppContent() {
390389
{/* System Administration Routes */}
391390
<Route path="system" element={<SystemHubPage />} />
392391
<Route path="system/apps" element={<AppManagementPage />} />
393-
<Route path="system/objects" element={<ObjectManagerPage />} />
394-
<Route path="system/objects/:objectName" element={<ObjectManagerPage />} />
392+
<Route path="system/objects" element={<Navigate to="system/metadata/object" replace />} />
393+
<Route path="system/objects/:objectName" element={<Navigate to="system/metadata/object" replace />} />
395394
<Route path="system/users" element={<UserManagementPage />} />
396395
<Route path="system/organizations" element={<OrgManagementPage />} />
397396
<Route path="system/roles" element={<RoleManagementPage />} />
@@ -486,8 +485,8 @@ function SystemRoutes() {
486485
<Routes>
487486
<Route path="/" element={<SystemHubPage />} />
488487
<Route path="apps" element={<AppManagementPage />} />
489-
<Route path="objects" element={<ObjectManagerPage />} />
490-
<Route path="objects/:objectName" element={<ObjectManagerPage />} />
488+
<Route path="objects" element={<Navigate to="/system/metadata/object" replace />} />
489+
<Route path="objects/:objectName" element={<Navigate to="/system/metadata/object" replace />} />
491490
<Route path="users" element={<UserManagementPage />} />
492491
<Route path="organizations" element={<OrgManagementPage />} />
493492
<Route path="roles" element={<RoleManagementPage />} />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ describe('MetadataDetailPage', () => {
247247
</MemoryRouter>,
248248
);
249249
fireEvent.click(screen.getByTestId('back-to-list-btn'));
250-
expect(mockNavigate).toHaveBeenCalledWith('/system/objects');
250+
expect(mockNavigate).toHaveBeenCalledWith('/system/metadata/object');
251251
});
252252
});
253253
});

0 commit comments

Comments
 (0)