fix: preserve queued settings and recover interrupted or corrupt state
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
## 已验证
|
||||
|
||||
- `flutter analyze`:No issues found。
|
||||
- `flutter test`:51 项通过,包括 11 节时间、上海时区和非周一开始日、不连续周次、导入拒绝保留原课表、存储损坏恢复、示例隔离、通知去重和权限降级、日历中断恢复与归属检查、200% 字体和重叠课程、通知点击详情。
|
||||
- `flutter test`:58 项通过,包括 11 节时间、上海时区和非周一开始日、不连续周次、导入拒绝保留原课表、存储损坏恢复、示例隔离、通知去重和权限降级、日历中断恢复与归属检查、200% 字体和重叠课程、通知点击详情。
|
||||
- `integration_test/app_flow_test.dart` 在 Android 模拟器通过:两页导航、单色设置、实际日期选择器和学期周数保存、导入预览取消与确认、示例不改真实保存文件、错误导入保持数据、重开恢复。
|
||||
- `integration_test/calendar_bridge_test.dart` 在专用 Hepan_Integration_Test 日历通过:创建、再次同步更新同一 ID、映射丢失后找回、错误 key 无法删除、删除自有事件。设备实际查询表明 Unrelated_fixture 事件保留,CalendarContract.Reminders 无记录。
|
||||
- 首次真实 APK 构建、安装、启动成功。初次编译下载依赖用时约 695 秒,后续构建约 40 秒。
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
- 模拟器重启后:未重新打开 APP,系统仍送出已安排的测试通知;启动正式 APP 后,空课表协调取消残留自有通知。
|
||||
- 已重建并安装 lib/main.dart 正式入口 APK,核实包名、0.1.0+1、API 24/36 和三种 Android 架构。示例课表、我的、周日、末节、设置和 200% 字体已有设备截图;验证 APK 不包含测试入口。
|
||||
- 独立代码审查进行中,结论另记。
|
||||
- 已完成一次独立代码审查:无 Critical/Minor,三项 Important 均用回归测试修复。58 项测试全通过,未进行重复审查。
|
||||
|
||||
## 仍需本人手机验证
|
||||
|
||||
@@ -30,3 +30,6 @@
|
||||
|
||||
通知初始化暂时失败后可重试,日历服务异常在设置中解释并保持未启用。首次同步中断、尚无保存 ID 时,通过选定日历的专属标记恢复清理;清理失败持久保存待重试状态。
|
||||
|
||||
补充:系统文件选择器已从 Downloads 选择随附 JSON,正常显示 3 条课程预览和示例来源;飞行模式下正式 APP 重开后页面正常,示例体验未写成真实课程。
|
||||
|
||||
审查修复:设置改为按字段在最新状态上修改;首次日历写入前保存未完成状态,清理成功才允许更换目标;没有可用备份时提供确认恢复入口,真实文件测试验证损坏主文件和备份均先归档。
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# SDD ledger — plan: docs/superpowers/plans/2026-10-12-hepan-everyday-android.md
|
||||
Execution: inline, approved by user. Base: 36d18f0.
|
||||
Pre-flight: Tasks 1→2→3 share domain, snapshot and controller; names consistent.
|
||||
Pre-flight: Tasks 2→4 import drafts; unknown school pages fail closed, demo stays isolated.
|
||||
Pre-flight: Tasks 2→5 NotificationService; permission request separate from reconciliation.
|
||||
Pre-flight: Tasks 2→6 CalendarService; ownership and retry mapping required.
|
||||
Pre-flight: Tasks 3→7 UI/integration; file fixture uses explicit demo flag.
|
||||
Ruling: PowerShell ledger and extracted briefs replace Bash helper scripts — only WSL shim exists and native Windows execution is available — tracking remains equivalent; cost if wrong: missing process record, not product behavior.
|
||||
Task 1: in_progress (base 36d18f0).
|
||||
Task 1: complete (base 36d18f0; RED 7 expected failures; GREEN flutter test 8/8; analyze clean).
|
||||
Task 2: in_progress (base ae8e347).
|
||||
Task 2: complete (RED 13 expected failures; GREEN flutter test 21/21; analyze clean).
|
||||
Task 3: in_progress (base 808af00).
|
||||
Correction: Task 2 analyze had 9 style infos; dart fix applied and Task 3 verifies current analyzer.
|
||||
Ruling: Task 3 emulator visual review is grouped with Task 7 after real platform adapters exist — avoids a production placeholder adapter — cost if wrong: visual issues are found later, before delivery.
|
||||
Task 3: complete (RED navigation 4, overlap 1, recovery 2; GREEN full suite 28/28; device visual deferred to Task 7 by ruling).
|
||||
Task 4: in_progress (base 8a98d49).
|
||||
Task 4: complete (RED unsafe domain/layout 3, concurrent read 1, edge recovery/frame 2; GREEN full suite 34/34; analyze clean. Real authenticated timetable parser remains explicitly pending per spec.)
|
||||
Task 5: in_progress (base ffd3920).
|
||||
Task 5/6: Ruling: native notification and calendar checks consolidated in Task 7 after real startup assembly — avoids temporary production adapters — cost if wrong: native failures found later.
|
||||
Task 6: Ruling: per-event save/delete gateway replaces native syncEvents batch — keeps reconciliation and recovery testable in Dart, native checks ownership for every mutation — cost if wrong: extra platform calls for large terms.
|
||||
Task 5: complete (local notification tests 6 passed, combined suite 48 passed; analyzer clean; native checks deferred by ruling).
|
||||
Task 6: complete (calendar and controller RED witnessed; combined suite 48 passed; analyzer clean; native verification remains Task 7).
|
||||
Correction: previous commit attempts failed due to missing local author identity. Tasks 5 and 6 committed together using existing Codex <codex@local> author; analyzer confirmed No issues found after completion labels.
|
||||
Task 7: in_progress; real startup assembled, startup notification-tap RED→GREEN, initialization retry and calendar UI error RED→GREEN. First actual APK built and installed successfully; native device verification underway.
|
||||
Task 7: complete (51 tests pass; analyze clean; Android UI flow and native calendar integration pass; background notification, tap details, reboot restoration and startup cleanup observed; formal main APK rebuilt and installed, badging verified; review follows).
|
||||
Final: Ruling: updateSettings queues field transformations instead of complete settings values — fixes stale queued values undoing previous choices — cost if wrong: consumers must use the new callback signature.
|
||||
Final: Ruling: real school parser remains conditional on unavailable authenticated fixture — approved spec protects old timetable and explicitly marks pending — cost if wrong: automatic school import is unavailable in this MVP.
|
||||
Final: Ruling: iOS packaging remains deferred — user selected Android first — cost if wrong: cannot install on iPhone yet.
|
||||
Final: Ruling: physical-device power management and cloud calendar marker behavior remain device-validation work — emulator cannot establish those results — cost if wrong: notifications or calendar synchronization may vary on specific phones/accounts.
|
||||
Final review: fresh gpt-6-astra reviewer; no Critical or Minor; three Important findings regraded as Important and fixed in one pass. No re-review required; regression tests govern fix completion.
|
||||
Final: fixed queued whole settings undoing reminder disable — queued distinct-field regression RED→GREEN, suite 58/58.
|
||||
Final: fixed inaccessible partial calendar recovery and destination loss — partial sync/reopen/new calendar regression RED→GREEN; working cleanup button tested, suite 58/58.
|
||||
Final: fixed no-backup corrupt storage lockout — missing/corrupt backup confirmation UI RED→GREEN; real filesystem archive/save tests pass, suite 58/58.
|
||||
Final verification: affected Android app_flow integration rerun passes after review fixes; full suite 58/58 and analyze No issues found.
|
||||
Reference in New Issue
Block a user