// CIL[BEGIN chunk_id="TestPlansPage_testplanspage_1785096505" type="function" identity="TestPlansPage" parent="none"] // CIL[DOC-MACRO purpose="Render a kanban-style test-plan list for the workbench"] // CIL[DOC-RESPONSIBILITY responsibility="Filter and display workbench_work_item records with work_type=test_plan for the current team"] // CIL[DOC-CONTEXT module="workbench.pages.work" layer="frontend-page" related_files="[\"custom/apps/workbench/components/records/RecordListPage.tsx\",\"custom/apps/workbench/hooks/useWorkbenchRole.ts\"]"] // CIL[DOC-CONTRACT inputs="none" outputs="JSX page" errors="none" side_effects="renders RecordListPage which calls /api/admin-data"] // CIL[DOC-MICRO logic_summary="Wraps RecordListPage with test-plan-specific labels, filter, and columns" notable_decisions="[]"] // CIL[DOC-CONFIDENCE pass="first" score="0.90" flags="none"] // CIL[DOC-STABILITY stability="stable"] // CIL[DOC-AUDIENCE audience="developer"] import { useAppPath } from '@core/hooks/useAppPath' import { RecordListPage } from '../../components/records/RecordListPage' import { Badge } from '@core/components/ui/badge' import { useWorkbenchRole } from '../../hooks/useWorkbenchRole' const PLAN_LABELS: Record = { unit: 'Unit', integration: 'Integration', e2e: 'E2E', regression: 'Regression', manual: 'Manual' } const STATUS_LABELS: Record = { triage: 'Triage', backlog: 'Backlog', assigned: 'Assigned', in_progress: 'In Progress', in_review: 'In Review', resolved: 'Resolved', closed: 'Closed', parking: 'Parking' } export default function TestPlansPage() { const appPath = useAppPath() const { role } = useWorkbenchRole() return ( appPath(`/work/${role}/test-plans/${record.id}`)} createRoute={appPath(`/work/${role}/test-plans/new`)} emptyMessage="No test plans found." extraParams={{ work_type: 'test_plan' }} filterFn={record => record.data?.work_type === 'test_plan' && (record.data?.team === role || record.data?.team === '*' || record.data?.team === 'unassigned') } columns={[ { key: 'title', label: 'Title' }, { key: 'plan_type', label: 'Type', render: r => {PLAN_LABELS[r.data?.plan_type] || r.data?.plan_type || '—'} }, { key: 'status', label: 'Status', render: r => {STATUS_LABELS[r.status] || r.status || '—'} }, { key: 'updated_at', label: 'Updated' }, ]} /> ) } // CIL[END chunk_id="TestPlansPage_testplanspage_1785096505"]