feat(reminder): add native alarm scheduler adapter - #207
Conversation
Introduce TimeflowAlarmBridge and NativeAlarmScheduler, and wire the composition root alarms port to the native Android scheduler.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Return AlarmScheduleReceipt.scheduled, map native schedule rejections to unscheduled, and propagate the native cancel boolean instead of always reporting success.
|
@fennoai /review |
Review CompleteNo additional actionable findings in the pinned
|
There was a problem hiding this comment.
Reviewed the pinned diff through code quality, performance, security, and documentation passes. The previously reported scheduling/cancellation contract issues are resolved in ef37d59; no additional actionable findings remain.
Verification: npm ci and npm run check (lint, formatting, typecheck, 58 tests) passed.
…e-alarm Keep NativeAlarmScheduler wiring while adopting the auth runtime composition from 1024XEngineer#218.
|
【过程规范 / 阻塞合并】该 PR 没有关联对应的 Issue:描述中只有前后 PR 的合并顺序, |
|
【测试要求 / 阻塞合并】本 PR 新增 |
Wintercom
left a comment
There was a problem hiding this comment.
按 git_rules.txt 的 PR 合并标准审查后,请先解决以下两项再合并:
- PR 未关联对应 Issue,缺少从需求、目标和验收标准到改动的可追溯关系。
- 新增原生闹钟桥接与调度适配器没有新增测试,现有 CI 通过不足以验证新增分支和失败降级行为。
具体要求已逐条评论。代码层面,先前 review 指出的 schedule/cancel 结果契约问题已在 ef37d59 修复;本轮未重复评论已修复事项。
@Wintercom 已关联对应 Issue。 已在源头仓库建立 #227(含背景、目标、非目标与验收标准,Related to #161),并挂到 milestone |
@Wintercom Fixed in baa5504: 补充 单测 mock 了 |
Summary
TimeflowAlarmBridge:封装 AndroidTimeflowAlarmNativeModules 调用(调度/取消/权限状态与设置页跳转)NativeAlarmScheduler,实现AlarmSchedulerPort;模块不可用、权限不足、非法/过期时间或原生 reject 时返回scheduled: falsecreateAppServices将alarms从MockAlarmScheduler切换为NativeAlarmSchedulerNativeAlarmSchedulerPlatform、NativeModules.TimeflowAlarm与系统时间Merge Order
Scope
frontend/src/infrastructure/notifications/native/TimeflowAlarmBridge.tsfrontend/src/infrastructure/notifications/NativeAlarmScheduler.tsfrontend/src/infrastructure/notifications/index.tsfrontend/src/app/composition/createAppServices.ts(仅 alarms 接线)frontend/tests/unit/infrastructure/notifications/nativeAlarmScheduler.test.tsOut of scope
timeflow-alarm模块本体与 Expo config plugin(后续原生模块 PR)NativeDeviceCapability/ 启动权限 hook(见 feat(reminder): add native device capability and permission hook #208)LocalReminderApplication接线与AlarmScheduleReceipt.scheduled对齐(见 feat(reminder): add LocalReminderApplication and memory state store #199 及后续)Verification
npm run checknpm ciCloses #227