feat: enhance project context loading and feature flag support in dashboard components

This commit is contained in:
catlog22
2026-02-25 18:59:49 +08:00
parent db5797faa3
commit eb9a62e085
16 changed files with 336 additions and 109 deletions

View File

@@ -25,6 +25,7 @@ import { ExecutionMonitorPanel } from '@/components/terminal-dashboard/Execution
import { FileSidebarPanel } from '@/components/terminal-dashboard/FileSidebarPanel';
import { useWorkflowStore, selectProjectPath } from '@/stores/workflowStore';
import { useAppStore, selectIsImmersiveMode } from '@/stores/appStore';
import { useConfigStore } from '@/stores/configStore';
// ========== Main Page Component ==========
@@ -36,6 +37,9 @@ export function TerminalDashboardPage() {
const projectPath = useWorkflowStore(selectProjectPath);
// Feature flags for panel visibility
const featureFlags = useConfigStore((s) => s.featureFlags);
// Use global immersive mode state (only affects AppShell chrome)
const isImmersiveMode = useAppStore(selectIsImmersiveMode);
const toggleImmersiveMode = useAppStore((s) => s.toggleImmersiveMode);
@@ -106,35 +110,41 @@ export function TerminalDashboardPage() {
<IssuePanel />
</FloatingPanel>
<FloatingPanel
isOpen={activePanel === 'queue'}
onClose={closePanel}
title={formatMessage({ id: 'terminalDashboard.toolbar.queue' })}
side="right"
width={400}
>
<QueuePanel />
</FloatingPanel>
{featureFlags.dashboardQueuePanelEnabled && (
<FloatingPanel
isOpen={activePanel === 'queue'}
onClose={closePanel}
title={formatMessage({ id: 'terminalDashboard.toolbar.queue' })}
side="right"
width={400}
>
<QueuePanel />
</FloatingPanel>
)}
<FloatingPanel
isOpen={activePanel === 'inspector'}
onClose={closePanel}
title={formatMessage({ id: 'terminalDashboard.toolbar.inspector' })}
side="right"
width={360}
>
<InspectorContent />
</FloatingPanel>
{featureFlags.dashboardInspectorEnabled && (
<FloatingPanel
isOpen={activePanel === 'inspector'}
onClose={closePanel}
title={formatMessage({ id: 'terminalDashboard.toolbar.inspector' })}
side="right"
width={360}
>
<InspectorContent />
</FloatingPanel>
)}
<FloatingPanel
isOpen={activePanel === 'execution'}
onClose={closePanel}
title={formatMessage({ id: 'terminalDashboard.toolbar.executionMonitor', defaultMessage: 'Execution Monitor' })}
side="right"
width={380}
>
<ExecutionMonitorPanel />
</FloatingPanel>
{featureFlags.dashboardExecutionMonitorEnabled && (
<FloatingPanel
isOpen={activePanel === 'execution'}
onClose={closePanel}
title={formatMessage({ id: 'terminalDashboard.toolbar.executionMonitor', defaultMessage: 'Execution Monitor' })}
side="right"
width={380}
>
<ExecutionMonitorPanel />
</FloatingPanel>
)}
</AssociationHighlightProvider>
</div>
);