SpecialX
|
524ecade19
|
feat(lesson-preparation): major update with data-access splits and new components
- Update ai-feedback-dialog, attachment-picker, blocks/text-study-block
- Update detail-panel (detail-panel, detail-props)
- Update inline-question-editor, lesson-plan-card, lesson-plan-editor,
lesson-plan-mobile-view, schedule-dialog, version-history-drawer
- Update paper-editor (inline-qa-dialog, paper-context-menu)
- Update structure-tree (structure-tree, tree-node-row)
- Update config/block-registry, hooks (editor-slice, use-lesson-plan-persistence,
use-node-ai-assist), lib (ai-node-assist, consistency-check, export, type-guards)
- Update publish-service, services/default-question-service
- Update data-access files (ai-evaluation, analytics, attachments, calendar,
comments, formative, knowledge, review, schedules, templates, versions, main)
|
2026-07-07 16:20:34 +08:00 |
|
SpecialX
|
2adf61faa8
|
feat(modules-assessment): update exams, files, grades, homework, invitation-codes, leave-requests
- exams: update assembly (exam-paper-preview, question-bank-list, structure-editor),
exam-actions, exam-assembly, exam-columns, exam-data-table, exam-form,
exam-preview-utils, exam-rich-form, editor (exam-nodes-to-editor-doc,
exam-rich-editor-inner, question-block, selection-toolbar),
hooks (use-exam-preview-rewrite, use-exam-preview-state, use-exam-preview-tasks,
use-exam-preview)
- files: update data-access, use-file-batch-operations, use-file-upload
- grades: update batch-grade-entry, excel-import-dialog, export-button,
grade-record-form, grade-record-list, knowledge-point-mastery-chart,
report-card-print-action, report-card-print-button, data-access-analytics,
use-batch-grade-entry-undo, use-draft-lock
- homework: update homework-assignment-form, homework-batch-grading-view,
homework-grading-view, homework-scan-grading-view, homework-take-view, scan-uploader
- invitation-codes: update generate-invitation-codes-dialog, invitation-codes-view, data-access
- leave-requests: update leave-request-form, leave-review-dialog, data-access
|
2026-07-07 16:19:46 +08:00 |
|
SpecialX
|
d7017f0e30
|
feat(modules-classes): update classes, course-plans, dashboard, diagnostic, elective, error-book
- classes: update actions-shared, admin-classes-view, class-detail, class-invitation-manager,
grade-classes-view, my-classes-grid, schedule dialogs, students-table,
data-access-admin, data-access-students, data-access-teacher, data-access
- course-plans: update course-plan-detail, course-plan-form, course-plan-item-editor,
template-picker-dialog, data-access
- dashboard: update dashboard-time-range-filter, use-dashboard-preferences,
use-dashboard-realtime
- diagnostic: update class-diagnostic-view, report-list, data-access
- elective: update elective-course-form, elective-course-list, student-selection-view,
data-access-operations, data-access-selections, data-access
- error-book: update add-error-book-dialog, error-book-detail-dialog, review-buttons
|
2026-07-07 16:19:08 +08:00 |
|
SpecialX
|
b090a815ae
|
feat(modules-edu): update ai, adaptive-practice, announcements, attendance, audit, auth
- ai: update chat-panel, child-summary, error-book-analysis, grading-assist,
lesson-content-generator, markdown-renderer, question-variant-generator,
study-path, usage-dashboard, use-ai-chat-stream, use-position-persistence
- adaptive-practice: update practice-result-view, practice-session-view,
practice-starter, data-access-analytics, lib/type-guards
- announcements: update announcement-card, detail, form, data-access
- attendance: update attendance-record-list, attendance-rules-form,
attendance-sheet, data-access
- audit: update actions, audit-log-export-button, audit-retention-settings,
data-access
- auth: update login-form, register-form, data-access
|
2026-07-07 16:18:29 +08:00 |
|
SpecialX
|
224740ad98
|
feat(shared): update permissions system, i18n, hooks, and components
- Update permission-bitmap.ts, permissions.ts, resolve-action-error.ts
- Update types/permissions.ts
- Update rbac i18n messages (en, zh-CN)
- Update locale-switcher.tsx
- Update use-action-with-toast.ts hook
|
2026-07-07 16:17:53 +08:00 |
|
SpecialX
|
b333cda8c5
|
refactor(data-access,lib): split data-access files and add type-guards across modules
- grades: split analytics into class/overview/student/trend files
- messaging: split into bulk/core/group/reports/templates
- school: split into classrooms/departments/grades/schools/semesters/subjects
- Add lib/type-guards.ts for attendance, classes, elective, exams,
invitation-codes, leave-requests, notifications, scheduling, school,
settings, standards, textbooks
- Add lesson-preparation/lib/status-mappers.ts
- Add parent/actions.ts
- Add shared/lib/date-utils.ts
|
2026-07-07 16:17:24 +08:00 |
|
SpecialX
|
4e6d397d8e
|
docs(architecture): sync logging refactor to 004/005 and known-issues
Task 15: 004 架构影响地图新增 1.1.7 日志系统重构章节(架构图、核心组件表、Request ID 贯穿链路、Edge Runtime 限制、替换范围、环境变量),shared/lib 清单新增 logger.ts/request-context.ts/with-request-context.ts/track-event.ts 更新,hooks 清单新增 use-error-report.ts。
Task 16: 005 架构数据 JSON 新增 3 个 shared/lib 文件节点、1 个 hooks 节点、1 个 apiRoute(/api/client-error)、5 个 dependencyMatrix 依赖关系,JSON 有效性验证通过。
Task 17: known-issues.md 新增二十八、日志系统规则章节,含 5 个规则表(pino 使用、Edge Runtime 限制、Request ID 贯穿、ESLint no-console、客户端错误上报)。
|
2026-07-07 13:00:00 +08:00 |
|
SpecialX
|
7c1b764b59
|
feat(logging): wire useErrorReport into all 129 error.tsx boundaries
所有 129 个 error.tsx 客户端错误边界接入 useErrorReport Hook,客户端路由错误自动上报到 /api/client-error 端点,服务端通过 pino logger 统一记录。移除了 7 处 useEffect + console.error 调用。为无 props 的 error.tsx 补全 error 参数解构。
|
2026-07-07 12:52:32 +08:00 |
|
SpecialX
|
4122175915
|
feat(logging): add useErrorReport hook and /api/client-error endpoint
Task 12: useErrorReport Hook 使用 navigator.sendBeacon 上报客户端错误到 /api/client-error,降级到 fetch keepalive。节流策略:同一 error digest 在 1 分钟内只上报一次(基于 sessionStorage)。
Task 13: /api/client-error Route Handler 接收客户端错误,用 createModuleLogger('client-error') 记录到 pino 日志流,字段包含 message/stack/digest/path/userAgent/timestamp。
|
2026-07-07 12:41:41 +08:00 |
|
SpecialX
|
811ad11f9f
|
feat(logging): enable ESLint no-console rule with client exemptions
全局启用 no-console: error 规则,强制服务端 .ts 文件使用 createModuleLogger。豁免场景: scripts/(脚本)、tests/(测试)、src/**/*.tsx(客户端组件,留待 Task 12-14 处理)、src/**/hooks/**/*.ts(客户端 hooks)、src/**/components/**/*.ts(客户端 utils)、src/shared/lib/query-client.ts(被客户端导入)。将 deletes/ 归档目录加入 globalIgnores。
|
2026-07-07 12:39:21 +08:00 |
|
SpecialX
|
12a766d3ee
|
refactor(logging): replace console.* with module loggers in server modules
34 个服务端文件替换 86 处 console.* 调用为 createModuleLogger。模块覆盖: exams/audit/school/files/classes/notifications/grades/auth/homework/announcements/settings/lesson-preparation。shared lib: cache/redis-store, rate-limit/redis-limiter, redis-client, exam-homework-port。API routes: web-vitals, cron/audit-cleanup, proctoring/event。
web-vitals/route.ts 从 edge runtime 改为 nodejs runtime,因 pino 依赖 Node.js stream 内置模块,不兼容 Edge Runtime (V8 Isolate)。
|
2026-07-07 12:34:57 +08:00 |
|
SpecialX
|
0a034945d4
|
refactor(logging): replace console in track-event modules with logger
|
2026-07-07 12:14:23 +08:00 |
|
SpecialX
|
fefc65702d
|
fix(logging): replace silent audit-logger failures with logger.warn
|
2026-07-07 12:09:38 +08:00 |
|
SpecialX
|
a75fdcd60d
|
refactor(logging): replace console.error in api-response with logger
|
2026-07-07 12:06:36 +08:00 |
|
SpecialX
|
2236eb36e7
|
refactor(logging): replace console.error in action-utils with logger
|
2026-07-07 12:05:00 +08:00 |
|
SpecialX
|
c44f19aefd
|
feat(logging): inject x-request-id in proxy.ts
|
2026-07-07 12:01:55 +08:00 |
|
SpecialX
|
dce2561751
|
feat(logging): add withRequestContext HOF for Server Actions
|
2026-07-07 11:51:47 +08:00 |
|
SpecialX
|
a208fcc601
|
feat(logging): add pino logger with createModuleLogger
|
2026-07-07 11:44:49 +08:00 |
|
SpecialX
|
3bd3ebc12d
|
feat(logging): add request-context with AsyncLocalStorage
|
2026-07-07 11:34:40 +08:00 |
|
SpecialX
|
c2575960eb
|
feat(logging): add pino dependency and LOG_LEVEL env var
|
2026-07-07 11:29:12 +08:00 |
|
SpecialX
|
94f098b0f2
|
perf(phase1-4): 补漏性能预算重构专项遗漏项
Phase 1 配置基线:next.config.ts 新增 experimental.optimizePackageImports(lucide-react/recharts/@xyflow/react/@tiptap/* /@radix-ui/*/date-fns)+ serverExternalPackages 追加 tencentcloud-sdk-nodejs + exceljs;providers.tsx 注入 WebVitalsReporter 闭环 RUM 上报链路(之前组件存在但未注入导致生产环境零性能数据)。
Phase 2 Bundle 预算优化补漏:TipTap 三实例(shared/ui/rich-text-editor + exams/editor/exam-rich-editor + lesson-preparation/blocks/rich-text-block)之前仅文件拆分未真正 next/dynamic ssr:false,本次补齐 lazy wrapper + xxx-inner.tsx 拆分模式;ReactFlow knowledge-graph.tsx 改用 next/dynamic 加载 inner;chart.tsx 改 recharts 具名导入替代 import * as RechartsPrimitive barrel。
Phase 4 组件渲染优化补漏:12 个 recharts 图表组件(parent/grades/dashboard/homework 模块下)margin props 提取到模块级 CHART_MARGIN 常量避免 inline 重建;layout.tsx metadata 增强(metadataBase/openGraph/twitter/robots/authors/creator)+ getLocale/getMessages/auth 串行 await 改 Promise.all 并行。
同步架构文档 004/005 + known-issues.md:新增 Phase 1 配置基线规则章节 + Phase 2 文件清单修正(之前引用不存在的 question-rich-editor.tsx 和 paper-rich-editor.tsx,实际是 rich-text-editor.tsx 和 rich-text-block.tsx)+ Phase 4.9 metadata + Promise.all 规则补充。架构图 1.1.5 章节新增未完成项(React Compiler/force-dynamic 评估/Playwright 性能断言)。
验证:npx tsc --noEmit 零错误;npm run lint 零新增错误(3 errors + 12 warnings 均位于未修改的 pre-existing 文件)。
|
2026-07-07 00:30:47 +08:00 |
|
SpecialX
|
6104e6a685
|
docs(architecture): 组件化重构专项遗漏补全 - 更新 005 lastUpdate + known-issues 25.4 节
- 005 JSON: lastUpdate 追加遗漏补全 9 模块 20 组件迁移记录
- known-issues.md: 新增 25.4 遗漏补全规则章节
- 全量验证:49 个重复组件全部删除,modules/*/components/ 下无残留
|
2026-07-06 22:24:17 +08:00 |
|
SpecialX
|
e76c626779
|
refactor(classes,audit,school,settings,adaptive-practice,announcements,messaging,questions,student): 组件化重构遗漏补全 - 20 个重复组件迁移
补全未被批次覆盖的 9 个模块的重复组件迁移:
- classes: 迁移 students-filters/schedule-filters/class-skeleton/class-error-boundary
- audit: 迁移 3 个 filters + audit-log-table-skeleton + audit-error-boundary
- school: 迁移 grade-insights-filters/school-skeleton/school-error-boundary
- settings: 迁移 settings-section-error-boundary
- adaptive-practice: 迁移 2 个 practice-stats-cards 到 StatsGrid
- announcements: 迁移 announcement-list-skeleton 到 SkeletonCard
- messaging: 迁移 message-list-skeleton 到 SkeletonCard
- questions: 迁移 question-filters 到 app 层
- student: 迁移 course-filters/student-schedule-filters 到 app 层
- 补充 school/settings 模块 i18n error.boundary* 键
- tsc 零错误
|
2026-07-06 22:22:23 +08:00 |
|
SpecialX
|
ee10380462
|
docs(architecture): 组件化重构专项完成 - 同步 005 lastUpdate + known-issues 第 25 章
- 005 JSON: lastUpdate 更新为组件化重构专项全量完成摘要
- known-issues.md: 新增第 25 章(4 个小节:底座使用规则/拆分模式/迁移规则/验证规则)
- 9 个巨型文件全部 ≤500 行,49 个重复组件全部删除
|
2026-07-06 20:57:14 +08:00 |
|
SpecialX
|
fa68ec0b34
|
refactor(lesson-preparation,ai,dashboard): 组件化重构第 3 批 - 高风险模块
- lesson-preparation: 拆分 lesson-plan-editor (594→273),新增 toolbar/dialogs/publish-button 子组件 + 持久化 Hook
- ai: 拆分 ai-chat-panel (417→218),新增 messages/input 子组件,保持流式响应状态稳定
- dashboard: 新增 DashboardShell 布局壳,4 个角色 dashboard 统一使用
- 删除 6 个重复组件(filters/skeletons/error-boundaries)
- tsc 零错误
|
2026-07-06 20:49:54 +08:00 |
|
SpecialX
|
025d4de50d
|
refactor(homework,exams,textbooks): 组件化重构第 2 批 - 中风险模块
- homework: 拆分 take-view (428→330) + grading-view (507→170),新增 4 个子组件
- exams: 拆分 exam-assembly (467→268),新增 3 个子组件 + 1 个工具模块
- textbooks: 拆分 textbook-reader (458→291) + knowledge-graph-inner (411→267),新增 4 个子组件
- textbooks: 删除同名 section-error-boundary.tsx,改用 shared 层
- 删除 3 个重复 filter 组件,迁移到底座
- tsc 零错误
|
2026-07-06 19:54:39 +08:00 |
|
SpecialX
|
19a05091d3
|
refactor(grades,attendance,error-book,elective): 组件化重构第 1 批 - 低风险模块
- grades: 拆分 batch-grade-entry (457→374) + grade-record-list (523→231),新增 4 个子组件
- attendance: 迁移 stats-cards/filters 到 StatsGrid/FilterBar 底座
- error-book: 迁移 stats-cards/filters 到 StatsGrid/FilterBar 底座
- elective: 迁移 stats-cards/filters 到 StatsGrid/FilterBar 底座
- 删除 12 个重复组件,新增 app 层 filter 组件就近放置
- tsc 零错误,lint 无新增错误
|
2026-07-06 19:01:57 +08:00 |
|
SpecialX
|
11ddc8ccbe
|
feat(shared): 组件化重构 Phase 1 - 底座收敛与补全
- 新增 ErrorBoundary 基础类组件 (ui/error-boundary.tsx)
- 新增 StatsGrid 容器 (ui/stats-grid.tsx)
- 扩展 Skeleton 新增 SkeletonCard variant
- 收敛 SectionErrorBoundary/RouteErrorBoundary/WidgetBoundary 为 ErrorBoundary preset
|
2026-07-06 18:00:08 +08:00 |
|
SpecialX
|
80d98e13e4
|
docs(plan): 组件化重构专项实施计划 v1
|
2026-07-06 17:49:14 +08:00 |
|
SpecialX
|
ef2040edf4
|
docs(spec): 组件化重构专项设计文档 v1
|
2026-07-06 17:44:15 +08:00 |
|
SpecialX
|
1a34d1f14e
|
ci(perf): 添加 Lighthouse CI 性能预算回归门槛配置
Phase 2 性能预算重构配套 CI:每次 PR 与每日凌晨 3 点对 /login 路由采样 3 次(desktop preset),断言 LCP <= 3000ms、CLS <= 0.1(error 级),FCP/TBT/INP 为 warn 级。失败时阻断合并并触发性能预算审计报告基线复核。
|
2026-07-06 15:58:49 +08:00 |
|
SpecialX
|
9ce8d6d3fd
|
refactor(data-access): 补全剩余 37 个 data-access 文件迁移至 cacheFn
迁移范围:lesson-preparation 11 文件、attendance 3 文件、settings 4 文件、classes-invitations、跨模块接口 4 文件、adaptive-practice/ai/onboarding/invitation-codes/search/standards/scheduling/leave-requests/audit。修复 3 个 cacheFn 块位置错误。同步架构文档迁移范围至 83 文件 250+ 函数。
|
2026-07-06 15:12:30 +08:00 |
|
SpecialX
|
22c2e6459d
|
refactor(eslint): 移除缓存策略临时豁免(所有模块已迁移至 invalidateFor)
|
2026-07-05 22:55:50 +08:00 |
|
SpecialX
|
8fff820e1d
|
refactor(actions): 组 C 模块迁移至 invalidateFor(lesson-preparation/elective/announcements/messaging/notifications/settings/rbac)
|
2026-07-05 22:53:26 +08:00 |
|
SpecialX
|
7cfd85d0f5
|
refactor(actions): 组 B 模块迁移至 invalidateFor(exams/grades/homework/attendance/leave-requests/diagnostic/error-book/adaptive-practice)
|
2026-07-05 22:44:38 +08:00 |
|
SpecialX
|
05e68a3dad
|
refactor(actions): 组 A 模块迁移至 invalidateFor(users/school/textbooks/questions/course-plans/standards/scheduling/audit/onboarding/invitation-codes/proctoring/i18n)
|
2026-07-05 22:43:08 +08:00 |
|
SpecialX
|
0f33484bd2
|
fix(questions): 完成 questions/data-access.ts 遗漏的 cacheFn 迁移
|
2026-07-05 22:27:07 +08:00 |
|
SpecialX
|
841b130f4c
|
fix(data-access): 修复 tsc 错误 + 完成 adaptive-practice/elective 迁移至 cacheFn
|
2026-07-05 22:24:56 +08:00 |
|
SpecialX
|
27374d1b2c
|
refactor(data-access): 组 A 模块迁移至 cacheFn(users/school/rbac/textbooks/questions/course-plans/standards/files/dashboard/parent/proctoring)
|
2026-07-05 21:56:18 +08:00 |
|
SpecialX
|
6dee6b6299
|
refactor(data-access): 组 C 模块迁移至 cacheFn(lesson-preparation/elective/announcements/messaging/notifications/audit/onboarding/invitation-codes/scheduling/settings)
|
2026-07-05 21:49:18 +08:00 |
|
SpecialX
|
cb5b92160c
|
feat(cache): 扩充 INVALIDATION_MAP 覆盖剩余 27 个模块
为 i18n、adaptive-practice、announcements、attendance、audit、course-plans、
diagnostic、elective、error-book、exams、grades、homework、invitation-codes、
leave-requests、lesson-preparation、messaging、notifications、onboarding、
proctoring、questions、rbac、scheduling、school、settings、standards、
textbooks、users 共 27 个模块登记写操作的失效副作用(tags/queryKeys/paths),
便于后续 actions 文件迁移调用 invalidateFor(actionId)。
- 新增 195 个 actionId(含 create/update/delete 基础动作及 batch/import/
appeal/draft/lock/template/formative/comment/substitute 等特殊写操作)
- tags 采用模块级粒度 ["{module}"],简化迁移
- paths 从原 revalidatePath 调用中提取,动态段用父路径覆盖
- 同步扩充 CLIENT_INVALIDATION_MAP(仅 queryKeys 子集)
- 保持 classes 部分(已有)不变
- 通过 npx tsc --noEmit 与 eslint 零错误验证
|
2026-07-05 21:28:40 +08:00 |
|
SpecialX
|
99f15ee37a
|
docs(architecture): 同步缓存基础设施 + classes 标杆迁移 + 缓存策略规则
- 004: 补全 shared/lib/cache 9 文件说明(types/memory-store/redis-store/store-factory/cache-fn/invalidation-map/client-invalidation-map/invalidate/index)+ shared/lib/redis-client + shared/lib/query-keys
- 005: shared.lib.exports.functions 补 5 个节点(MemoryCacheStore / RedisCacheStore / CLIENT_INVALIDATION_MAP / getRedisClient / queryKeys)
- known-issues.md 新增「二十四、缓存策略规则」章节,含 14 条规则表与涉及文件清单
|
2026-07-05 19:04:03 +08:00 |
|
SpecialX
|
a3dc22cb9e
|
refactor(classes): 客户端组件迁移至 useQuery + queryKeys 示范
Task 19: 将 class-invitation-manager.tsx 从 initialCodes prop + 本地 codes state +
手动 Action 调用 + 手动 state 更新模式,迁移至 V5 缓存策略新 API:
- 列表查询: useActionQuery + queryKeys.classes.invitations(classId)
- 撤销 mutation: useActionMutation + actionId "classes.invitation.revoke"
(成功后由 CLIENT_INVALIDATION_MAP 自动失效 ["classes", "invitations"] 前缀)
- 生成回调: queryClient.invalidateQueries 手动失效本班级 invitations 查询
- 移除 initialCodes prop + codes state + isSubmitting 手动管理
配套改动:
- actions-invitations.ts: 新增并导出 ClassInvitationCodeOption 强类型接口,
listClassInvitationCodesAction 返回类型从 Array<Record<string, unknown>>
收窄为 ClassInvitationCodeOption[]
- actions.ts barrel: 补充 type ClassInvitationCodeOption 与遗漏的
bulkEnrollStudentsAction / bulkAssignSubjectTeachersAction 导出
- 架构文档 004/005 同步更新 hook 消费方与 actions.ts exports 清单
|
2026-07-05 18:57:10 +08:00 |
|
SpecialX
|
9eb02807a4
|
feat(eslint): 新增缓存策略规则禁止直接调用 revalidatePath/revalidateTag
|
2026-07-05 18:44:07 +08:00 |
|
SpecialX
|
80dd67780c
|
refactor(classes): actions 迁移至 invalidateFor 集中编排
|
2026-07-05 18:38:58 +08:00 |
|
SpecialX
|
220d702b44
|
refactor(classes): data-access 迁移至 cacheFn + 双导出 raw 版本
|
2026-07-05 18:27:32 +08:00 |
|
SpecialX
|
dd7a49504f
|
refactor(hooks): useActionQuery/useActionMutation 接入 QueryClient + 向后兼容
- useActionQuery 新增 queryKey 入参模式:传入 queryKey 走 useQuery 跨页共享缓存;不传回退旧 useEffect + useState 模式。Hook 内部始终声明 useQuery/useState/useEffect 以遵守 React Hooks 规则,通过 isCacheMode 切换启用状态
- useActionMutation 新增 mutationFn + actionId 模式:成功后按 CLIENT_INVALIDATION_MAP[actionId] 自动 invalidateQueries;mutate(action?) 参数可选
- toast 替换为 notify(行为等价,便于未来替换 toast 库)
- 同步更新 004/005 架构文档签名说明
|
2026-07-05 18:15:58 +08:00 |
|
SpecialX
|
0f9d8825e7
|
docs(cache): 同步 cacheFn 架构图与已知问题速查
|
2026-07-05 18:07:18 +08:00 |
|
SpecialX
|
d6227d6e6c
|
feat(cache): 实现 cacheFn 双层包装(react.cache + cacheStore)
|
2026-07-05 18:07:11 +08:00 |
|
SpecialX
|
92913a728f
|
feat(cache): 实现 invalidateFor 三步编排函数
|
2026-07-05 18:00:09 +08:00 |
|