feat(reminder): wire device adapters and SQLite data layer - #260
Closed
LUPENGHAN wants to merge 4 commits into
Closed
feat(reminder): wire device adapters and SQLite data layer#260LUPENGHAN wants to merge 4 commits into
LUPENGHAN wants to merge 4 commits into
Conversation
Native Android modules for the reminder engine's device layer: timeflow-alarm (AlarmManager scheduling, ring UI, boot rescheduling) and timeflow-baidu-location (continuous positioning bridge). Includes the Expo config plugins that wire them into the native build, app.config.js (replaces static app.json so the Baidu API key can come from an env var), and the new package deps/patches these modules need. No app code references these yet -- pure addition, nothing wired in.
Three unrelated bugs in the already-merged voice/location-search path (PR 1024XEngineer#243), fixed together since they're small and independent of the reminder engine work in this stack: - reuse a recent position during voice handshake instead of blocking on a fresh fix (backend location tools + realtime agent) - preserve newly-started TTS after an interruption instead of letting the old stream clobber it - remove stale push-to-talk listeners left on the shared WebSocket connection after a session ends
LocalReminderApplication and its ports (AlarmSchedulerPort, LocationMonitorPort, DeviceCapabilityPort, NotificationChannels, ReminderDeliveryPort, ReminderApplicationPort), plus the domain layer (reminder.ts, strengthDelivery.ts) that drives arm/fire/confirm state transitions and recurring-schedule advancement. Pure logic layer: no device-specific adapters yet, nothing wired into the app. shared/time gains format.ts (used by the delivery strength calc); MockClock/MockTimeListener are removed since nothing in this stack still needs a fake clock once the real engine lands.
Device-side adapters implementing the ports added in the previous commit: ExpoAudioPlayback, ExpoSystemNotification, NativeAlarmScheduler (+ TimeflowAlarmBridge), NativeDeviceCapability, ReactNativeAlertDialog, ReactNativeVibration, ExpoLocationMonitor (system geofencing) + NativeLocationMonitor (Baidu continuous polling, not currently wired into the app -- see createAppServices comment in a later commit), IntervalTimeListener. frontend/index.ts registers the geofence TaskManager task at module scope so headless launches pick it up. Data layer: SqliteLocalScheduleReader / SqliteReminderStateStore read and persist against the real local database instead of in-memory fixtures; LocalScheduleWriter's post-write refresh hooks into the new reader. InMemoryLocalScheduleReader is kept as a non-persisted alternative implementation of the same port. Removes the Mock* adapters these replace. Also removes two dangling test files (nativeAlarmScheduler.test.ts, nativeDeviceCapability.test.ts) that were written against the old mock-backed versions of these classes and don't apply to the real implementations -- this is a real coverage gap, not covered by a replacement here.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Aug 17, 2026
Contributor
Author
|
拆分粒度还是太粗(这个都还有 55 个文件改动),先撤回去重新想怎么拆,关掉这个。 |
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.
Closes #256
拆分 #245 的第 3/4 层:设备适配器 + SQLite 数据层,依赖 #259(提醒引擎核心)先合。
标了 draft:分支历史包含 #258/#259 还没合的提交,diff 会显示三层加起来的内容,等前面两个合了再转 ready。
范围
ExpoAudioPlayback、ExpoSystemNotification、NativeAlarmScheduler/TimeflowAlarmBridge、NativeDeviceCapability、ReactNativeAlertDialog、ReactNativeVibrationExpoLocationMonitor(当前实际接入)+NativeLocationMonitor(百度 SDK,仓库里有但暂未接线)+geofenceTaskIntervalTimeListener;frontend/index.ts注册 geofence headless taskSqliteLocalScheduleReader、SqliteReminderStateStore、LocalReminderAdapters、InMemoryLocalScheduleReadernativeAlarmScheduler.test.ts/nativeDeviceCapability.test.ts两个旧 mock 版测试在原来的合并里被删掉、没补新的,这个 PR 没有顺手补,先如实记录(见 #256)。拆分顺序