wangdl
def8c4c93a
fix: all iOS compile errors - protocols, missing fields, colors, shadowed max
...
- Protocol conformance: list→listAll with extension defaults
- ContinueLearningResponse has no lastPosition→use nil
- LearningSession has no readingTargetType/materialId→use defaults
- Color.zxBlue→Color.blue, Color.zxIndigo→Color.indigo
- Shadowed max parameter→Swift.max
- ForEach Identifiable→explicit id: \.id
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-18 17:14:34 +08:00
wangdl
de384dc027
test: fill iOS coverage gaps - fromBlockScroll, refresh, View helpers
...
- fromBlockScroll: success + empty/negative/OOB guard tests (4)
- StudyHomeViewModel.refresh: stats update + mainAction update (2)
- View helpers: statusLabel(4) + formatSeconds(7) standalone tests
- formatFileSize smoke test (indirect via View init)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-18 13:44:54 +08:00
wangdl
c7de97279b
test: add P1-fallback + refresh tests for StudyHomeViewModel
...
- P1 fallback: continueService throws → falls to unfinished session
- refresh: updates stats without setting loadingState
- Fix: remove nonexistent materialId/readingTargetType from LearningSession mock
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-18 13:25:41 +08:00
wangdl
9ec6fdc3d5
test: add StudyHomeViewModel unit tests with DI (IOS-INFO-037)
...
- Add 6 service protocols (SessionServicing, ReviewServicing,
KBListServicing, QuizListServicing, ActivityHomeServicing,
ContinueLearningServicing)
- ViewModel init supports DI with defaults to .shared
- 16 tests: initial state, loadAll stats, all 5 priority levels
(continueSession→todaysReview→selfTest→startLearning→empty),
banner, weekly stats from summary/streak
- Priority P1 continueSession tested with mock API + temp file
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-18 13:23:08 +08:00
7066200b7b
feat: MVVM 架构、全套 UI 页面、浅深色主题、本地持久化、等待名单、AI 动效
...
- 架构层:ViewModel/ObservableObject、Service/Repository、网络层 APIClient/APIEndpoint/APIError
- 设计系统:Color(light:dark:) 自适应 28 色 Token、ColorSchemeManager 深浅色切换
- 全页面:AI 对话/反馈/回忆/薄弱点、知识库 CRUD、学习工作台、复习计划、学习分析、个人中心/设置
- 登录与引导:Sign in with Apple、AppSession 状态管理、引导流程、演示模式
- 本地持久化:FileCache + PersistenceController(学习任务/复习任务/学习记录)
- 本地化:zh-Hans Localizable.strings ~120 条、ZXStrings 程序化引用、LanguageManager
- 组件库:ZXTabBar/ZXBackHeader/ZXSTaskRow/ZXChartView/ZXTypingIndicator 等 22 个共享组件
- 等待名单:WaitlistView 邮箱收集表单
- 动效:ZXTypingIndicator AI 打字动画、ZXShimmerModifier 骨架屏
- 测试:StudyHomeViewModel/AIChatViewModel/ReviewPlanViewModel/FileCache 共 28 条
- Dynamic Type 支持 + 范围限制
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 22:22:50 +08:00