feat: AI course content expansion (40 lessons) + sync/UX/typography fixes#9
Merged
roclee2692 merged 5 commits intoJul 7, 2026
Conversation
… fixes - 课程补齐(采纳 nebula_quick):NLP/CV/RL/LLM 扩至各 10 课节, 全部含理论推导/公式/双语代码/复杂度/知识点对比/随堂测验 - SyncService:mergeProgress 补 attempted 维度合并;新增 flushNow (initSynced 守卫),ProgressContext 内部 pagehide 时冲刷 pending 队列 - RemoteStore:fetchProgress 网络/查询异常返回 null 跳过本次同步, 防止半空快照合并覆盖远端更高测验分;realtime 清理防 unhandled rejection - StepController:拖拽中途卸载时清理 window 监听器(组件内 ref 方案) - AILessonPage/AlgorithmTabs:AI 可视化与笔记模块加错误边界; snapshot key 改用 canonicalLessonId - AlgorithmPage:pathNav 计算 useMemo 化 - 测试:保留原 SyncService 套件并追加 4 用例;curriculum 测试锁定 25 个补齐课节的完整性 拒收项:onyx_quick 的 useCourseProgress 重构(解构不存在的 markComplete 会崩溃且污染算法进度统计)、占位 Playground、 重复的页面级错误边界;mirage/piston 为空交付。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
冲突解决与适配: - StepController:保留双方——本方拖拽监听器卸载清理 + upstream 活跃实例快捷键作用域 - AILessonPage:采用 upstream 按需加载架构(curriculumIndex + loadLesson),保留本方 AIExercise 错误边界 - curriculum.test:双方新增测试全部保留 - SyncService.flushNow 改走 runFlush 串行化入口,避免与 in-flight flush 并发 - chapters/it.js、data/algorithms/it.js:补 .js 扩展名(generate:ai-index 纯 Node 运行必需) - 重新生成 curriculumIndex(10 章 112 课节,含本次补齐的 30 节) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
根因:课节页此前依赖 AppLayout 外层 main 滚动(.music-lesson-shell 是 min-height 可增长的,侧栏 overflow-y-auto 从未生效),而 AppLayout 在 每次路由变化时对外层 main 执行 scrollTo(0,0)——课节间切换把左侧目录 一并拽回顶部(视觉上"跳回机器学习章节")。 修复: - /ai-course/lesson/* 纳入 guide 模式(外层 main 不滚动,页面自管滚动) - 新增 .music-lesson-shell--fit:shell 锁定容器高度,侧栏/正文成为 独立滚动区;手机端为全局底部导航预留安全区 - 换课节时仅正文回顶(useLayoutEffect on canonicalLessonId) - 首次进入(含深链直达)目录自动滚到当前课节居中处,之后完全跟随用户 - CurriculumIndex 当前课节加 data-active 标记供定位 验证:桌面 1440px 下点击目录中相邻课节,目录 scrollTop 保持 2539 不变、 正文回到顶部、高亮正确迁移、控制台零报错;/ai-course 目录页不受影响。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
公式修复:
- llm-mlm 掩码策略公式:\text{} 内未转义的 % 是 KaTeX 注释符,把收尾
大括号全注释掉导致整条公式解析失败原样显示 → 转义为 \%
- llm-sft 数据格式:公式里塞 #(宏参数符)与 \n 非法 → 改为缩进代码块
- 新增 scripts/auditFormulas.mjs:用 KaTeX 严格解析全部 10 章课程数据
的每条公式,防回归(当前 ALL FORMULAS OK)
- 单行 $$...$$ 会被 remark-math 按行内公式渲染(挤在文字流里)——
LessonViewer 渲染入口统一展开为多行块级形式,全站公式获得
katex-display 独立成块排版
排版放宽(用户反馈太紧密):
- .prose-lesson:正文/列表行高 1.75,段距 12→16px,标题上距 24/32px,
表格加垫、公式块上下 20px 呼吸空间
- 根因修复:3061 行的裸 h1-h5/p/a 重置未分层,级联优先级压制一切
@layer 规则(prose 段距、a 上的 text-accent 等全被吞)→ 归入
@layer base;katex.css 同理改由 index.css 以 layer(base) 引入
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
@roclee2692 is attempting to deploy a commit to the Algebra's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
四模型众测择优合并 + 后续修复迭代:
课程补齐
Bug 修复
验证
201 tests passed · eslint clean · build OK · 浏览器实测通过
🤖 Generated with Claude Code