173 Commits

Author SHA1 Message Date
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
7c802bdf47 feat: API 代理地址支持环境变量配置,本地开发指向 127.0.0.1:3000
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 13s
2026-06-27 12:42:48 +08:00
8da983b0eb feat: add Worker status section to Servers page
- New WorkerInfo API type + getWorkerStatus() in server-api.ts
- WorkerStatusSection component: online/stale/offline cards
  with instanceId, version, hostname, queues, heartbeat age
- Auto-refresh every 15s
- Register /servers route (SUPER_ADMIN only)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-19 22:03:08 +08:00
9e36c10d31 fix: replace all any types with proper interfaces
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 8s
2026-06-19 15:36:55 +08:00
d07bca4897 fix: correct API type for kb-list in KnowledgeSources
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 8s
2026-06-19 15:35:25 +08:00
f6f9ab2ef0 feat: implement knowledge sources admin page
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 9s
2026-06-19 15:32:05 +08:00
de6b7e9b65 fix: revert ConfigProvider pagination prop
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 8s
2026-06-19 15:21:32 +08:00
ce08736c3a fix: add defaultPageSize: 20 to all table pagination configs
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 6s
2026-06-19 15:20:06 +08:00
4d093c2c26 fix: use pageSize instead of defaultPageSize in ConfigProvider
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 10s
2026-06-19 15:18:28 +08:00
209c0e9fb3 fix: use ConfigProvider pagination prop for defaultPageSize
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 7s
2026-06-19 15:16:42 +08:00
b0cfe2ed48 fix: set global table defaultPageSize to 20
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 6s
2026-06-19 15:15:55 +08:00
57aac73eff fix: add 'read' to progressStatusLabels
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 12s
2026-06-19 15:13:26 +08:00
fd40b0ef36 fix: add kbName render to chat-logs knowledgeBaseId column
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 11s
2026-06-19 13:30:35 +08:00
a19138871f fix: add file-name to contentType labels
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 9s
2026-06-19 13:27:31 +08:00
2400e48777 fix: add Chinese labels for security-events type/risk/result
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 8s
2026-06-19 13:25:20 +08:00
def5c953be fix: map record titles to Chinese (covers historical English data)
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 12s
2026-06-19 13:23:44 +08:00
972a80d4af fix: format position as readable string instead of raw JSON
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 9s
2026-06-19 13:17:37 +08:00
252b159537 fix: add 'new' to scheduleStateLabels
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 8s
2026-06-19 13:16:13 +08:00
c758a2cec8 fix: add Chinese mime type + purpose labels for FilesAdmin
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 9s
2026-06-19 13:15:23 +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
5dd35a1c9f feat(ADMIN-INFO-015): add userName render to userId columns across 8 pages
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 9s
- Billing, ChatLogs, ContentSafety, NotificationAdmin, SecurityEvents
- ComplianceAdmin (deletions + exports)
- MemberManagement (members + deletion requests)
- ComplianceAdmin status labels also fixed

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-19 13:07:59 +08:00
7ebe092f3f feat(ADMIN-INFO-014): add Chinese status labels across 8 admin pages
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 13s
- labels.ts: add 15 new label maps (review, import, admin, kb, etc.)
- ReviewAdmin: status/scheduleState/difficulty + filter dropdown
- KnowledgeBases: status
- KnowledgeOps: userId + status
- BackupAdmin: status (both backup & cleanup)
- Secrets: status
- ReleaseAdmin: status
- HermesSettings: agent task + artifact status

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-19 13:06:57 +08:00
83a7b56945 fix: prevent parent menu items from navigating, only toggle submenu
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 9s
2026-06-19 12:53:27 +08:00
14bc16ea01 fix: handle undefined in mode label render
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 9s
2026-06-19 12:51:24 +08:00
a30bfcf087 fix: add mode labels for learning sessions
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 10s
2026-06-19 12:50:14 +08:00
129a9b9abc fix: show user/kb names in LearningData page
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 8s
2026-06-19 12:48:01 +08:00
8da90c721b fix: remove duplicate render on RecordPage materialId
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 9s
2026-06-19 12:46:13 +08:00
ba4e35d413 feat: show user/kb/material names in admin learning tables
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 7s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-19 12:44:54 +08:00
e2d94742e2 feat: show userName/kbName/materialName in admin learning tables
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 10s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-19 12:44:31 +08:00
60b6100466 feat: add Chinese labels for admin learning data pages
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 10s
- New constants/labels.ts with all enum → Chinese mappings
- DataPages.tsx: all render() functions use labels
- Dashboard.tsx: eventType shows Chinese
- LearningData.tsx: session status shows Chinese
- Filter dropdowns also show Chinese options

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-19 12:36:54 +08:00
5de0b0ecaf refactor: merge admin/learning into admin-api/learning, restore API isolation
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 11s
- Move AdminLearningService + DTOs to learning-session module
- Merge 21 new endpoints into existing admin-api/learning controller
- Add analysis and ai-usage methods to unified service
- Delete admin-learning module (no longer needed)
- Revert JwtAuthGuard /api/admin bypass (was breaking isolation)
- Fix: /api/* now exclusively serves user/iOS traffic again

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-18 19:26:04 +08:00
3b825a1cf2 fix: add missing learning sub-page routes in App.tsx
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 10s
9 sub-pages (events, sessions, progress, daily, records, timeline,
anomalies, user-diagnose, material-diagnose) were defined in
routes/index.tsx but not registered as React Router <Route> elements,
causing 404 for all /learning/* pages except dashboard and replay.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-18 18:00:49 +08:00
e69930f7f4 feat: Admin 管理后台学习功能 - 路由、菜单、类型定义
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 12s
- App.tsx: 主应用更新
- menu.tsx: 菜单配置新增学习模块
- routes/index.tsx: 路由注册
- types/learning.ts: 学习相关类型定义

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-18 11:23:01 +08:00
6ad24aabe4 fix: add back /learning-data menu item
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 11s
Missing from original menu after regroup. Now 33/33 paths verified.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 22:17:41 +08:00
b05e5d86c7 fix: restore all original menu items, regroup into 6 categories
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 11s
All original entries preserved. New grouping:
- 总览
- 用户与权限 (管理员/普通用户/会员与额度)
- 知识库 (知识库+知识源+运维+发布+导入+文件+复习)
- 学习数据 (Dashboard/事件/会话/进度/每日/记录/时间线/异常/诊断)
- 系统运维 (Hermes/限流/安全/密钥/监控/AI/服务器/对话/事件/向量/配置/备份/缓存/通知/内容安全)
- 合规与报表 (合规/审计/报表/API用量/项目)
- 系统配置

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 22:09:02 +08:00
699f9012e0 refactor: organize admin menu into categories
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 8s
Before: 17 flat first-level items, 14 under single "系统运维"
After:  5 groups — 总览/用户管理/知识库/学习数据/系统

- AdminMenuItem.path → optional for group headers
- Breadcrumb map updated to match new structure
- Removed unused entries (hermes/servers/billing/git/etc.)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 22:06:11 +08:00
d697877056 chore: remove TaskAssistant from admin
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 9s
Remove /assistant route, menu item, breadcrumb from App.tsx,
routes/index.tsx, menu.tsx, AdminLayout.tsx.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 22:01:21 +08:00
c2f9c376d0 fix: resolve all TypeScript build errors in admin
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 11s
- DataPages.tsx: add any type annotation to all onRow callbacks
  (ReadingEvent/Session/Anomaly/Record/Progress)
- ReplayPage.tsx: remove unused dayjs import

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 21:50:47 +08:00
42c3a604ab fix: implement session-to-events cross-page navigation
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 6s
- Session detail: add "查看关联事件" button linking to /learning/events
- ReadingEventPage: read clientSessionId from URL search params on mount
- ReadingEventPage: add Client Session ID filter input

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 21:47:25 +08:00
37d5a51514 feat: add clientSessionId filter to SessionPage (ADMIN-INFO-013)
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 7s
- SessionPage already had full implementation by user
- Added clientSessionId filter input for active/interrupted session search
- Detail drawer already covers 16 fields including session diagnostics

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 21:44:22 +08:00
de415ff3c1 fix: add materialId filter + column to RecordPage
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 6s
Review finding: missing materialId filter input and list column.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 21:38:16 +08:00
0fd0709b8b feat: UserTimelinePage with Timeline component (ADMIN-INFO-009)
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 8s
- UserTimelinePage: userId input → API query → Ant Design Timeline
- Supports array timeline + fallback JSON view for unknown formats
- Loading / empty / error states
- Route: /learning/timeline

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 21:34:49 +08:00
a2cb0681d9 feat: RecordPage with filter + detail drawer (ADMIN-INFO-008)
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 8s
- Add userId filter input to LearningRecord list
- Add click-to-view detail Drawer with full record info
- Fix occurredAt formatting to use dayjs
- Add scroll for narrow displays

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 21:26:44 +08:00
ea73400857 fix: resolve TypeScript build errors in admin learning pages
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 9s
- Remove 5 unused antd imports (Card, Descriptions, message, Spin, Alert)
- Add PaginatedResponse<T> interface for typed API responses
- Add explicit return types to all learningAdminAPI functions
- Remove unused isLoading from UserDiagnosePage / MaterialDiagnosePage

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-10 22:42:59 +08:00
5bfac05bec fix: remove dead detail query in ReadingEventPage
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 8s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-09 22:01:04 +08:00
e4ab4bb02b fix: admin audit — use actual API pattern + fix lazy imports
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 5s
- Replace non-existent apiGet/apiPost with inline fetch
- Fix lazy(() => import()).then() → lazy(() => import().then())

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-09 22:00:11 +08:00
a9a7d651bb feat: ADMIN-INFO admin learning dashboard frontend (21/21)
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 8s
- Dashboard page with statistics cards
- Data pages: ReadingEvents, Sessions, Progress, DailyActivities, Records
- Diagnostic: Anomalies, User/Material Diagnose
- API service: learningAdmin.ts
- Routes: /learning/*

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-09 21:55:52 +08:00
8144bdc42f fix: 从密钥/账单下拉框移除已到期的 MiniMax
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-06-06 12:23:36 +08:00
7dbfb2751d feat: 项目中心简化为直接嵌入 Gitea iframe
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 10s
- 移除仓库列表/Issues/里程碑/Release/Runner 等所有 API 数据面板
- 移除页面标题行和面包屑导航
- 侧边栏点击「项目中心」直接全屏展示 Gitea

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 12:11:10 +08:00
6bcda17894 fix(admin): 普通用户页面显示 C 端真实用户列表
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 10s
- /users/members 路由改为使用 MemberManagement 组件
- 新增"用户列表"Tab:调用 /admin-api/users 展示所有 C 端用户
- 显示邮箱、昵称、角色、状态、最后登录、注册时间
- 保留原有会员管理和注销审核 Tab

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 21:17:26 +08:00