Skip to content

Commit 5f504a1

Browse files
committed
Phase 22 Part 6: Build Error Fixes - TypeScript & Component Updates
Fixed critical TypeScript compilation errors: **Type System Fixes:** - Added vite-env.d.ts for CSS module declarations - Fixed WebSocketMessage interface (added success/error fields) - Updated PageHeaderProps to support title/subtitle/icon/extra props - Updated StatisticCardProps to support both single and multiple modes - Fixed notification options type (NotifyOptions) - Removed invalid theme token properties (lineHeightHeading, headerPadding, fontWeight) **API & Service Fixes:** - Fixed App.tsx: Added useTheme hook to get isDark - Fixed taskService.getTask → getById - Fixed pipelineService.getTemplates → getAll - Fixed sampleService.getSamples → getAll - Fixed ParameterRecommendation → ParameterRecommendationResponse - Fixed PipelineTask → Task type **Component Fixes:** - ErrorBoundary: Fixed React import (type vs value) - MainLayout: Restored missing antd imports (Layout, Menu, Typography, etc.) - taskStore: Renamed message param to msg to avoid conflict with antd message API - Tag component: Removed invalid 'size' prop, replaced with style - Dashboard: Escaped apostrophe in JSX text - KnowledgeBase: Added missing Progress import **Import Cleanup:** - Removed unused imports: Title, Tooltip, Badge, BellOutlined, etc. - Fixed commented-out unused variables **Build Progress:** - Reduced TypeScript errors from 600+ to 107 - Fixed all ESLint blocking errors - Installed dependencies - Fixed module resolution issues Remaining: 107 TypeScript errors (mostly missing admin/AI type definitions)
1 parent 9e37447 commit 5f504a1

25 files changed

+3614
-752
lines changed

PHASE_22_COMPLETION_REPORT.md

Lines changed: 563 additions & 0 deletions
Large diffs are not rendered by default.

frontend/package-lock.json

Lines changed: 2479 additions & 115 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/App.tsx

Lines changed: 136 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const ProtectedRoute = ({ children }: { children: React.ReactNode }) => {
3838

3939
function App() {
4040
const { checkAuth } = authStore()
41-
const { mode, isDark } = useTheme()
41+
const { isDark } = useTheme()
4242

4343
useEffect(() => {
4444
checkAuth()
@@ -58,145 +58,145 @@ function App() {
5858
<ErrorBoundary onReset={() => window.location.reload()}>
5959
<ProgressBar />
6060
<Routes>
61-
{/* Public Routes */}
62-
<Route element={<AuthLayout />}>
63-
<Route path="/login" element={<Login />} />
64-
<Route path="/register" element={<Register />} />
65-
</Route>
61+
{/* Public Routes */}
62+
<Route element={<AuthLayout />}>
63+
<Route path="/login" element={<Login />} />
64+
<Route path="/register" element={<Register />} />
65+
</Route>
6666

67-
{/* Protected Routes */}
68-
<Route
69-
element={
70-
<ProtectedRoute>
71-
<MainLayout />
72-
</ProtectedRoute>
73-
}
74-
>
75-
<Route path="/" element={<Navigate to="/dashboard" replace />} />
67+
{/* Protected Routes */}
7668
<Route
77-
path="/dashboard"
7869
element={
79-
<ErrorBoundary>
80-
<Dashboard />
81-
</ErrorBoundary>
70+
<ProtectedRoute>
71+
<MainLayout />
72+
</ProtectedRoute>
8273
}
83-
/>
84-
<Route
85-
path="/items"
86-
element={
87-
<ErrorBoundary>
88-
<ProjectList />
89-
</ErrorBoundary>
90-
}
91-
/>
92-
<Route
93-
path="/samples"
94-
element={
95-
<ErrorBoundary>
96-
<SampleList />
97-
</ErrorBoundary>
98-
}
99-
/>
100-
<Route
101-
path="/files"
102-
element={
103-
<ErrorBoundary>
104-
<FileList />
105-
</ErrorBoundary>
106-
}
107-
/>
108-
<Route
109-
path="/pipelines"
110-
element={
111-
<ErrorBoundary>
112-
<PipelineList />
113-
</ErrorBoundary>
114-
}
115-
/>
116-
<Route
117-
path="/tasks"
118-
element={
119-
<ErrorBoundary>
120-
<TaskList />
121-
</ErrorBoundary>
122-
}
123-
/>
124-
<Route
125-
path="/results"
126-
element={
127-
<ErrorBoundary>
128-
<ResultList />
129-
</ErrorBoundary>
130-
}
131-
/>
132-
<Route
133-
path="/results/:id"
134-
element={
135-
<ErrorBoundary>
136-
<ResultDetail />
137-
</ErrorBoundary>
138-
}
139-
/>
140-
<Route
141-
path="/admin"
142-
element={
143-
<ErrorBoundary>
144-
<AdminDashboard />
145-
</ErrorBoundary>
146-
}
147-
/>
148-
<Route
149-
path="/profile"
150-
element={
151-
<ErrorBoundary>
152-
<ProfilePage />
153-
</ErrorBoundary>
154-
}
155-
/>
156-
<Route
157-
path="/settings"
158-
element={
159-
<ErrorBoundary>
160-
<SettingsPage />
161-
</ErrorBoundary>
162-
}
163-
/>
164-
<Route
165-
path="/notifications"
166-
element={
167-
<ErrorBoundary>
168-
<NotificationsPage />
169-
</ErrorBoundary>
170-
}
171-
/>
172-
<Route
173-
path="/ai"
174-
element={
175-
<ErrorBoundary>
176-
<AIDashboard />
177-
</ErrorBoundary>
178-
}
179-
/>
180-
<Route
181-
path="/analytics"
182-
element={
183-
<ErrorBoundary>
184-
<AnalyticsDashboard />
185-
</ErrorBoundary>
186-
}
187-
/>
188-
<Route
189-
path="/knowledge"
190-
element={
191-
<ErrorBoundary>
192-
<KnowledgeBase />
193-
</ErrorBoundary>
194-
}
195-
/>
196-
</Route>
197-
</Routes>
198-
</ErrorBoundary>
199-
</ConfigProvider>
74+
>
75+
<Route path="/" element={<Navigate to="/dashboard" replace />} />
76+
<Route
77+
path="/dashboard"
78+
element={
79+
<ErrorBoundary>
80+
<Dashboard />
81+
</ErrorBoundary>
82+
}
83+
/>
84+
<Route
85+
path="/items"
86+
element={
87+
<ErrorBoundary>
88+
<ProjectList />
89+
</ErrorBoundary>
90+
}
91+
/>
92+
<Route
93+
path="/samples"
94+
element={
95+
<ErrorBoundary>
96+
<SampleList />
97+
</ErrorBoundary>
98+
}
99+
/>
100+
<Route
101+
path="/files"
102+
element={
103+
<ErrorBoundary>
104+
<FileList />
105+
</ErrorBoundary>
106+
}
107+
/>
108+
<Route
109+
path="/pipelines"
110+
element={
111+
<ErrorBoundary>
112+
<PipelineList />
113+
</ErrorBoundary>
114+
}
115+
/>
116+
<Route
117+
path="/tasks"
118+
element={
119+
<ErrorBoundary>
120+
<TaskList />
121+
</ErrorBoundary>
122+
}
123+
/>
124+
<Route
125+
path="/results"
126+
element={
127+
<ErrorBoundary>
128+
<ResultList />
129+
</ErrorBoundary>
130+
}
131+
/>
132+
<Route
133+
path="/results/:id"
134+
element={
135+
<ErrorBoundary>
136+
<ResultDetail />
137+
</ErrorBoundary>
138+
}
139+
/>
140+
<Route
141+
path="/admin"
142+
element={
143+
<ErrorBoundary>
144+
<AdminDashboard />
145+
</ErrorBoundary>
146+
}
147+
/>
148+
<Route
149+
path="/profile"
150+
element={
151+
<ErrorBoundary>
152+
<ProfilePage />
153+
</ErrorBoundary>
154+
}
155+
/>
156+
<Route
157+
path="/settings"
158+
element={
159+
<ErrorBoundary>
160+
<SettingsPage />
161+
</ErrorBoundary>
162+
}
163+
/>
164+
<Route
165+
path="/notifications"
166+
element={
167+
<ErrorBoundary>
168+
<NotificationsPage />
169+
</ErrorBoundary>
170+
}
171+
/>
172+
<Route
173+
path="/ai"
174+
element={
175+
<ErrorBoundary>
176+
<AIDashboard />
177+
</ErrorBoundary>
178+
}
179+
/>
180+
<Route
181+
path="/analytics"
182+
element={
183+
<ErrorBoundary>
184+
<AnalyticsDashboard />
185+
</ErrorBoundary>
186+
}
187+
/>
188+
<Route
189+
path="/knowledge"
190+
element={
191+
<ErrorBoundary>
192+
<KnowledgeBase />
193+
</ErrorBoundary>
194+
}
195+
/>
196+
</Route>
197+
</Routes>
198+
</ErrorBoundary>
199+
</ConfigProvider>
200200
)
201201
}
202202

0 commit comments

Comments
 (0)