feat: 新增备课模块并修复全模块 P0/P1/P2 缺陷
Some checks failed
Security / deep-security-scan (push) Failing after 20m5s
DR Drill / dr-drill (push) Failing after 1m31s
CI / scheduled-backup (push) Failing after 1m31s
CI / backup-verify (push) Has been skipped
CI / weekly-dr-drill (push) Failing after 0s
CI / build-deploy (push) Has been cancelled
CI / security-scan (push) Has been cancelled

主要变更:

- 新增 lesson-preparation 模块: 备课编辑器、节点编辑、AI 建议、知识点选择、版本历史、作业发布

- 新增 shared 通用组件: charts/question-bank-filters/schedule-list/ui (chip-nav/filter-bar/page-header/stat-card/stat-item)

- 新增 student/admin 端 loading.tsx 与 error.tsx, 优化加载与错误态体验

- 新增 teacher/lesson-plans 页面 (列表/新建/编辑)

- 新增 drizzle 迁移 0002_tiny_lionheart 及 snapshot

- 新增 textbooks/schema.ts 与 exams/utils/normalize-structure.ts

- 修复 Tiptap v3 SSR hydration 崩溃 (rich-text-block immediatelyRender: false)

- 重构多模块 data-access/actions/组件, 修复权限校验与类型规范

- 同步架构文档 004/005 反映新增模块、导出、依赖关系

- 归档 bugs/* 测试报告与 e2e 测试脚本 (admin/parent/student/teacher web_test)
This commit is contained in:
SpecialX
2026-06-22 01:06:16 +08:00
parent d8962aba96
commit 978d9a8309
327 changed files with 34070 additions and 5642 deletions

636
bugs/teacher_web_test.json Normal file
View File

@@ -0,0 +1,636 @@
{
"test_date": "2026-06-20 13:12:24",
"test_target": "教师端 (Teacher)",
"base_url": "http://localhost:3000",
"teacher_email": "t_chinese_1@xiaoxue.edu.cn",
"summary": {
"total": 41,
"passed": 38,
"failed": 0,
"warnings": 0
},
"pages": {
"teacher_dashboard": {
"url": "http://localhost:3000/teacher/dashboard",
"route": "/teacher/dashboard",
"category": "Dashboard",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/dashboard",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "",
"body_length": 5000,
"screenshot": null
},
"teacher_textbooks": {
"url": "http://localhost:3000/teacher/textbooks",
"route": "/teacher/textbooks",
"category": "Textbooks",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/textbooks",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_exams": {
"url": "http://localhost:3000/teacher/exams",
"route": "/teacher/exams",
"category": "Exams",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/exams/all",
"redirect_url": "http://localhost:3000/teacher/exams/all",
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_exams_all": {
"url": "http://localhost:3000/teacher/exams/all",
"route": "/teacher/exams/all",
"category": "Exams",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/exams/all",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_exams_create": {
"url": "http://localhost:3000/teacher/exams/create",
"route": "/teacher/exams/create",
"category": "Exam Detail",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/exams/create",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_homework": {
"url": "http://localhost:3000/teacher/homework",
"route": "/teacher/homework",
"category": "Homework",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/homework/assignments",
"redirect_url": "http://localhost:3000/teacher/homework/assignments",
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_homework_assignments": {
"url": "http://localhost:3000/teacher/homework/assignments",
"route": "/teacher/homework/assignments",
"category": "Homework",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/homework/assignments",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_homework_assignments_create": {
"url": "http://localhost:3000/teacher/homework/assignments/create",
"route": "/teacher/homework/assignments/create",
"category": "Homework Assignment Detail",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/homework/assignments/create",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_homework_submissions": {
"url": "http://localhost:3000/teacher/homework/submissions",
"route": "/teacher/homework/submissions",
"category": "Homework",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/homework/submissions",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_grades": {
"url": "http://localhost:3000/teacher/grades",
"route": "/teacher/grades",
"category": "Grades",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/grades",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_grades_entry": {
"url": "http://localhost:3000/teacher/grades/entry",
"route": "/teacher/grades/entry",
"category": "Grades",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/grades/entry",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_grades_stats": {
"url": "http://localhost:3000/teacher/grades/stats",
"route": "/teacher/grades/stats",
"category": "Grades",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/grades/stats",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_grades_analytics": {
"url": "http://localhost:3000/teacher/grades/analytics",
"route": "/teacher/grades/analytics",
"category": "Grades",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/grades/analytics",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "",
"body_length": 5000,
"screenshot": null
},
"teacher_questions": {
"url": "http://localhost:3000/teacher/questions",
"route": "/teacher/questions",
"category": "Question Bank",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/questions",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_classes": {
"url": "http://localhost:3000/teacher/classes",
"route": "/teacher/classes",
"category": "Class Management",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/classes/my",
"redirect_url": "http://localhost:3000/teacher/classes/my",
"errors": [],
"warnings": [],
"console_errors": [],
"title": "",
"body_length": 5000,
"screenshot": null
},
"teacher_classes_my": {
"url": "http://localhost:3000/teacher/classes/my",
"route": "/teacher/classes/my",
"category": "Class Management",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/classes/my",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "",
"body_length": 5000,
"screenshot": null
},
"teacher_classes_students": {
"url": "http://localhost:3000/teacher/classes/students",
"route": "/teacher/classes/students",
"category": "Class Management",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/classes/students",
"redirect_url": null,
"errors": [],
"warnings": [
"页面告警文本: 20",
"页面告警文本: 42",
"页面告警文本: 42"
],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_classes_schedule": {
"url": "http://localhost:3000/teacher/classes/schedule",
"route": "/teacher/classes/schedule",
"category": "Class Management",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/classes/schedule",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_course-plans": {
"url": "http://localhost:3000/teacher/course-plans",
"route": "/teacher/course-plans",
"category": "Course Plans",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/course-plans",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_lesson-plans": {
"url": "http://localhost:3000/teacher/lesson-plans",
"route": "/teacher/lesson-plans",
"category": "Lesson Plans",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/lesson-plans",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_lesson-plans_new": {
"url": "http://localhost:3000/teacher/lesson-plans/new",
"route": "/teacher/lesson-plans/new",
"category": "Lesson Plan Edit",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/lesson-plans/new",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_attendance": {
"url": "http://localhost:3000/teacher/attendance",
"route": "/teacher/attendance",
"category": "Attendance",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/attendance",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_attendance_sheet": {
"url": "http://localhost:3000/teacher/attendance/sheet",
"route": "/teacher/attendance/sheet",
"category": "Attendance",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/attendance/sheet",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_attendance_stats": {
"url": "http://localhost:3000/teacher/attendance/stats",
"route": "/teacher/attendance/stats",
"category": "Attendance",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/attendance/stats",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_schedule-changes": {
"url": "http://localhost:3000/teacher/schedule-changes",
"route": "/teacher/schedule-changes",
"category": "Schedule Changes",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/schedule-changes",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_diagnostic": {
"url": "http://localhost:3000/teacher/diagnostic",
"route": "/teacher/diagnostic",
"category": "Diagnostic",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/diagnostic",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_elective": {
"url": "http://localhost:3000/teacher/elective",
"route": "/teacher/elective",
"category": "Electives",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/elective",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"management_grade_classes": {
"url": "http://localhost:3000/management/grade/classes",
"route": "/management/grade/classes",
"category": "Management",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/management/grade/classes",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"management_grade_insights": {
"url": "http://localhost:3000/management/grade/insights",
"route": "/management/grade/insights",
"category": "Management",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/management/grade/insights",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"announcements": {
"url": "http://localhost:3000/announcements",
"route": "/announcements",
"category": "Announcements",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/announcements",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Announcements",
"body_length": 5000,
"screenshot": null
},
"messages": {
"url": "http://localhost:3000/messages",
"route": "/messages",
"category": "Messages",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/messages",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Messages",
"body_length": 5000,
"screenshot": null
},
"messages_compose": {
"url": "http://localhost:3000/messages/compose",
"route": "/messages/compose",
"category": "Messages",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/messages/compose",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Compose Message",
"body_length": 5000,
"screenshot": null
},
"profile": {
"url": "http://localhost:3000/profile",
"route": "/profile",
"category": "Profile & Settings",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/profile",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Profile",
"body_length": 5000,
"screenshot": null
},
"settings": {
"url": "http://localhost:3000/settings",
"route": "/settings",
"category": "Profile & Settings",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/settings",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Settings",
"body_length": 5000,
"screenshot": null
},
"settings_security": {
"url": "http://localhost:3000/settings/security",
"route": "/settings/security",
"category": "Profile & Settings",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/settings/security",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Security Settings",
"body_length": 5000,
"screenshot": null
},
"teacher_textbooks_tb_MATH_g1": {
"url": "http://localhost:3000/teacher/textbooks/tb_MATH_g1",
"route": "/teacher/textbooks/tb_MATH_g1",
"category": "Textbook Detail",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/textbooks/tb_MATH_g1",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
},
"teacher_classes_my_class_G1C1": {
"url": "http://localhost:3000/teacher/classes/my/class_G1C1",
"route": "/teacher/classes/my/class_G1C1",
"category": "Class Detail",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/classes/my/class_G1C1",
"redirect_url": null,
"errors": [],
"warnings": [
"页面告警文本: 20",
"页面告警文本: 42",
"页面告警文本: 42"
],
"console_errors": [],
"title": "",
"body_length": 5000,
"screenshot": null
},
"teacher_course-plans_cp_g1c1_chinese": {
"url": "http://localhost:3000/teacher/course-plans/cp_g1c1_chinese",
"route": "/teacher/course-plans/cp_g1c1_chinese",
"category": "Course Plan Detail",
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/course-plans/cp_g1c1_chinese",
"redirect_url": null,
"errors": [],
"warnings": [],
"console_errors": [],
"title": "Next_Edu - K12 智慧教务系统",
"body_length": 5000,
"screenshot": null
}
},
"interactions": [
{
"name": "仪表盘快捷操作可见性",
"status": "passed",
"detail": "可见可点击元素 10 个"
},
{
"name": "教材详情页加载",
"status": "passed",
"detail": "教材 /teacher/textbooks/tb_MATH_g1 加载成功,发现 16 个潜在章节元素"
},
{
"name": "创建考试表单元素",
"status": "passed",
"detail": "发现 8 个表单元素"
},
{
"name": "题库表格与筛选",
"status": "passed",
"detail": "表格行 11 个,筛选器 0 个"
},
{
"name": "创建作业表单",
"status": "passed",
"detail": "发现 27 个表单元素"
},
{
"name": "新建备课表单",
"status": "passed",
"detail": "发现 18 个表单/编辑元素"
},
{
"name": "侧边栏导航链接",
"status": "passed",
"detail": "发现 11 个侧边栏链接"
},
{
"name": "消息撰写表单",
"status": "passed",
"detail": "发现 18 个表单元素"
}
],
"console_errors_global": [],
"navigation_issues": []
}