simpl-liste/tests
le king fu 9434cb77ef feat(sync): schedule the reminder of a task received by the pull (#206)
A task created on the companion, or tomorrow by an AI assistant, never rang
on the phone: only src/db/repository/tasks.ts scheduled or cancelled
reminders, and applyTaskChange wrote the pulled row without touching them.
A task completed or deleted elsewhere kept its reminder.

- syncRules.ts: reminderPlan(action, task), pure and import-free, returns
  'schedule' for an open task with a due date, 'cancel' for a completed
  task, a task without a due date or a deletion.
- syncClient.ts: applyTaskChange executes the plan after its local write,
  through scheduleTaskReminder and cancelTaskReminder, awaited and with
  their errors swallowed as in the task repository. A deletion now falls
  through to the reminder instead of returning early; a row kept by
  keepLocal still returns before any call.
- tests/syncRules.test.mjs: the cases of reminderPlan.
- tests/smoke.test.cjs: wiring of applyTaskChange, checked by reading the
  source (syncClient.ts does not load under node).
- web/src/test/sync: the notifications stub records the calls of each
  device, and a ninth scenario covers the reminder scheduled on receipt,
  cancelled once the task is completed or deleted elsewhere, and untouched
  for a row kept by keepLocal.

No dependency added, no new host, version and versionCode unchanged.

Refs #206

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 18:28:30 -05:00
..
feedback.test.mjs feat(feedback): integrate Feedback Hub widget in Settings (#68) 2026-07-27 19:43:12 -04:00
hydration.test.mjs fix(sync): bound the wait on the persisted settings before the inbox repair 2026-10-25 20:35:06 -04:00
smoke.test.cjs feat(sync): schedule the reminder of a task received by the pull (#206) 2026-11-14 18:28:30 -05:00
syncRules.test.mjs feat(sync): schedule the reminder of a task received by the pull (#206) 2026-11-14 18:28:30 -05:00
syncSchedule.test.mjs Merge branch 'issue-178-sync-scheduler' into issue-165-account-switch 2026-11-03 20:41:37 -05:00
syncSocket.test.mjs test(sync): pin the canSync check after the ticket and the timer cleanup on stop (#175) 2026-11-08 15:35:45 +00:00