Skip to content

Commit 8f6e7a5

Browse files
authored
Merge pull request #519 from DevKor-github/feature/schedule-notification-permission-flow
feat: refine schedule notification permission flow
2 parents cdc251f + 13b600f commit 8f6e7a5

24 files changed

Lines changed: 545 additions & 90 deletions

.github/workflows/android-play-closed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474

7575
- uses: subosito/flutter-action@v2
7676
with:
77-
flutter-version: "3.32.6"
77+
flutter-version: "3.44.4"
7878
channel: stable
7979
cache: true
8080

.github/workflows/android-play-internal.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070

7171
- uses: subosito/flutter-action@v2
7272
with:
73-
flutter-version: "3.32.6"
73+
flutter-version: "3.44.4"
7474
channel: stable
7575
cache: true
7676

.github/workflows/firebase-hosting-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
java-version: "12.x"
2222
- uses: subosito/flutter-action@v2
2323
with:
24-
flutter-version: "3.32.6"
24+
flutter-version: "3.44.4"
2525
channel: "stable"
2626

2727
- name: Use Environment Variables

.github/workflows/firebase-hosting-pull-request-widgetbook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
java-version: "12.x"
2323
- uses: subosito/flutter-action@v2
2424
with:
25-
flutter-version: "3.32.6"
25+
flutter-version: "3.44.4"
2626
channel: "stable"
2727

2828
- run: flutter --version

.github/workflows/firebase-hosting-pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
java-version: "12.x"
2222
- uses: subosito/flutter-action@v2
2323
with:
24-
flutter-version: "3.32.6"
24+
flutter-version: "3.44.4"
2525
channel: "stable"
2626

2727
- name: Use Environment Variables

.github/workflows/firebase_hosting-merge-widgetbook.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
java-version: "12.x"
2323
- uses: subosito/flutter-action@v2
2424
with:
25-
flutter-version: "3.32.6"
25+
flutter-version: "3.44.4"
2626
channel: "stable"
2727

2828
- run: flutter pub get
@@ -45,4 +45,4 @@ jobs:
4545
projectId: on-time-front-widgetbook
4646
entryPoint: ${{ env.working-directory }}
4747
env:
48-
FIREBASE_CLI_EXPERIMENTS: webframeworks
48+
FIREBASE_CLI_EXPERIMENTS: webframeworks

.github/workflows/flutter_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/checkout@v4
1919
- uses: subosito/flutter-action@v2
2020
with:
21-
flutter-version: "3.32.6"
21+
flutter-version: "3.44.4"
2222
channel: stable
2323
cache: true
2424
- name: install sql

CONTEXT.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,58 @@ _Avoid_: Tap event, raw navigation log, interaction trace
4545
An allowlisted non-content value attached to a Product Usage Event.
4646
_Avoid_: Event payload, arbitrary metadata, raw detail
4747

48+
**Schedule Notification**:
49+
A user-facing notification that starts preparation for a scheduled commitment at the intended moment.
50+
_Avoid_: Schedule alarm, alarm, push
51+
52+
**Schedule Notification Setting**:
53+
The user-facing setting that controls whether OnTime sends notifications for upcoming schedule preparation.
54+
_Avoid_: Schedule alarm setting, alarm switch
55+
56+
**Alarm**:
57+
An alarm experience that opens an OnTime screen over the lock screen or current app without the user first tapping a notification.
58+
_Avoid_: Notification, alert, push
59+
60+
**iOS AlarmKit Alarm**:
61+
The iOS alarm experience OnTime may use when the device and build support AlarmKit.
62+
_Avoid_: iOS notification, fallback notification
63+
64+
**Android Schedule Notification**:
65+
The Android presentation that alerts the user through a notification instead of an Alarm.
66+
_Avoid_: Android alarm, native alarm UI
67+
68+
**Precise Notification Timing**:
69+
The expectation that a Schedule Notification is delivered at the intended preparation start moment.
70+
_Avoid_: Best-effort reminder, approximate notification
71+
72+
**Fallback Notification**:
73+
A secondary delivery path used only when Precise Notification Timing is unavailable.
74+
_Avoid_: Alarm, alarm permission
75+
76+
**Exact Timing Permission**:
77+
The user's permission for OnTime to schedule notifications at precise times on devices that require it.
78+
_Avoid_: Alarm permission, notification permission
79+
80+
**No Scheduled Notification**:
81+
The state where notifications are enabled but no Schedule Notification is currently armed for an upcoming schedule.
82+
_Avoid_: Pending, waiting, permission pending
83+
84+
**Approximate Notification Timing**:
85+
The state where OnTime may notify the user for a schedule but cannot guarantee delivery at the exact preparation time.
86+
_Avoid_: Disabled notifications, alarm denied
87+
88+
**Precise Notification Status**:
89+
The user-facing status for a Schedule Notification that can be delivered with Precise Notification Timing.
90+
_Avoid_: Native alarm, exact alarm
91+
92+
**Notification Status**:
93+
The user-facing status for schedule delivery through notifications when Alarm delivery or Precise Notification Timing is unavailable.
94+
_Avoid_: Fallback, degraded, time sensitive
95+
96+
**Alarm Status**:
97+
The user-facing status for schedule delivery through an Alarm.
98+
_Avoid_: Notification, native alarm
99+
48100
## Relationships
49101

50102
- A **Product Usage Event** may describe a schedule, preparation, notification, alarm, onboarding, or account action without storing the user's raw schedule names, notes, place names, credentials, tokens, or free text.
@@ -54,6 +106,24 @@ _Avoid_: Event payload, arbitrary metadata, raw detail
54106
- An **Analytics Event Parameter** must not contain user-authored text, direct identifiers, tokens, raw exception strings, request bodies, or response bodies.
55107
- A **Product Usage Event** uses a stable snake_case name and includes a schema version.
56108
- A changed **Product Usage Event** meaning requires a new event name or schema version.
109+
- User-facing copy should call a scheduled notification a **Schedule Notification**, not an **Alarm**, unless it opens an OnTime screen without the user first tapping a notification.
110+
- The profile setting for upcoming schedule preparation delivery should be called **Schedule Notification Setting**.
111+
- On iOS, user-facing copy may say **Alarm** only when OnTime can deliver an **iOS AlarmKit Alarm**.
112+
- iOS permission prompts should use alarm language only when requesting an **iOS AlarmKit Alarm**; otherwise they should use notification language.
113+
- When an **iOS AlarmKit Alarm** is unavailable or denied but notifications are allowed, user-facing status should say notification rather than expose Time Sensitive terminology.
114+
- A **Schedule Notification** should use **Precise Notification Timing** when the user's device supports it and **Exact Timing Permission** is granted.
115+
- A **Fallback Notification** may back up a **Schedule Notification**, but it does not satisfy **Exact Timing Permission**.
116+
- On Android, OnTime should use an **Android Schedule Notification** unless **Alarm** policy approval is available.
117+
- Android permission prompts for scheduled preparation delivery should say notification, not alarm, unless OnTime is requesting or explaining an **Alarm** experience.
118+
- Android **Exact Timing Permission** copy should explain that the permission is needed to notify the user at the exact preparation time.
119+
- **Exact Timing Permission** is granted only when the device reports it as granted, not when the user taps a permission request button.
120+
- **No Scheduled Notification** does not indicate a missing **Exact Timing Permission**.
121+
- Missing **Exact Timing Permission** means **Approximate Notification Timing**, not disabled notifications, when notification permission is granted.
122+
- Android with **Precise Notification Timing** should show **Precise Notification Status**.
123+
- Android without **Precise Notification Timing** but with notification permission should show **Notification Status**.
124+
- iOS with an **iOS AlarmKit Alarm** should show **Alarm Status**.
125+
- iOS without an available **iOS AlarmKit Alarm** but with notification permission should show **Notification Status**.
126+
- **No Scheduled Notification** should be the user-facing empty state across platforms, even when future delivery may use an **Alarm**.
57127
- Active first-release **Analytics Purposes** are product improvement, debugging and operations, and experimentation.
58128
- A first-release **Experiment** must not be used for marketing targeting, sensitive segmentation, or personalized treatment.
59129
- Marketing and personalization are **Deferred Analytics Purposes**.
@@ -83,3 +153,18 @@ _Avoid_: Event payload, arbitrary metadata, raw detail
83153
- "Third party" was ambiguous for analytics; resolved: the canonical term is **Analytics Provider**.
84154
- "Event taxonomy" was broad; resolved: first-release analytics tracks **Workflow Milestone Events** only.
85155
- "Event payload" was too open-ended; resolved: events use allowlisted **Analytics Event Parameters** only.
156+
- "Alarm permission" was ambiguous between **Exact Timing Permission** and notification permission; resolved: notification permission may enable a **Fallback Notification**, but does not mean **Exact Timing Permission** is granted.
157+
- "Pending" was ambiguous for notification status; resolved: the canonical state is **No Scheduled Notification** when notifications are enabled but no upcoming Schedule Notification is armed.
158+
- "Allowed" was ambiguous for permission requests; resolved: a request action is not the same as granted **Exact Timing Permission**.
159+
- "Native alarm" was ambiguous on Android; resolved: Android can use an **Android Schedule Notification** without promising an **Alarm**.
160+
- "Fallback" was ambiguous as either a backup delivery path or permission bypass; resolved: Android's notification-only path should not be labeled fallback when it is the intended policy-safe path.
161+
- "Notification-only alarm" was ambiguous as either approximate or precise; resolved: Android should keep **Precise Notification Timing** while using an **Android Schedule Notification** presentation.
162+
- "Notification" was ambiguous as either a user-facing alarm concept or a platform presentation; resolved: user-facing copy should say **Schedule Notification** unless the experience is an **Alarm**.
163+
- "Allow alarms" was ambiguous on Android; resolved: permission prompts should say notifications when the resulting user experience is notification-based.
164+
- "Denied exact timing" was ambiguous as either disabled delivery or degraded delivery; resolved: with notification permission granted, it means **Approximate Notification Timing**.
165+
- "Schedule alarm setting" was ambiguous after Android moved to notification-based delivery; resolved: the profile control is **Schedule Notification Setting**.
166+
- "iOS alarm" was ambiguous across OS versions; resolved: iOS copy may say **Alarm** only when **iOS AlarmKit Alarm** is available.
167+
- "iOS alarm permission" was ambiguous across OS versions; resolved: iOS permission prompts use alarm language only for **iOS AlarmKit Alarm**.
168+
- "Time Sensitive" was too platform-specific for default user-facing status; resolved: fallback iOS delivery should be called notification.
169+
- "Status label" was ambiguous across platforms; resolved: Android uses precise notification or notification status, while iOS uses alarm status only for **iOS AlarmKit Alarm**.
170+
- "No scheduled alarm" was too capability-specific for an empty state; resolved: use **No Scheduled Notification** across platforms.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Primary supported targets are web, Android, and iOS. Desktop platform folders ar
1919

2020
## Requirements
2121

22-
- Flutter stable. CI uses Flutter `3.32.6`; use that version for release parity when possible.
23-
- Dart SDK compatible with `pubspec.yaml` (`^3.5.4`).
22+
- Flutter stable. CI uses Flutter `3.44.4`; use that version for release parity when possible.
23+
- Dart SDK compatible with `pubspec.yaml` (`^3.8.0`).
2424
- Java and Android SDK for Android builds.
2525
- Xcode and CocoaPods for iOS builds.
2626
- Firebase CLI and FlutterFire CLI when regenerating Firebase config.

docs/Home.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Welcome to the OnTime-front project documentation! This wiki contains everything
2727

2828
### Technical Deep Dives
2929
- [Error Handling System](./Error-Handling-Result-System.md) - Result-based error handling architecture
30+
- [Schedule Notification Flow](./Schedule-Notification-Flow.md) - OS-specific notification/alarm permission flows, status labels, and copy rules
3031
- [Schedule Preparation Flow SRD](./Schedule-Preparation-SRD.md) - End-to-end requirements, diagrams, and branch coverage for preparation start through finish, including early start
3132
- [Schedule Timer & Runtime Flow (v2)](./Schedule-Timer-System.md) - Official behavior for early start, timer transitions, cache coherence, and verification matrix
3233

0 commit comments

Comments
 (0)