// CIL[BEGIN chunk_id="workbench_index_module_header_1784572423" type="module_header" identity="module_header" parent="none"] // CIL[DOC-MACRO purpose="Import React, router, shared UI, and Workbench components for the workbench app"] // CIL[DOC-RESPONSIBILITY responsibility="Provide all external dependencies for the Workbench app entry"] // CIL[DOC-CONTEXT module="workbench" layer="frontend-entry" related_files="[\"custom/apps/workbench/components/WorkbenchSidebar.tsx\",\"custom/apps/workbench/components/WorkbenchPlaceholderPage.tsx\",\"custom/apps/workbench/hooks/useActiveSev1.ts\"]"] // CIL[DOC-CONTRACT inputs="none" outputs="Imported modules and lazy page components" errors="none" side_effects="none"] // CIL[DOC-MICRO logic_summary="Imports React lazy/Suspense, router hooks, layout and UI primitives, plus Workbench-specific components and hooks" notable_decisions=[]] // CIL[DOC-CONFIDENCE pass="first" score="0.95" flags="none"] // CIL[DOC-STABILITY stability="stable"] // CIL[DOC-AUDIENCE audience="developer"] import { lazy, Suspense } from 'react' import { Routes, Route, Navigate, useLocation, useParams } from 'react-router-dom' import { LoadingSpinner } from '@core/components/ui/LoadingSpinner' import { AppShell } from '@core/components/layout/AppShell' import { WorkbenchSidebar } from './components/WorkbenchSidebar' import WorkbenchPlaceholderPage from './components/WorkbenchPlaceholderPage' import Sev1Banner from './components/Sev1Banner' import { useActiveSev1 } from './hooks/useActiveSev1' import { TooltipProvider } from '@core/components/ui/tooltip' import { useAppPath } from '@core/hooks/useAppPath' import { getWorkbenchRole } from './hooks/useWorkbenchRole' // CIL[END chunk_id="workbench_index_module_header_1784572423"] // CIL[BEGIN chunk_id="workbench_index_pages_1784572423" type="variable" identity="pages" parent="none"] // CIL[DOC-MACRO purpose="Declare lazy-loaded page components for Workbench routes"] // CIL[DOC-RESPONSIBILITY responsibility="Centralise lazy imports so route wiring can reference all page components"] // CIL[DOC-CONTEXT module="workbench" layer="frontend-entry" related_files="[\"custom/apps/workbench/pages/*\"]"] // CIL[DOC-CONTRACT inputs="none" outputs="Lazy component variables" errors="import failures" side_effects="none"] // CIL[DOC-MICRO logic_summary="One const per page using React.lazy so each route chunk loads on demand" notable_decisions=[]] // CIL[DOC-CONFIDENCE pass="first" score="0.95" flags="none"] // CIL[DOC-STABILITY stability="stable"] // CIL[DOC-AUDIENCE audience="developer"] const WorkbenchDashboard = lazy(() => import('./pages/WorkbenchDashboard')) const IdeasListPage = lazy(() => import('./pages/intake/IdeasListPage')) const IdeaDetailPage = lazy(() => import('./pages/intake/IdeaDetailPage')) const DiscoveryBoardPage = lazy(() => import('./pages/intake/DiscoveryBoardPage')) const DiscoveryDetailPage = lazy(() => import('./pages/intake/DiscoveryDetailPage')) const InitiativesBoardPage = lazy(() => import('./pages/planning/InitiativesBoardPage')) const InitiativeDetailPage = lazy(() => import('./pages/planning/InitiativeDetailPage')) const EpicsBoardPage = lazy(() => import('./pages/planning/EpicsBoardPage')) const EpicDetailPage = lazy(() => import('./pages/planning/EpicDetailPage')) const EngineeringDashboard = lazy(() => import('./pages/engineering/EngineeringDashboard')) const DevopsDashboard = lazy(() => import('./pages/devops/DevopsDashboard')) const WorkBoardPage = lazy(() => import('./pages/work/WorkBoardPage')) const WorkItemDetailPage = lazy(() => import('./pages/work/WorkItemDetailPage')) const WorkBacklogPage = lazy(() => import('./pages/work/WorkBacklogPage')) const ParkingLotPage = lazy(() => import('./pages/work/ParkingLotPage')) const PrioritizationPage = lazy(() => import('./pages/work/PrioritizationPage')) const SprintsPage = lazy(() => import('./pages/work/SprintsPage')) const SprintDetailPage = lazy(() => import('./pages/work/SprintDetailPage')) const TestPlansPage = lazy(() => import('./pages/work/TestPlansPage')) const TestPlanDetailPage = lazy(() => import('./pages/work/TestPlanDetailPage')) const DocsTicketsPage = lazy(() => import('./pages/work/DocsTicketsPage')) const DocsTicketDetailPage = lazy(() => import('./pages/work/DocsTicketDetailPage')) const DocsBoardPage = lazy(() => import('./pages/work/DocsBoardPage')) const RunbookDetailPage = lazy(() => import('./pages/work/RunbookDetailPage')) const PipelineRunsPage = lazy(() => import('./pages/delivery/PipelineRunsPage')) const DeploymentsPage = lazy(() => import('./pages/delivery/DeploymentsPage')) const EnvironmentsPage = lazy(() => import('./pages/delivery/EnvironmentsPage')) const ReleasesPage = lazy(() => import('./pages/delivery/ReleasesPage')) const UnitTestsPage = lazy(() => import('./pages/quality/UnitTestsPage')) const IntegrationTestsPage = lazy(() => import('./pages/quality/IntegrationTestsPage')) const E2ETestsPage = lazy(() => import('./pages/quality/E2ETestsPage')) const TestRunsPage = lazy(() => import('./pages/quality/TestRunsPage')) const SignalsPage = lazy(() => import('./pages/observe/SignalsPage')) const LogsPage = lazy(() => import('./pages/observe/LogsPage')) const UptimePage = lazy(() => import('./pages/observe/UptimePage')) const PerformancePage = lazy(() => import('./pages/observe/PerformancePage')) const ServicesPage = lazy(() => import('./pages/observe/ServicesPage')) const IncidentDashboard = lazy(() => import('./pages/incident/IncidentDashboard')) const CILProjectsPage = lazy(() => import('./pages/cil/CILProjectsPage')) const CILProjectDetailPage = lazy(() => import('./pages/cil/CILProjectDetailPage')) const KBPage = lazy(() => import('./pages/kb/KBPage')) const KBArticleEditorPage = lazy(() => import('./pages/kb/KBArticleEditorPage')) const TeamPage = lazy(() => import('./pages/team/TeamPage').then(m => ({ default: m.TeamPage }))) // CIL[END chunk_id="workbench_index_pages_1784572423"] // CIL[BEGIN chunk_id="workbench_index_layout_1784572423" type="function" identity="WorkbenchLayout" parent="none"] // CIL[DOC-MACRO purpose="Render the Workbench app shell with routing, breadcrumbs, and SEV1 banner"] // CIL[DOC-RESPONSIBILITY responsibility="Provide the Workbench layout including sidebar, breadcrumbs, route switch, and active SEV1 banner"] // CIL[DOC-CONTEXT module="workbench" layer="frontend-component" related_files="[\"custom/apps/workbench/components/WorkbenchSidebar.tsx\",\"custom/apps/workbench/components/Sev1Banner.tsx\",\"custom/apps/workbench/hooks/useActiveSev1.ts\"]"] // CIL[DOC-CONTRACT inputs="none" outputs="JSX app shell with routes" errors="none" side_effects="renders DOM, reads current route and auth roles"] // CIL[DOC-MICRO logic_summary="Builds breadcrumbs from URL segments, renders AppShell with sidebar and optional SEV1 banner, and declares Routes for all Workbench sections" notable_decisions=[]] // CIL[DOC-CONFIDENCE pass="first" score="0.90" flags="none"] // CIL[DOC-STABILITY stability="stable"] // CIL[DOC-AUDIENCE audience="developer"] function WorkItemRedirect() { const { id } = useParams() return } function EngineeringRedirect() { const { '*': rest } = useParams() const appPath = useAppPath() return } function RoleRedirect() { const { role } = useParams() return } const SECTION_TITLES: Record = { dashboard: 'Command Center', intake: 'Intake', planning: 'Planning', work: 'Work', incident: 'Incident', engineering: 'Engineering', devops: 'DEVOPS', qa: 'QA', delivery: 'Delivery', logging: 'Logging', knowledge: 'Knowledge Base', } const SUBSECTION_TITLES: Record> = { intake: { ideas: 'Ideas', 'discovery-board': 'Discovery Board', discoveries: 'Discovery', }, planning: { 'initiatives-board': 'Initiatives', 'epics-board': 'Epics', initiatives: 'Initiative', epics: 'Epic', }, work: { dashboard: 'Dashboard', board: 'Kanban Board', prioritization: 'Prioritization', sprints: 'Sprints', backlog: 'Backlog', 'parking-lot': 'Parking Lot', 'docs-board': 'Docs Board', 'docs-tickets': 'Docs Tickets', 'test-plans': 'Test Plan Board', items: 'Item', }, engineering: { board: 'Kanban Board', items: 'Item', planning: 'Planning', epics: 'Epics', sprints: 'Sprints', backlog: 'Backlog', 'parking-lot': 'Parking Lot', docs: 'Docs Board', 'test-plans': 'Test Plan Board', }, devops: { dashboard: 'Main Dashboard', kanban: 'Kanban Board', }, qa: { dashboard: 'Dashboard', kanban: 'Kanban Board', 'ai-training': 'AI Training', unit: 'Unit Tests', integration: 'Integration Tests', e2e: 'E2E Tests', runs: 'Test Runs', }, delivery: { pipelines: 'Pipeline Runs', deployments: 'Deployments', environments: 'Environments', releases: 'Releases', }, logging: { logs: 'Log List', signals: 'Signals', uptime: 'Uptime', performance: 'Performance', services: 'Services', }, incident: { dashboard: 'Incident Dashboard', board: 'Incident Board', }, knowledge: { dashboard: 'Knowledge Base Dashboard', kb: 'KB Kanban', ai: 'KB AI', articles: 'KB Articles', runbooks: 'Run Books', postmortems: 'Postmortems', cil: 'Code Intelligence', }, } function subsectionTitle(section: string, sub: string): string { return SUBSECTION_TITLES[section]?.[sub] || sub.charAt(0).toUpperCase() + sub.slice(1) } function WorkbenchLayout() { const location = useLocation() const appPath = useAppPath() const hasActiveSev1 = useActiveSev1() const segments = location.pathname.split('/').filter(Boolean) const breadcrumbs: { title: string; url?: string }[] = [] const section = segments[1] const sub = segments[2] if (section === 'dashboard' || !section) { breadcrumbs.push({ title: 'Command Center' }) } else { breadcrumbs.push({ title: 'Workbench', url: appPath('/dashboard') }) breadcrumbs.push({ title: SECTION_TITLES[section] || section.charAt(0).toUpperCase() + section.slice(1) }) if (sub) { const leaf = segments[3] && sub !== 'items' ? segments[3] : sub breadcrumbs.push({ title: sub === 'items' && segments[3] ? segments[3] === 'new' ? 'New' : segments[3] : subsectionTitle(section, leaf), }) } } const Fallback =
return ( } breadcrumbs={breadcrumbs} banner={hasActiveSev1 ? : undefined} >
} /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } />
) } // CIL[END chunk_id="workbench_index_layout_1784572423"] // CIL[BEGIN chunk_id="workbench_index_app_1784572423" type="function" identity="WorkbenchApp" parent="none"] // CIL[DOC-MACRO purpose="Export the default Workbench app wrapped in the Tooltip provider"] // CIL[DOC-RESPONSIBILITY responsibility="Serve as the default exported component loaded by the Spine app registry"] // CIL[DOC-CONTEXT module="workbench" layer="frontend-entry" related_files="[\"custom/apps/workbench/index.tsx\"]"] // CIL[DOC-CONTRACT inputs="none" outputs="JSX WorkbenchLayout wrapped in TooltipProvider" errors="none" side_effects="renders DOM"] // CIL[DOC-MICRO logic_summary="Wraps WorkbenchLayout in TooltipProvider so tooltips work across the app" notable_decisions=[]] // CIL[DOC-CONFIDENCE pass="first" score="0.95" flags="none"] // CIL[DOC-STABILITY stability="stable"] // CIL[DOC-AUDIENCE audience="developer"] export default function WorkbenchApp() { return ( ) } // CIL[END chunk_id="workbench_index_app_1784572423"]