6 Commits

Author SHA1 Message Date
91698a2f3b refactor: TypeScript 类型体系重构 + 状态管理 + 环境配置
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 13s
## 类型安全
- tsconfig: 开启 strict: true(豁免 noImplicitAny + strictNullChecks,待后续收紧)
- 新建 15 个领域类型文件 (src/types/),共 ~80 个类型定义
- 统一 barrel export (src/types/index.ts)
- 消除 9 个 [key: string]: any 接口
- 消除 22 个 API data: any 参数 → 替换为具体 DTO
- 消除 36 个 Promise<any> → 使用具体泛型
- 消除重复 PaginatedResponse,统一使用 PaginatedResult
- API 内联类型全部迁至 types/

## 状态管理
- 引入 Zustand (zustand + persist)
- 新建 src/stores/ui-store.ts — 侧边栏折叠状态持久化
- AdminLayout 接入 useUIStore

## 环境配置
- 新建 .env.example — 环境变量模板
- 新建 .env.production — 生产架构文档
- 新建 src/vite-env.d.ts — IDE 类型声明

## 通用 UI 类型
- 新建 src/types/ui.ts — TypedColumn<T>, SortState, FilterState 等

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-04 11:02:52 +08:00
f291f39049 fix: 修复 CI 构建 49 个 TypeScript 错误
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 10s
- routes/index.tsx: DataPages → 独立文件 import
- 导出 CostItem、CostSummary、Conversation、HealthService 类型
- ServerInfo、ProcessInfo、ServerHealth 类型补全嵌套字段
- 修复 useRef 缺初始值、string|null、unused imports 等

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-01 22:50:22 +08:00
8663ceba66 feat: HTTP 层重构 + API 抽离 + 状态管理优化 + 路由修复
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 10s
- HTTP 层:安装 axios,创建 lib/api-client.ts 统一拦截器
- API 层:创建 33 个 api/*.ts 文件,所有页面迁移完成
- DataPages.tsx 拆分为 10 个独立文件
- message 导入统一为 App.useApp()
- 新增 StaticAntdProvider 全局消息/通知
- 全局 HTTP 错误/成功提示(notification.error/success)
- learning 路由 /learning → /learning/dashboard 修复选中 bug
- 学习会话页面优化(移除 ID 列、加批量删除、后端排序)
- 文档导入页面重构(知识库筛选、批量重新解析)
- 删除旧 service 文件 10 个(admin-api、billing-api 等)
- antd App 包裹根组件

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-01 22:44:51 +08:00
e07f09002d fix: ImportMonitor labels + Progress kbName
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 12s
2026-06-19 13:13:54 +08:00
5edc467d19 fix: add Chinese labels for import status, type, and step fields
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 9s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 20:58:09 +08:00
237913468c feat: M2-04 admin — ImportMonitor page with detail drawer
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 9s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 13:12:04 +08:00