Backend fixes: - Fix markdown generation using correct 'markdown_content' key in tasks.py - Update admin service to return flat data structure matching frontend types - Add task_count and failed_tasks fields to user statistics - Fix top users endpoint to return complete user data Frontend fixes: - Migrate ResultsPage from V1 batch API to V2 task API with polling - Create TaskDetailPage component with markdown preview and download buttons - Refactor ExportPage to support multi-task selection using V2 download endpoints - Fix login infinite refresh loop with concurrency control flags - Create missing Checkbox UI component New features: - Add /tasks/:taskId route for task detail view - Implement multi-task batch export functionality - Add real-time task status polling (2s interval) OpenSpec: - Archive completed proposal 2025-11-17-fix-v2-api-ui-issues - Create result-export and task-management specifications 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
65 lines
2.0 KiB
TypeScript
65 lines
2.0 KiB
TypeScript
import { Routes, Route, Navigate } from 'react-router-dom'
|
|
import LoginPage from '@/pages/LoginPage'
|
|
import UploadPage from '@/pages/UploadPage'
|
|
import ProcessingPage from '@/pages/ProcessingPage'
|
|
import ResultsPage from '@/pages/ResultsPage'
|
|
import ExportPage from '@/pages/ExportPage'
|
|
import SettingsPage from '@/pages/SettingsPage'
|
|
import TaskHistoryPage from '@/pages/TaskHistoryPage'
|
|
import TaskDetailPage from '@/pages/TaskDetailPage'
|
|
import AdminDashboardPage from '@/pages/AdminDashboardPage'
|
|
import AuditLogsPage from '@/pages/AuditLogsPage'
|
|
import Layout from '@/components/Layout'
|
|
import ProtectedRoute from '@/components/ProtectedRoute'
|
|
|
|
function App() {
|
|
return (
|
|
<Routes>
|
|
{/* Public routes */}
|
|
<Route path="/login" element={<LoginPage />} />
|
|
|
|
{/* Protected routes with layout */}
|
|
<Route
|
|
path="/"
|
|
element={
|
|
<ProtectedRoute>
|
|
<Layout />
|
|
</ProtectedRoute>
|
|
}
|
|
>
|
|
<Route index element={<Navigate to="/upload" replace />} />
|
|
<Route path="upload" element={<UploadPage />} />
|
|
<Route path="processing" element={<ProcessingPage />} />
|
|
<Route path="results" element={<ResultsPage />} />
|
|
<Route path="export" element={<ExportPage />} />
|
|
<Route path="tasks" element={<TaskHistoryPage />} />
|
|
<Route path="tasks/:taskId" element={<TaskDetailPage />} />
|
|
<Route path="settings" element={<SettingsPage />} />
|
|
|
|
{/* Admin routes - require admin privileges */}
|
|
<Route
|
|
path="admin"
|
|
element={
|
|
<ProtectedRoute requireAdmin>
|
|
<AdminDashboardPage />
|
|
</ProtectedRoute>
|
|
}
|
|
/>
|
|
<Route
|
|
path="admin/audit-logs"
|
|
element={
|
|
<ProtectedRoute requireAdmin>
|
|
<AuditLogsPage />
|
|
</ProtectedRoute>
|
|
}
|
|
/>
|
|
</Route>
|
|
|
|
{/* Catch all */}
|
|
<Route path="*" element={<Navigate to="/" replace />} />
|
|
</Routes>
|
|
)
|
|
}
|
|
|
|
export default App
|