Initial commit: Clean DSS implementation
Migrated from design-system-swarm with fresh git history.
Old project history preserved in /home/overbits/apps/design-system-swarm
Core components:
- MCP Server (Python FastAPI with mcp 1.23.1)
- Claude Plugin (agents, commands, skills, strategies, hooks, core)
- DSS Backend (dss-mvp1 - token translation, Figma sync)
- Admin UI (Node.js/React)
- Server (Node.js/Express)
- Storybook integration (dss-mvp1/.storybook)
Self-contained configuration:
- All paths relative or use DSS_BASE_PATH=/home/overbits/dss
- PYTHONPATH configured for dss-mvp1 and dss-claude-plugin
- .env file with all configuration
- Claude plugin uses ${CLAUDE_PLUGIN_ROOT} for portability
Migration completed: $(date)
🤖 Clean migration with full functionality preserved
This commit is contained in:
169
admin-ui/js/config/panel-config.js
Normal file
169
admin-ui/js/config/panel-config.js
Normal file
@@ -0,0 +1,169 @@
|
||||
/**
|
||||
* panel-config.js
|
||||
* Central registry for team-specific panel configurations
|
||||
*/
|
||||
|
||||
export const PANEL_CONFIGS = {
|
||||
ui: [
|
||||
{
|
||||
id: 'metrics',
|
||||
label: 'Metrics',
|
||||
component: 'ds-metrics-panel',
|
||||
props: { mode: 'ui-performance' }
|
||||
},
|
||||
{
|
||||
id: 'tokens',
|
||||
label: 'Token Inspector',
|
||||
component: 'ds-token-inspector',
|
||||
props: {}
|
||||
},
|
||||
{
|
||||
id: 'figma',
|
||||
label: 'Figma Sync',
|
||||
component: 'ds-figma-status',
|
||||
props: {}
|
||||
},
|
||||
{
|
||||
id: 'activity',
|
||||
label: 'Activity',
|
||||
component: 'ds-activity-log',
|
||||
props: {}
|
||||
},
|
||||
{
|
||||
id: 'chat',
|
||||
label: 'AI Assistant',
|
||||
component: 'ds-chat-panel',
|
||||
props: {}
|
||||
}
|
||||
],
|
||||
|
||||
ux: [
|
||||
{
|
||||
id: 'metrics',
|
||||
label: 'Metrics',
|
||||
component: 'ds-metrics-panel',
|
||||
props: { mode: 'ux-accessibility' }
|
||||
},
|
||||
{
|
||||
id: 'diff',
|
||||
label: 'Visual Diff',
|
||||
component: 'ds-visual-diff',
|
||||
props: {}
|
||||
},
|
||||
{
|
||||
id: 'accessibility',
|
||||
label: 'Accessibility',
|
||||
component: 'ds-accessibility-report',
|
||||
props: {}
|
||||
},
|
||||
{
|
||||
id: 'screenshots',
|
||||
label: 'Screenshots',
|
||||
component: 'ds-screenshot-gallery',
|
||||
props: {}
|
||||
},
|
||||
{
|
||||
id: 'chat',
|
||||
label: 'AI Assistant',
|
||||
component: 'ds-chat-panel',
|
||||
props: {}
|
||||
}
|
||||
],
|
||||
|
||||
qa: [
|
||||
{
|
||||
id: 'metrics',
|
||||
label: 'Metrics',
|
||||
component: 'ds-metrics-panel',
|
||||
props: { mode: 'qa-coverage' }
|
||||
},
|
||||
{
|
||||
id: 'console',
|
||||
label: 'Console',
|
||||
component: 'ds-console-viewer',
|
||||
props: {}
|
||||
},
|
||||
{
|
||||
id: 'network',
|
||||
label: 'Network',
|
||||
component: 'ds-network-monitor',
|
||||
props: {}
|
||||
},
|
||||
{
|
||||
id: 'tests',
|
||||
label: 'Test Results',
|
||||
component: 'ds-test-results',
|
||||
props: {}
|
||||
},
|
||||
{
|
||||
id: 'chat',
|
||||
label: 'AI Assistant',
|
||||
component: 'ds-chat-panel',
|
||||
props: {}
|
||||
}
|
||||
],
|
||||
|
||||
// Admin uses full-page layout, minimal bottom panel
|
||||
admin: [
|
||||
{
|
||||
id: 'system',
|
||||
label: 'System Log',
|
||||
component: 'ds-system-log',
|
||||
props: {}
|
||||
},
|
||||
{
|
||||
id: 'chat',
|
||||
label: 'AI Assistant',
|
||||
component: 'ds-chat-panel',
|
||||
props: {}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
/**
|
||||
* Advanced mode adds Console and Network tabs to any workflow
|
||||
*/
|
||||
export const ADVANCED_MODE_TABS = [
|
||||
{
|
||||
id: 'console',
|
||||
label: 'Console',
|
||||
component: 'ds-console-viewer',
|
||||
props: {},
|
||||
advanced: true
|
||||
},
|
||||
{
|
||||
id: 'network',
|
||||
label: 'Network',
|
||||
component: 'ds-network-monitor',
|
||||
props: {},
|
||||
advanced: true
|
||||
}
|
||||
];
|
||||
|
||||
/**
|
||||
* Get panel configuration for a team
|
||||
* @param {string} teamId - Team identifier (ui, ux, qa, admin)
|
||||
* @param {boolean} advancedMode - Whether advanced mode is enabled
|
||||
* @returns {Array} Panel configuration
|
||||
*/
|
||||
export function getPanelConfig(teamId, advancedMode = false) {
|
||||
const baseConfig = PANEL_CONFIGS[teamId] || PANEL_CONFIGS.ui;
|
||||
|
||||
if (!advancedMode) {
|
||||
return baseConfig;
|
||||
}
|
||||
|
||||
// In advanced mode, add Console/Network if not already present
|
||||
const hasConsole = baseConfig.some(tab => tab.id === 'console');
|
||||
const hasNetwork = baseConfig.some(tab => tab.id === 'network');
|
||||
|
||||
const advancedTabs = [];
|
||||
if (!hasConsole) {
|
||||
advancedTabs.push(ADVANCED_MODE_TABS[0]);
|
||||
}
|
||||
if (!hasNetwork) {
|
||||
advancedTabs.push(ADVANCED_MODE_TABS[1]);
|
||||
}
|
||||
|
||||
return [...baseConfig, ...advancedTabs];
|
||||
}
|
||||
Reference in New Issue
Block a user