Commit Graph

52 Commits

Author SHA1 Message Date
9048816abc feat(ai): 移除 Excel 导入预检链路
- 删除 preflight_import 工具、预检卡、resolve 接口与 ui.import_preflight 事件
- 删除 imports.preflight 解析器与 PreflightReport 类型
- SYSTEM_PROMPT 改为上传 Excel 后直接确认列映射/策略并调用 start_import_wizard
- 前端同步移除预检类型/组件/测试,保留导入向导
2026-08-06 15:50:38 +08:00
c72ff2cb8a fix(ai): 清理 aislop 扫描告警
- 拆分 SSE reducer 到 sseReducer.ts,provider.ts 降至 220 行
- artifact 合并工具抽到 uiArtifacts.ts,去除双重类型断言
- 业务上下文注册表改用 field/relation/entity 构建器收敛重复
- aislop 分数 71 → 81(Healthy),AI Slop 0 告警
2026-08-06 15:35:12 +08:00
24e0ecbdaf feat(ai): 业务上下文感知与 A2UI 链路统一
- 新增代码内业务上下文元数据层(实体字典 + 三大闭环工作流)
- 新增 get_business_context / get_entity_schema / get_pending_tasks 运行时工具
- SYSTEM_PROMPT 与技能目录改为先查业务流程/待办再执行
- A2UI 增加 ai_a2ui_submissions 幂等表、表单过期、ui.artifact 事件
- 提交回灌携带 submissionId / fieldErrors / 下一步建议
- 前端 uiArtifacts 归一化与过期表单禁用
2026-08-06 15:23:23 +08:00
ae88372ef8 fix(imports): 修复 AI 导入向导多工作表与表头误判
- AI resolve 生成向导时按阶段携带全部 sheetNames,不再只取第一张表
- ImportStageRequest 支持 sheets 数组并兼容旧 sheet;手动重传同步修复
- headerMatches 收窄为单向包含,避免宿舍号被原/新宿舍号反向匹配
- suggestStep 增加入住/换宿显式表头信号,修复入住表误判为换宿
- 预检与预览按工作表逐表解析列映射,兼容异构表头
- 修复预检卡生成向导成功后按钮未复位 loading 的问题
- 补充 mapping/预检/run/ai-chat 多工作表测试
2026-08-06 14:46:33 +08:00
259271f56c fix(admin): Alert message 弃用 API 全部迁移为 title 2026-08-06 12:20:24 +08:00
d0ab8da01b feat(admin): AI 预检卡片交互与消息组件完善
- 预检卡支持列映射、导入策略确认与生成导入向导
- 消息组件/API 契约配套更新,含集成测试
2026-08-06 11:59:36 +08:00
026a9f35d8 fix(admin): 迁移 antd v6 弃用 API 并清理控制台警告
- Card bordered -> variant;Modal maskClosable -> mask.closable
- InputNumber addonBefore/After -> prefix/suffix;Statistic valueStyle -> styles.content
- Alert message -> title;Steps items.description -> items.content
- 移除考勤页未挂载 Form 上的 setFieldsValue,消除 useForm 警告
2026-08-06 11:58:58 +08:00
1a1e90c72f fix(admin): 补全 React hooks 依赖并修复页面稳定性
- 各页面 useCallback/useMemo 依赖补全(modal/mutation/setter 等),避免闭包过期
- ECharts 使用 optionRef、MainLayout 缓存菜单转换函数、main.tsx 增加挂载点校验
- 学生同步结果改用 recordsCount 展示
2026-08-05 21:14:08 +08:00
ab4765cee5 feat: Excel 导入预检与动态问答,AI 聊天/文件解析体验修复
- imports: 新增 preflight_import 预检报告(判定/分阶段统计/阻断归因/问题/下一步/错误示例),导入任务 settings 落库(映射/校区/更新/重复/未匹配策略),预览应用策略,向导提交写操作日志
- ai-chat: 新增 excel_analyze(ExcelJS)工具,移除附件/上下文截断,start_import_wizard 支持确认参数,ui.import_preflight SSE,预览确认写操作日志
- admin: ImportPreflightCard 渲染与持久化,聊天抽屉布局/侧边栏修复,考勤页 CSS 引入,费用/学生页接口 schema 校验修复
2026-08-05 21:12:50 +08:00
32343b271b fix: 通知 SSE 长连接被 Nginx 60s 超时掐断 2026-08-05 18:00:45 +08:00
fd39e1686a feat: 重构各业务模块管理页面与服务 2026-08-05 17:12:00 +08:00
0c94ca54df feat: 新增通用导入中心 2026-08-05 17:11:39 +08:00
c622e40a12 feat: 学生档案与报告生成 2026-08-05 17:11:15 +08:00
0e6e3e2d96 feat: AI 对话支持 A2UI 表单/审查/图表与 Agent 工具 2026-08-05 17:11:00 +08:00
d53bbd8176 refactor: 前端应用骨架迁移至 zustand 并统一路由权限壳 2026-08-05 17:10:30 +08:00
50c44e4410 feat: AI 对话支持 A2UI 表单/审查/图表与 Excel 读取 2026-08-04 14:43:12 +08:00
f07ffdc64c refactor: 前端登录/权限/界面状态迁移至 zustand 2026-08-04 14:41:27 +08:00
8656394b9b Refactor AI chat: streaming, tool calls, UI polish
All checks were successful
CI / check (pull_request) Successful in 3m25s
2026-07-24 16:27:50 +08:00
fb787c3e0d Merge pull request '集成 AI 对话与只读查询工具' (#44) from xiongyuxing/gongxue-base:main into main 2026-07-23 07:15:07 +00:00
446c6bcc91 fix: harden permission-gated UI — minimum-org endpoint, modal/Popconfirm fail-closed on revocation
Some checks failed
CI / check (pull_request) Failing after 3m46s
2026-07-23 14:28:58 +08:00
a7a7af1667 fix: close permission review gaps
fix: harden permission-gated UI — minimum-org endpoint, modal/Popconfirm fail-closed on revocation
2026-07-23 14:28:58 +08:00
f3b59935d6 feat: 集成 AI 对话与只读查询工具 2026-07-23 14:24:40 +08:00
c98d37307e fix: align permission-gated UI actions 2026-07-23 12:34:37 +08:00
5bd63846d1 fix: prevent touch double-tap zoom
All checks were successful
CI / check (pull_request) Successful in 3m46s
2026-07-23 11:27:41 +08:00
d93f6cb0b9 修复手机端双击编辑单元格 2026-07-23 09:42:33 +08:00
90cc321221 fix: UI improvements and DingTalk attendance refresh for completed sessions
All checks were successful
CI / check (pull_request) Successful in 1m33s
- DatePicker editors open immediately on double-click
- Student archive drawer hides empty studentNo parentheses
- Student add/edit form uses 2-column grid layout
- Table horizontal scrollbars show only on hover/focus
- Remove fake 近7日趋势 stats from attendance student detail
- Allow DingTalk refresh to update completed attendance sessions
  (late-arriving punches can now change absent → present)
- Switch dev command from concurrently to turbo run dev
- Remove concurrently/wait-on dependencies
2026-07-22 17:50:59 +08:00
393ee62168 feat: add Jinshuju student sync
All checks were successful
CI / check (pull_request) Successful in 2m14s
2026-07-22 11:41:50 +08:00
cbc04fea4f feat: add exam score management
Some checks failed
CI 检查 / lint (pull_request) Has been cancelled
CI 检查 / typecheck (pull_request) Has been cancelled
CI 检查 / test (pull_request) Has been cancelled
2026-07-21 16:04:17 +08:00
37ef6f9dd7 feat: add college archive fields
Some checks failed
CI 检查 / lint (pull_request) Has been cancelled
CI 检查 / typecheck (pull_request) Has been cancelled
CI 检查 / test (pull_request) Has been cancelled
2026-07-21 15:35:35 +08:00
90cc0c10b2 feat: expand student archive import template 2026-07-21 15:11:52 +08:00
a585fd42d5 feat: 支持表格单元格快捷编辑
Some checks failed
CI 检查 / lint (pull_request) Has been cancelled
CI 检查 / typecheck (pull_request) Has been cancelled
CI 检查 / test (pull_request) Has been cancelled
2026-07-21 14:17:08 +08:00
29c55ebff1 feat: 添加可拖拽的路由停靠组件,支持动态标签管理
Some checks failed
CI 检查 / lint (pull_request) Has been cancelled
CI 检查 / typecheck (pull_request) Has been cancelled
CI 检查 / test (pull_request) Has been cancelled
2026-07-21 10:13:47 +08:00
375c7ec60b feat: refine admin forms, attendance and finance workflows
Squash merge PR #23.

Included changes:
- complete occupancy check-in required fields/default payload
- improve responsive admin management pages
- fix attendance edge cases and attendance period config
- refine wallet/finance-related workflow handling

Checks:
- npm run typecheck -w apps/admin
- npm run typecheck -w apps/server
2026-07-18 12:54:10 +00:00
f7328d670d fix: 归档删除改为软删除 2026-07-17 14:13:17 +08:00
8bd445df5a fix student import and profile labels 2026-07-15 10:52:43 +08:00
e45da7f998 feat: improve attendance scheduling and API validation 2026-07-14 23:12:14 +08:00
xyx
acb11b87a3 fix: enhance pagination settings across multiple pages with default size and options 2026-07-13 16:49:21 +08:00
xyx
910a4263f6 fix: refactor notification display logic and add format function 2026-07-13 14:52:03 +08:00
cc4f4dae4e fix: audit remediation — SSE user scoping, FK transactional safety, UI error handling
- H4: scoped SSE import progress to exact userId match; non-HTTP events excluded from all subscribers
- H2: moved PRAGMA foreign_key_check inside SQLite transaction before COMMIT; violations rollback preserving old tables
- M1: removed dead axios-style error branch from extractErrorMessage (interceptor already unwraps)
- M2: split handleSave try/catch — save errors vs reload errors shown distinctly
- M3: added provider field validation before AI config test request
- Added SSE scoping regression tests (import service + controller)
- Added FK check failure rollback test (database-migrations.spec)
- Updated controller spec expectations for userId parameter

Co-authored-by: Code Review <branch-review>
2026-07-12 22:59:03 +08:00
b6fca99390 fix: align permission navigation and page access 2026-07-11 14:55:49 +08:00
8ed1682b90 fix permissions and teacher attendance workflows 2026-07-10 20:40:52 +08:00
1ca4a4d185 fix(archive): serve student attachments securely
Download attachments through authenticated API requests, support configurable upload paths, validate resolved file locations, and retain compatibility with legacy stored paths.
2026-07-10 14:11:47 +08:00
b0f7883f33 feat(admin): remove all department/campus scoping from frontend
- Delete CampusSwitcher component and useCampus hook
- Delete Departments page and its route
- Remove campus header interceptor from API client
- Remove departmentId from Class interfaces
- Remove campusLocation from student profile
- Remove department permissions from test fixtures
- Remove currentCampusId from test cleanup

TypeScript compiles clean.
2026-07-09 17:40:57 +08:00
42d3f0e27f feat: DingTalk attendance import + integration config + expense types + UI polish
Server:
- Add DingTalk attendance import service with SSE progress streaming
- Add IntegrationConfig entity & module for multi-tenant DingTalk setup
- Add ExpenseType entity & ExpenseTypesModule
- Add SeedModule for DB initialization
- Add UserDingMapping entity for DingTalk user linkage
- Attendance service: import flow with dedup & student auto-mapping
- Rooms service: time-range overlap queries
- Sync controller/service: DingTalk integration wiring
- Permission guard: refactor to pure re-export
- Campus scope middleware: tenant-aware filtering

Admin UI:
- Attendance page: import UI with progress & result summary
- All pages: tableStyle/tablePagination standardization
- Login page: responsive styling
- Sensitive data: useViewSensitive hook for masked viewing
- Vite config: path aliases, build optimization
- Test infra: vitest config, test utilities

Docs: PRD DingTalk batch 1 & 2 design docs
2026-07-09 09:11:56 +08:00
a7cb2865a9 fix: update StudentProfileContent report buttons to use /report-html, remove dead /report references 2026-07-07 10:03:19 +08:00
85872d6564 refactor(admin): extract StudentProfileContent component and reuse in drawer 2026-07-06 17:22:09 +08:00
b3655da012 fix: resolve 9 P0+P1 review findings (bills decorators, campus isolation bypass, ding raw crash, batch import counter, SSE multi-tab, interval leak, dept permissions, cycle prevention, tree depth) 2026-07-06 00:38:51 +08:00
af3b4ba8f4 feat: add useCampus hook and CampusSwitcher component 2026-07-06 00:05:48 +08:00
9e6c136ef0 fix: apply code review fixes — double layout, SSE leaks, interval leak, conflict values
- App.tsx: remove double-wrapped MainLayout from /notifications route
- NotificationBell.tsx: decouple SSE from popover open state using ref
- useNotifications.ts: fix interval leak in onerror via ref in cleanup
- notifications.controller.ts: unsubscribe on req.on('close') for SSE Subject
- schedules.controller.ts: use existing schedule values in conflict catch
2026-07-05 23:31:21 +08:00
f47b7aaf87 feat: add useNotifications hook and NotificationBell component 2026-07-05 23:18:18 +08:00