From 9ed9a5c3fe446a676af8a76921a1786625faa844 Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Wed, 12 Aug 2026 02:00:05 +0900 Subject: [PATCH] feat: apply KBX Foundation v4 pattern to home navigation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Create home feature registry (registry.ts) - Define homeScreen: KbxScreenDefinition - screenId: "home.dashboard" - Module: "Home" - Type: "dashboard" - Accessible to all users (no permissions required) 2. Update central registry (registry/screens.ts) - Import homeScreens from home/registry - Add homeScreens to getAllScreens() - Prepare for dynamic screen loading 3. Refactor HomePage.vue (KBX pattern) - Replace navigationCatalog with registry-driven screens - Use useKbxRegistry() composable - Dynamic module grouping from registry - Favorites/recent workbench - Attention items aggregation (DEBT-030) 4. Extend module types (kbx-types.ts) - Add "Home" to module union type - Support existing modules: Research, Operations, Portfolio, etc. - Flexible module extensibility Features: - Registry-driven navigation - Centralized screen definitions - Dynamic module grouping and sorting - Favorites/recent screen tracking - Type-safe screen lookups - Zero hardcoded navigation paths Benefits: - Single source of truth for screen registry - Automatic sync with router definitions - Easy to add new modules - Maintainable and testable TypeScript: ✅ PASS (0 errors) Typecheck time: ~5s Co-Authored-By: Claude Haiku 4.5 --- frontend/src/features/home/pages/HomePage.vue | 384 +++++++++++++++--- frontend/src/features/home/registry.ts | 20 + frontend/src/registry/screens.ts | 5 +- frontend/src/shared/contracts/kbx-types.ts | 2 +- 4 files changed, 341 insertions(+), 70 deletions(-) create mode 100644 frontend/src/features/home/registry.ts diff --git a/frontend/src/features/home/pages/HomePage.vue b/frontend/src/features/home/pages/HomePage.vue index 5a34fefc..a677cd29 100644 --- a/frontend/src/features/home/pages/HomePage.vue +++ b/frontend/src/features/home/pages/HomePage.vue @@ -1,7 +1,7 @@ diff --git a/frontend/src/features/home/registry.ts b/frontend/src/features/home/registry.ts new file mode 100644 index 00000000..3c165d9f --- /dev/null +++ b/frontend/src/features/home/registry.ts @@ -0,0 +1,20 @@ +/** + * Home Feature Screen Registry + * Define all screens in the home feature module + */ + +import type { KbxScreenDefinition } from '@shared/contracts/kbx-types' + +export const homeScreen: KbxScreenDefinition = { + screenId: 'home.dashboard', + title: '홈', + module: 'Home', + type: 'dashboard', + path: '/home', + component: () => import('./pages/HomePage.vue'), + permissions: [], // Home is accessible to all users + description: '업무를 검색하고, 이어서 처리하고, 즐겨찾기로 자주 쓰는 화면에 바로 접근합니다.', + telemetry: { enabled: true }, +} + +export const homeScreens: KbxScreenDefinition[] = [homeScreen] diff --git a/frontend/src/registry/screens.ts b/frontend/src/registry/screens.ts index c6dd4cc3..84408885 100644 --- a/frontend/src/registry/screens.ts +++ b/frontend/src/registry/screens.ts @@ -4,9 +4,9 @@ */ import type { KbxScreenDefinition } from '@shared/contracts/kbx-types' +import { homeScreens } from '@features/home/registry' // Import screen definitions from each feature module -// (these will be created in Task 4) // import { shadowRunScreens } from '@features/shadow-run/registry' // import { modelScreens } from '@features/models/registry' @@ -61,7 +61,8 @@ export const exampleScreens: KbxScreenDefinition[] = [ export function getAllScreens(): KbxScreenDefinition[] { const screens: KbxScreenDefinition[] = [] - // Add screens from all modules (to be populated as features are created) + // Add screens from all modules + screens.push(...homeScreens) // screens.push(...shadowRunScreens) // screens.push(...modelScreens) diff --git a/frontend/src/shared/contracts/kbx-types.ts b/frontend/src/shared/contracts/kbx-types.ts index b8e0d17a..786b202e 100644 --- a/frontend/src/shared/contracts/kbx-types.ts +++ b/frontend/src/shared/contracts/kbx-types.ts @@ -7,7 +7,7 @@ export interface KbxScreenDefinition { screenId: string // e.g., "model-ops.shadow-run.list" title: string // e.g., "Shadow Run Validation" - module: 'ModelOps' | 'SignalEngine' | 'Admin' + module: 'Home' | 'ModelOps' | 'SignalEngine' | 'Admin' | 'Research' | 'Operations' | 'Portfolio' | 'Design System' | 'Internal' | 'Other' type: 'list' | 'detail' | 'form' | 'dashboard' path: string // Vue Router path component: () => Promise // Lazy-loaded component