585 Commits

Author SHA1 Message Date
69b243c09b adjust the bundleSizeBudget, which was too low for electron 2026-06-22 12:55:22 -06:00
ea29219dc2 fix some scheduling references that we broken, one for androis and one for ios 2026-06-22 12:47:26 -06:00
d8715340c0 add doc note when including this library directly 2026-06-22 12:15:34 -06:00
b347206800 consolidate to single 'doc' directory 2026-06-19 23:20:11 -06:00
7c0cb59bfa fix problem on android with continued notifications even when it was turned off 2026-06-19 23:18:53 -06:00
Jose Olarte III
5703d2a1e3 chore(release): release 4.0.1 with iOS Daily Reminder identifier separation 2026-06-09 19:30:05 +08:00
Jose Olarte III
9e81c89471 fix(ios): separate Daily Reminder identifiers from api_ namespace
Daily Reminders now use daily_<reminderId> for UNNotificationCenter
requests instead of sharing api_<epochMillis> with batch API notifications.
clearApiNotifications no longer removes new daily reminders.

Add legacy api_* cleanup on schedule/cancel/update and transitional
getScheduledReminders matching via stored predictiveEpochMillis.
Update TypeScript JSDoc for iOS identifier families.
2026-06-09 19:15:16 +08:00
Jose Olarte III
6e017aad09 chore(release): release 4.0.0 with API batch notification method names
Bump to 4.0.0 for the breaking rename to scheduleApiNotifications and
clearApiNotifications. Scheduling behavior and api_ identifiers are unchanged.
2026-06-09 18:11:24 +08:00
Jose Olarte III
d4da7256a5 feat!: rename batch APIs to scheduleApiNotifications and clearApiNotifications
BREAKING CHANGE: Replaces scheduleNotifications, clearPredictiveNotifications,
and iOS clearAllNotifications. Behavior and api_ IDs unchanged.
2026-06-09 18:10:14 +08:00
Jose Olarte III
6de300b7d4 chore(release): release 3.0.4 with Android batch APIs and api_ ID namespace 2026-06-09 17:28:53 +08:00
Jose Olarte III
ceaa4ada66 refactor: rename internal notification ID prefix from predictive_ to api_ 2026-06-09 17:27:15 +08:00
Jose Olarte III
eca2bbf947 feat(android): schedule batch notifications with predictive_<epochMillis> IDs
Add scheduleNotifications so Android predictive scheduling matches
clearPredictiveNotifications and iOS batch API behavior.
2026-06-08 19:28:12 +08:00
Jose Olarte III
fc5b4cd9fa feat(android): add clearPredictiveNotifications for predictive_* schedules only
Lets the app refresh API/predictive notifications without cancelAllNotifications
disabling Daily Reminders, dual schedules, or fetch jobs.
2026-06-08 18:45:11 +08:00
Jose Olarte III
f82c427108 chore(release): release 3.0.3 with iOS notification diagnostics
Bump to 3.0.3 and add bridge-safe getPendingNotifications,
getDeliveredNotifications, and getNotificationSettings for local
notification debug panels.
2026-05-22 16:48:12 +08:00
Jose Olarte III
7f7d65cae6 feat(ios): add local notification diagnostics for debug panels
Expose bridge-safe pending, delivered, and settings snapshots from
UNUserNotificationCenter so apps can inspect local notification state
without native date objects or large payloads.

- Add getDeliveredNotifications and getNotificationSettings on iOS
- Harden getPendingNotifications with triggerTimestamp/triggerDateIso
- Always resolve with serializable values; omit userInfo from delivered
- Register new Capacitor methods and TypeScript definitions/web stubs
2026-05-21 18:20:29 +08:00
Jose Olarte III
4027bb0c37 docs: document plugin vs backend authentication boundaries
Clarify that the native Daily Notification Plugin does not
authenticate users or call notification-wakeup-service directly.
Authentication belongs in the host app; the plugin only schedules
local notifications and orchestrates host-provided content fetch.

Add docs/security-boundaries.md with responsibility matrix, auth
flow diagram, SPI boundary notes, and a warning against adding backend
auth logic to the plugin layer.
2026-05-20 22:35:13 +08:00
Jose Olarte III
750343ddb9 chore(release): bump plugin to 3.0.2 2026-05-05 19:10:16 +08:00
Jose Olarte III
60a5a30728 refactor(ios): unify predictive IDs to epoch ms and narrow batch APIs
Use predictive_<epochMillis> for reminders (next-occurrence ms), testAlarm
fire time, and scheduleNotifications; persist predictiveEpochMillis in
UserDefaults for cancel/update alignment.

clearAllNotifications removes only predictive_* pending and delivered
entries. scheduleNotifications is additive (no global clear) and skips
past timestamps.
2026-05-05 19:07:43 +08:00
Jose Olarte III
9db381c72b feat(ios): add batch UN notification replace-all API
Expose clearAllNotifications and scheduleNotifications on DailyNotification.
clearAllNotifications clears pending and delivered center notifications.
scheduleNotifications replaces pending requests from epoch-ms timestamps
with deterministic predictive_* IDs and DNP-BATCH logging.
2026-05-05 15:08:12 +08:00
Jose Olarte III
26f1ff0e08 fix(ios): use deterministic predictive notification identifiers
Replace reminder_* and random test alarm IDs with predictive_<Int>
so UNUserNotificationCenter replaces pending requests instead of
stacking. Daily reminders key off local HH:mm; testAlarm uses the
scheduled fire second. Dual notification id unchanged.
2026-05-05 14:53:06 +08:00
a5395082f6 update main README 2026-04-22 16:22:50 -06:00
Jose Olarte III
b6f663121d chore(release): bump to 3.0.1
Set package and lockfile to 3.0.1 and document the Android dual-schedule
empty native fetch fix in CHANGELOG.
2026-04-16 17:07:36 +08:00
Jose Olarte III
5756178c23 fix(android): skip dual notify when native fetch is empty
Dual native prefetch used to map an empty NotificationContent list to
synthetic JSON and still arm the chained notify alarm, which led hosts
such as TimeSafari to show marketing copy via show_default even when the
API had no rows.

Persist {"skipNotification":true} for an empty native result, skip
DualScheduleNotifyScheduler for that successful cycle while still
enqueueing dual fetch recovery, and teach DualScheduleHelper to return
no content for fresh skip payloads and for stale cache when
fallbackBehavior is skip. Add Robolectric tests for DualScheduleHelper
and the skip payload helper.
2026-04-16 17:05:15 +08:00
Jose Olarte III
fbb5a94071 chore(release): v3.0.0 — iOS native fetcher, starred plans, chained dual (iOS + Android)
BREAKING CHANGE (iOS): configureNativeFetcher now requires
DailyNotificationPlugin.registerNativeFetcher(_) first, aligned with Android.

iOS:
- Add NativeNotificationContentFetcher SPI, registry, FetchContext, timeout helper
- Add updateStarredPlans / getStarredPlans; persist daily_notification_timesafari.starredPlanIds
- Chained dual: prefetch only on scheduleDualNotification; arm one-shot UN after fetch
- configureNativeFetcher invokes fetcher.configure; BG fetch prefers registered fetcher
- Public NotificationContent for host implementations

Android:
- Dual notify alarm scheduled after dual FetchWorker completes (DualScheduleNotifyScheduler)
- Persist dual_notify_schedule_id; remove upfront NotifyReceiver for dual setup

Docs: CONSUMING_APP_HANDOFF_IOS_NATIVE_FETCHER_AND_CHAINED_DUAL.md; CHANGELOG 3.0.0
Made-with: Cursor
2026-04-02 16:48:06 +08:00
Jose Olarte III
9121b1e0f7 feat(configureNativeFetcher): optional JWT pool for background native fetch
Add jwtTokens / jwtTokenPoolJson to the TypeScript API, parse and validate
(max 128) on Android and iOS, persist jwtTokenPool with native_fetcher_config
when persistToken is true (Android), and extend NativeNotificationContentFetcher
with a four-argument configure overload delegating to the existing three-arg
default. iOS stores the pool in UserDefaults JSON and uses primary jwt or first
pool entry in the plugin background fetch path. Bump version to 2.2.0. Update
TestNativeFetcher to exercise the new configure overload.
2026-03-27 16:30:31 +08:00
Jose Olarte III
469167a55f feat(android): dual prefetch delay, native fetcher, scoped content cache
- Schedule dual content fetch with WorkManager initialDelay to the next
  contentFetch cron; reschedule from prefs after success and on boot when
  dual_fetch_* exists (DualScheduleFetchRecovery + ReactivationManager).
- When contentFetch has no URL, call NativeNotificationContentFetcher with
  FetchContext (prefetch + next notify time); else keep HTTP/mock behavior.
- Add content_cache.cacheScope (dual|daily|legacy), Room v4 migration,
  getLatestByScope; DualScheduleHelper reads dual only; daily fetch paths
  write daily; NotifyReceiver prefers daily/legacy for legacy cache reads.
- Extract ScheduleCronUtils.calculateNextRunTimeMillis for shared cron math.
- Document in README/CHANGELOG; bump package to 2.1.5.
2026-03-25 18:05:57 +08:00
Jose Olarte III
a5c5a7e74e docs(android): add dual schedule native fetch and cache scope plan
Add ANDROID_DUAL_SCHEDULE_NATIVE_FETCH_AND_CACHE_SCOPE.md describing the
pre-implementation plan: WorkManager initial delay for dual prefetch,
NativeNotificationContentFetcher when URL is absent, and cacheScope on
ContentCache to separate dual vs daily reminder cache rows.
2026-03-25 16:05:20 +08:00
Jose Olarte III
fc1cebd720 chore(release): 2.1.4
Bump package, lockfile, podspec, definitions header, and FetchWorker mock
payload. Changelog section retitled to 2.1.4 (Android dual-schedule JSON
parsing fixes and README notes).
2026-03-20 21:21:52 +08:00
Jose Olarte III
5f12b69d2a fix(android): parse optional userNotification fields for dual/user schedule
parseUserNotificationConfig used getBoolean/getString for title, body, sound,
vibration, and priority; missing keys threw JSONException though TS marks them
optional. Add optBooleanOrNull/optStringOrNull (same pattern as optIntOrNull) and
defer to existing NotifyReceiver/DualScheduleHelper defaults.

Document in README; extend CHANGELOG [2.1.3].
2026-03-20 21:19:27 +08:00
Jose Olarte III
4dd1aea002 chore(release): 2.1.3
- Bump package, lockfile, iOS DailyNotificationPlugin.podspec, and synced
  version strings (definitions header, FetchWorker mock payload).
- Add CHANGELOG [2.1.3] for Android optional contentFetch fields and README.
2026-03-20 19:26:46 +08:00
Jose Olarte III
33010ad7cf fix(android): parse optional contentFetch timeout/retry fields for dual schedule
JSONObject.getInt threw when timeout/retryAttempts/retryDelay were omitted, but
TS ContentFetchConfig marks them optional. Use optIntOrNull so null passes
through and FetchWorker keeps its existing defaults.

Document omitted-field behavior in README under scheduleDualNotification.
2026-03-20 19:25:04 +08:00
Jose Olarte III
ba1186c057 chore(release): bump @timesafari/daily-notification-plugin to 2.1.2 2026-03-20 16:47:32 +08:00
Jose Olarte III
757263c073 fix(android): remove duplicate scheduleId locals in DailyNotificationWorker
handleDisplayNotification already reads schedule_id after getInputData().
Inner branches redeclared String scheduleId, which javac rejects in the
same method scope. Drop the redundant lines; behavior unchanged.
2026-03-20 16:45:39 +08:00
Jose Olarte III
539b011fa8 chore(release): bump version to 2.1.1
Patch release for iOS build fix: unwrap optional title/body in
dual-notification path (NotificationContent).
2026-03-19 15:13:41 +08:00
Jose Olarte III
d3ade1f27a fix(ios): unwrap optional title/body in dual-notification path
NotificationContent.title and .body are String?; assigning them to
non-optional String caused Swift build errors. Use ?? with the same
defaults as the config fallback so both branches yield non-optional
title/body.
2026-03-19 15:10:38 +08:00
Jose Olarte III
21ab05d63b docs(completion-plan): add app-side implementation blurb for Cursor
Add "For app-side implementation" paragraph so the completion plan can
be used in the app repo: focus §2/§3, plugin v2.1.0+, link/build check,
Edit flow with updateDualScheduleConfig, and key app file paths.
2026-03-19 14:33:50 +08:00
Jose Olarte III
87d24ca506 chore(release): bump plugin version to 2.1.0 2026-03-19 14:22:59 +08:00
Jose Olarte III
7b41ca9e0b feat(dual): complete scheduleDualNotification; add relationship (contentTimeout/fallbackBehavior)
Plugin (iOS):
- Real cron parsing in calculateNextRunTime(from:); stable dual id + replace semantics; UNCalendarNotificationTrigger for daily
- cancelDualSchedule() and updateDualScheduleConfig(); persist/clear dual config for relationship

Plugin (Android):
- cancelDualSchedule() and updateDualScheduleConfig(); FetchWorker.scheduleFetchForDual; ScheduleHelper.cancelDualSchedule; dual_notify_* id
- Persist dual config; DualScheduleHelper + Worker dual branch for relationship at fire time

Relationship:
- iOS: replace pending dual notification when fetch completes (contentTimeout/fallbackBehavior)
- Android: resolve config + content cache in Worker for dual_notify_*; show resolved title/body

Doc: COMPLETION-PLAN-SCHEDULE-DUAL-NOTIFICATION.md (two types, Edit/updateDualScheduleConfig, §1.3a, status)
2026-03-18 21:10:49 +08:00
Jose Olarte III
7a1e58a4b6 doc: add completion plan for scheduleDualNotification (iOS/Android)
- Checklist for completing dual-schedule (New Activity) on plugin and app
- Context: two notification types (Daily Reminder vs New Activity), isolation
- iOS: cron parsing, relationship, cancelDualSchedule, updateDualScheduleConfig
- Android: cancelDualSchedule; updateDualScheduleConfig for Edit time
- Consuming app: link/build verification, Edit flow use updateDualScheduleConfig
- Replace semantics and refs to plugin and app code
2026-03-18 17:41:49 +08:00
4a1d476528 change more com.timesafari to org.timesafari 2026-03-14 20:47:34 -06:00
11561991bd rename 'docs' directory to 'doc' 2026-03-14 19:52:40 -06:00
Jose Olarte III
ca6a75ded8 chore(release): bump plugin version to 2.0.0
- package.json, package-lock.json
- ios/Plugin/Info.plist (CFBundleShortVersionString)
- ios/DailyNotificationPlugin.podspec
- Android: DailyNotificationPlugin.kt, NotifyReceiver.kt, FetchWorker.kt,
  ReactivationManager.kt (header @version and runtime version payloads)
- src/observability.ts (@version)

Major bump for com→org package rename (breaking change for consumers).
2026-03-12 14:37:24 +08:00
Jose Olarte III
d8a0eaf413 refactor(android,ios): rename package com.timesafari to org.timesafari.dailynotification
- Android: move plugin source to org/timesafari/dailynotification, update
  namespace, manifest package, and all package/imports; change intent actions
  to org.timesafari.daily.NOTIFICATION and DISMISS
- iOS: update bundle IDs, BGTask identifiers, subsystem labels, and queue
  names in Plugin and Xcode projects
- Capacitor: update plugin class registration and appIds in configs
- Test apps (android-test-app, daily-notification-test, ios-test-app):
  applicationId/bundleId, manifests, ProGuard, scripts, and docs
- Docs: bulk update references; add CONSUMING_APP_MIGRATION_COM_TO_ORG.md
  for consuming app migration

BREAKING CHANGE: Consuming apps must update plugin class to
org.timesafari.dailynotification.DailyNotificationPlugin, manifest
receivers/actions, and iOS BGTask identifiers per migration doc.
2026-03-12 14:26:07 +08:00
Jose Olarte III
b8d9b6247d chore(release): bump plugin version to 1.3.3
Sync version in package.json, package-lock.json, Android/Kotlin sources,
iOS Info.plist, and ios/DailyNotificationPlugin.podspec.
2026-03-09 20:32:02 +08:00
Jose Olarte III
6df1d4a7c6 fix(android): stop auto-opening Settings for exact alarm in scheduleDailyNotification
Remove the guard that opened system Settings and rejected when exact alarms
were not granted. Scheduling now proceeds using inexact/windowed fallback;
consuming apps can handle UX (e.g. optional hint or openExactAlarmSettings()).
2026-03-09 20:29:04 +08:00
Jose Olarte III
daaf7aa62a chore(release): bump version to 1.3.2
Removes exact alarms (Android); delivery is now inexact/schedule-based.

- package.json, observability, ios Info.plist, android plugin version refs
2026-03-09 18:29:56 +08:00
1dc0052b39 remove references to USE_EXACT_ALARM for Android 2026-03-06 21:11:27 -07:00
Jose Olarte III
6ad7ff5fe1 docs: reorganize docs into subdirs and fix links
- Keep only index, getting-started, invariants, performance,
  troubleshooting, and file-organization-summary in docs/ root
- Add docs/architecture/ (storage, database interfaces, native fetcher)
- Add docs/deployment/ (deployment-guide, DEPLOYMENT_CHECKLIST)
- Add docs/compliance/ (accessibility, legal, observability)
- Move integration guides and host-app docs to docs/integration/
- Move design/planning and prefetch docs to docs/design/
- Move Android consuming-app and comparison docs to docs/platform/android/
- Move DEPLOYMENT_SUMMARY and TODO-CLASSIFICATION to docs/progress/
- Archive deprecated platform-capability-reference to docs/_archive/
- Point platform-capability links to alarms/01-platform-capability-reference.md
- Update docs/00-INDEX.md with new sections and paths
- Fix cross-references in README, deployment, progress, design, testing,
  and test-app docs
- Remove one-off COMMIT_MESSAGE.txt
2026-03-06 19:51:13 +08:00
Jose Olarte III
f58eeda8a7 docs: move 6 root .md files into docs/progress and docs/_archive
- Move TODO.md, TODAY_SUMMARY.md, SESSION_RECONSTITUTION.md,
  BATCH_A_COMPLETION_SUMMARY.md to docs/progress/
- Move PR_DESCRIPTION.md, MERGE_READY_SUMMARY.md to docs/_archive/
- Update docs/00-INDEX.md with new progress and archive entries
- Note moves in docs/_archive/2025-12-16-consolidation/CONSOLIDATION_SOURCE_MAP.md

Root keeps only README, CHANGELOG, CONTRIBUTING, SECURITY, BUILDING,
ARCHITECTURE, API, USAGE.
2026-03-06 19:27:21 +08:00
Jose Olarte III
36356e0aca docs: point repo URLs to Gitea
Replace github.com/timesafari/daily-notification-plugin with
gitea.anomalistdesign.com/trent_larson/daily-notification-plugin
2026-03-06 19:16:30 +08:00