c41e5063b7
Removed entire kbx-foundation-v36 directory as it's been replaced by the new KBX Foundation v4 patterns implemented in this session: - Registry-driven screen definitions - Density-aware UI adapter components - Feature module templates (ShadowRun, Models) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
88 lines
2.6 KiB
TypeScript
88 lines
2.6 KiB
TypeScript
/**
|
|
* Central Screen Registry
|
|
* Merge all feature screen definitions here
|
|
*/
|
|
|
|
import type { KbxScreenDefinition } from '@shared/contracts/kbx-types'
|
|
|
|
// 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'
|
|
|
|
// Temporary: define a few example screens
|
|
export const exampleScreens: KbxScreenDefinition[] = [
|
|
{
|
|
screenId: 'model-ops.shadow-run.list',
|
|
title: 'Shadow Run Validation',
|
|
module: 'ModelOps',
|
|
type: 'list',
|
|
path: '/model-ops/shadow-runs',
|
|
component: () => import('@features/shadow-run/pages/ShadowRunList.vue'),
|
|
permissions: ['model.read'],
|
|
description: 'View and manage shadow run validations',
|
|
help: {
|
|
title: 'Shadow Run Validation',
|
|
sections: [
|
|
{
|
|
title: 'What is a Shadow Run?',
|
|
content: 'A shadow run validates model performance on historical data without executing trades.',
|
|
},
|
|
{
|
|
title: 'How to Use',
|
|
content: 'Click the search button to run a new shadow run. View results in the list below.',
|
|
},
|
|
],
|
|
relatedScreens: ['model-ops.models.list'],
|
|
},
|
|
shortcuts: [
|
|
{ key: 'F3', label: 'Search', action: 'search' },
|
|
{ key: 'Ctrl+N', label: 'New', action: 'new' },
|
|
],
|
|
telemetry: { enabled: true },
|
|
},
|
|
{
|
|
screenId: 'model-ops.models.list',
|
|
title: 'Model Management',
|
|
module: 'ModelOps',
|
|
type: 'list',
|
|
path: '/model-ops/models',
|
|
component: () => import('@features/models/pages/ModelsList.vue'),
|
|
permissions: ['model.read'],
|
|
description: 'Manage trading models and their lifecycle',
|
|
shortcuts: [{ key: 'F3', label: 'Search', action: 'search' }],
|
|
telemetry: { enabled: true },
|
|
},
|
|
]
|
|
|
|
/**
|
|
* Merged screen registry (all features)
|
|
*/
|
|
export function getAllScreens(): KbxScreenDefinition[] {
|
|
const screens: KbxScreenDefinition[] = []
|
|
|
|
// Add screens from all modules (to be populated as features are created)
|
|
// screens.push(...shadowRunScreens)
|
|
// screens.push(...modelScreens)
|
|
|
|
// Add example screens for now
|
|
screens.push(...exampleScreens)
|
|
|
|
return screens
|
|
}
|
|
|
|
/**
|
|
* Screen index by ID for fast lookup
|
|
*/
|
|
export function buildScreenIndex(): Map<string, KbxScreenDefinition> {
|
|
const index = new Map<string, KbxScreenDefinition>()
|
|
getAllScreens().forEach(screen => {
|
|
index.set(screen.screenId, screen)
|
|
})
|
|
return index
|
|
}
|
|
|
|
// Export registry
|
|
export const screens = getAllScreens()
|
|
export const screenIndex = buildScreenIndex()
|