CCExtractor / CCExtractor/ultimate_alarm_clock

Enhance Shared Alarm Notifications to Support Full Alarm Feature Set

Aperta
#939 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Dart
Stelle
112
Fork
227
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## Summary

The current shared alarm functionality allows users to send and accept alarms via in-app notifications. While the core flow works, it only supports a limited subset of alarm properties. This issue aims to extend the shared alarm system to fully support all existing alarm features, ensuring parity between locally created and shared alarms.

## Problem

Shared alarms currently do not preserve the complete configuration of an alarm. When a user accepts a shared alarm, certain properties are either lost or reset to default values. This leads to inconsistencies and a degraded user experience.

Examples of missing or partially supported features may include:

* Custom ringtones
* Snooze duration and behavior
* Repeat schedules (custom days)
* Labels or notes
* Conditional triggers (e.g., weather, location)
* Advanced alarm settings (dismiss challenges, etc.)

## Expected Behavior

When an alarm is shared and accepted:

* The recipient should receive the full alarm configuration.
* The accepted alarm should be identical to the sender’s version.
* All features supported by a regular alarm should also work for shared alarms.

## Scope of Work

### 1. Data Model Updates

* Extend the shared alarm payload to include all alarm properties.
* Ensure serialization/deserialization supports new and existing fields.
* Handle optional and future fields safely.

### 2. Notification Improvements

* Update in-app notification UI to display relevant alarm details:

* Time
* Label
* Repeat schedule
* Ensure clarity when users receive a shared alarm.

### 3. Acceptance Flow

* On accepting a shared alarm:

* Reconstruct the alarm using the full configuration.
* Avoid fallback to default values unless explicitly missing.

### 4. Backward Compatibility

* Ensure previously shared alarms (with partial data) still work.
* Add fallback handling for missing fields.

### 5. Feature Parity Validation

* Verify that all alarm features behave identically for:

* Locally created alarms
* Shared and accepted alarms

## Acceptance Criteria

* Shared alarms preserve all supported properties.
* No loss of configuration during share/accept flow.
* UI clearly reflects shared alarm details.
* Existing shared alarms continue to function without crashes or inconsistencies.
* Tests cover serialization, deserialization, and acceptance logic.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.