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 |
|
SpecialX
|
e510f191c9
|
feat(cache): 新增 query-keys.ts 工厂(classes 模块)
|
2026-07-05 17:56:04 +08:00 |
|
SpecialX
|
2d49f1bad8
|
feat(cache): 新增 index.ts 公共 API 聚合导出
|
2026-07-05 17:55:58 +08:00 |
|
SpecialX
|
6baa60b2a1
|
feat(cache): 新增 INVALIDATION_MAP 集中式失效映射表(classes 模块)
|
2026-07-05 17:52:41 +08:00 |
|
SpecialX
|
13409e55f1
|
feat(cache): 新增 store-factory(CACHE_DRIVER 切换)
|
2026-07-05 17:52:24 +08:00 |
|
SpecialX
|
1756ac21a8
|
feat(cache): 新增客户端失效映射子集(queryKeys only)
|
2026-07-05 17:52:19 +08:00 |
|
SpecialX
|
0058b0b311
|
feat(cache): 实现 MemoryCacheStore(LRU + TTL + tag 索引)
|
2026-07-05 17:49:51 +08:00 |
|
SpecialX
|
4174cd61d7
|
feat(cache): 实现 RedisCacheStore(多实例 + tag 索引 + fail-open)
|
2026-07-05 17:45:02 +08:00 |
|
SpecialX
|
44f997bad7
|
refactor(redis): 抽出共享 Redis 客户端单例至 shared/lib/redis-client.ts
|
2026-07-05 17:40:45 +08:00 |
|
SpecialX
|
fcf89dfb2c
|
feat(cache): 新增 cache/types.ts 类型定义
|
2026-07-05 17:35:17 +08:00 |
|
SpecialX
|
bc03275262
|
refactor(cache): 提升 upstash-modules 类型声明至 shared/lib
|
2026-07-05 17:33:31 +08:00 |
|
SpecialX
|
16ffd44161
|
feat(cache): 新增 CACHE_DRIVER 环境变量
|
2026-07-05 17:32:01 +08:00 |
|
SpecialX
|
be31da6223
|
docs(cache): 缓存策略落地实施计划 + 修正 INVALIDATION_MAP 占位符一致性
|
2026-07-05 01:37:15 +08:00 |
|
SpecialX
|
8afd7af6dc
|
docs(cache): 缓存策略落地专项设计文档 v1 - 全栈缓存策略一致性(服务端数据缓存+客户端 TanStack Query+失效编排)
|
2026-07-05 01:30:59 +08:00 |
|
SpecialX
|
9ec1be1528
|
fix(design-tokens): 补充 semantic-dark.css 缺失的 --radius 令牌
审查发现 semantic-light.css 定义了 --radius 但 semantic-dark.css 缺失,导致明暗不对称。补充 --radius: 0.5rem 与 :root 一致。
|
2026-07-05 01:09:36 +08:00 |
|
SpecialX
|
214ebec976
|
refactor(design-tokens): 全量体系化重建设计令牌
Primitive + Semantic 双层令牌架构,HEX->HSL,明暗双份,@theme inline 暴露为 Tailwind 类。
- 新建 src/app/styles/tokens/ 6 个令牌文件(primitive/semantic-light/semantic-dark/lesson-preparation/tailwind-theme/index)
- globals.css 改为 @import 引入,477->258 行
- 清理 91 处 #hex 硬编码颜色 -> hsl(var(--*))
- 清理 10 处硬编码字体 -> var(--font-family-*)
- 清理 100 文件 Tailwind 任意值(Tier 1 映射/Tier 3 注释豁免)
- 清理 M3 Surface 死代码,升级 --lp-* 令牌(HEX->HSL + 暗色补全)
- 新建 ESLint 自定义规则 no-hardcoded-design-tokens(单词边界正则)
- eslint.config.mjs 新增 no-restricted-syntax 禁止 #hex + 自定义规则加载(pathToFileURL)
- 项目规则新增设计令牌规范强制章节
- 架构图 004/005 同步设计令牌体系节点
- known-issues.md 追加设计令牌问题分类(7 个规则表)
验证: tsc --noEmit 0 errors, npm run lint 0 errors/12 warnings(均为既有问题)
|
2026-07-05 01:03:19 +08:00 |
|
SpecialX
|
d1ad7a1f75
|
docs(architecture): update impact map, data, troubleshooting, add mockups
Security / deep-security-scan (push) Failing after 2m10s
DR Drill / dr-drill (push) Failing after 1m32s
CI / scheduled-backup (push) Failing after 31s
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
- Update 004_architecture_impact_map.md and 005_architecture_data.json
- Remove obsolete _update_004.cjs helper script
- Update troubleshooting/known-issues.md
- Add docs/mockups/ directory
|
2026-07-04 23:02:14 +08:00 |
|
SpecialX
|
e962b67050
|
feat(lesson-preparation): update paper-editor, detail-panel, AI node assist, i18n
- Update actions-ai.ts and curriculum-map-view.tsx
- Update detail-panel: detail-panel, detail-props, qa-editor
- Update paper-editor: inline-node, inline-qa-dialog, paper-context-menu,
paper-editor, textbook-tiptap-editor
- Update hooks/editor-slice.ts and lib/i18n-errors.ts
- Add hooks/use-node-ai-assist.ts and lib/ai-node-assist.ts
- Update en/zh-CN lesson-preparation i18n messages
|
2026-07-04 23:02:04 +08:00 |
|
SpecialX
|
0780524c08
|
docs(troubleshooting): V4 备课编辑器规则
新增 V4 备课编辑器(纸感重构)规则表,8 条规则:正文节点必须是 Tiptap 编辑器、锚点用 Tiptap Mark 内嵌、节点展开位置由 order 决定、节点类型色点用 --lp-dot-*、文档版本必须是 4、师生交互节点用 QaEditor、右键菜单触发对象区分、v3 锚点迁移失效提示。
|
2026-07-04 12:01:06 +08:00 |
|
SpecialX
|
5ca2a76e3a
|
docs(architecture): V4 纸感重构架构图同步
004_architecture_impact_map.md: 更新 lesson-preparation 章节描述(V4 三栏布局)、新增 V4 纸感重构架构变更章节(H1/I1/J1/J2/J3/J4/J5 + 数据模型 v4)、更新文件清单(移除 9 个废弃文件,新增 paper-editor/structure-tree/detail-panel/interaction-block/anchor-migration-banner 等组件 + anchor-mark/export lib + history/expanded slices)。
005_architecture_data.json: 更新 lesson_preparation 节点——description 改为 V4 描述、dependencies 移除 @xyflow/react 改为 @tiptap/* 包、files 数组移除 9 个废弃文件并新增 V4 组件、auditFixes 新增 V4-PAPER-1~8 + V4-PAPER-DOC 条目。JSON 语法验证通过。
|
2026-07-04 11:59:39 +08:00 |
|
SpecialX
|
0e4eccec21
|
chore(lesson-preparation): V4 lint + tsc 零错误验证
重构 anchor-migration-banner:使用 key-based remount + lazy initial state 避免 setState in effect,符合 V4 react-hooks/set-state-in-effect 规则。
验证:tsc --noEmit 0 错误;lint 中 V4 引入的错误已全部修复。剩余 6 个 lint 错误为预存无关模块问题(exams/use-exam-preview-tasks react-hooks/refs 3 个、template-picker V5-9 set-state-in-effect 1 个),13 个 warnings 均为预存代码(schedule-dialog、unread-message-badge 等),按计划要求已有的无关模块错误需记录但不要求修复。
|
2026-07-04 11:53:13 +08:00 |
|
SpecialX
|
e762490f19
|
refactor(lesson-preparation): print-view 适配 V4
- export.ts 已使用 order 排序,无画布依赖
- 新增 interaction block 的 flatten 逻辑(设计意图 + 对话轮次)
- 更新文档注释(12 种 Block)
|
2026-07-04 11:47:50 +08:00 |
|
SpecialX
|
5d306dc686
|
refactor(lesson-preparation): 删除废弃的 React Flow 画布和字符串锚点文件
- 删除 node-editor.tsx(React Flow 画布)
- 删除 nodes/lesson-node.tsx、textbook-content-node.tsx、textbook-segments.tsx、anchor-node-selector.tsx
- 删除 lib/anchor-injector.ts(字符串偏移系统)
- 删除 lib/rf-mappers.ts(React Flow 映射)
- 删除 lib/auto-layout.ts(自动布局)
- 重构 lesson-plan-readonly-view.tsx 改用线性视图(LessonPlanMobileView)
|
2026-07-04 11:46:31 +08:00 |
|
SpecialX
|
124ed97060
|
refactor(lesson-preparation): 主编辑器三栏布局(结构树 + 纸 + 详情面板)
- 移除 NodeEditor/NodeEditPanel 导入和 JSX
- 改为 StructureTree + PaperEditor + DetailPanel 三栏布局
- 新增 AnchorMigrationBanner
- 移除 aiContentGenerator prop(V4 DetailPanel 自带 AI 按钮)
- 删除 node-edit-panel.tsx(不再被引用)
- 删除 ai-content-generator-slot.tsx(依赖 node-edit-panel)
|
2026-07-04 11:44:26 +08:00 |
|
SpecialX
|
e29f30d278
|
feat(lesson-preparation): v3 锚点失效提示 banner
|
2026-07-04 11:41:24 +08:00 |
|
SpecialX
|
6dd3b1fecd
|
feat(lesson-preparation): 注册 interaction block 到 registry
|
2026-07-04 11:40:46 +08:00 |
|
SpecialX
|
85121c49a3
|
fix(lesson-preparation): 重命名 TreeNodeRow.children prop 为 childItems 避免 react/no-children-prop
|
2026-07-04 11:36:41 +08:00 |
|
SpecialX
|
8ff14fce1c
|
feat(lesson-preparation): 右栏详情面板容器
|
2026-07-04 11:33:03 +08:00 |
|
SpecialX
|
24b8ae78c6
|
feat(lesson-preparation): 师生交互 block(详情编辑入口)
|
2026-07-04 11:32:58 +08:00 |
|
SpecialX
|
43f30f4013
|
feat(lesson-preparation): 师生交互编辑器(对话轮次增删改)
|
2026-07-04 11:32:54 +08:00 |
|