Skip to content

fix(reminder): refresh calendar location list after a reminder is confirmed - #368

Merged
LUPENGHAN merged 2 commits into
1024XEngineer:mainfrom
LUPENGHAN:fix/refresh-location-schedules-after-confirm
Aug 24, 2026
Merged

fix(reminder): refresh calendar location list after a reminder is confirmed#368
LUPENGHAN merged 2 commits into
1024XEngineer:mainfrom
LUPENGHAN:fix/refresh-location-schedules-after-confirm

Conversation

@LUPENGHAN

Copy link
Copy Markdown
Contributor

Fixes #367

Summary

  • LocalReminderApplication.confirmInternal 确认提醒时只写本地 SQLite(state.setDisposition + patchRuntime),没有通知日历页重取。
  • 日历页的地点提醒列表走 SqliteScheduleClientService.getLocationSchedules(),是完全独立的一条读取路径,不知道提醒引擎这边发生了写入;之前只有语音写日程会带动 refreshSignal
  • 这次改动给 ReminderApplicationPort 加一个 onScheduleConfirmed 订阅(跟现有的 onPermissionBlocked 是同一种模式),confirmInternal 写完本地状态后触发一次;HomeScreen 订阅它,累加进现有的 refreshSignal,跟语音写日程走同一条重取路径。
  • 只处理 confirm,没有处理 snooze——snoozed 状态不影响地点提醒列表的可见性(只有 confirmed 会被 getLocationSchedules() 过滤掉),改 snooze 没意义。

Test plan

  • 新增 LocalReminderApplication.test.ts 两个用例:confirm() 触发 onScheduleConfirmedregister() 不触发、取消订阅后不再触发。
  • 新增 HomeScreen.test.tsx 用例:reminder.onScheduleConfirmed 触发的监听器被调用后,日历会重新调用 getLocationSchedules
  • npm run lint / npm run typecheck / npm run test(jest 712 + vitest 87)全绿。

🤖 Generated with Claude Code

…firmed

confirm() only wrote the local SQLite disposition state; the calendar
screen reads location schedules through a separate service that never
learned about the change, so a confirmed location reminder stayed
visible until the app restarted. LocalReminderApplication now emits an
onScheduleConfirmed event that HomeScreen folds into its existing
calendar refreshSignal.

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the complete fixed diff for the reminder-confirmation refresh path. The new subscription is wired from confirmInternal after the local disposition/runtime writes and registration teardown, and HomeScreen folds it into the existing refreshSignal, which causes the calendar location query to re-read the now-confirmed row. The interface, unsubscribe behavior, and both integration points are covered by focused tests.

No actionable correctness, reliability, security, or maintainability findings identified.

Verification: git diff --check passed. Automated Jest/typecheck execution was unavailable because this checkout has no executable local node_modules/.bin toolchain (vitest/tsc reported Permission denied).

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

npm run check caught this in CI after the previous commit — the
useEffect arrow-function argument list didn't match Prettier's
formatting.
@LUPENGHAN
LUPENGHAN merged commit 8802ba8 into 1024XEngineer:main Aug 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(reminder): confirming a location reminder doesn't hide it from the calendar until app restart

2 participants