Implement notification actions and categories for timer events#151
Implement notification actions and categories for timer events#151mookwoo wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds actionable “timer complete” notifications and routes notification actions back to the correct MVTimerController instance.
Changes:
- Introduces notification category/action identifiers and a userInfo key for controller routing.
- Attaches notification category + controller identifier to timer-complete notifications.
- Implements UNNotificationCenter action handling to restart/add time/stop/open the corresponding timer window.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| Timer/MVUserDefaultsKeys.swift | Adds shared notification identifier constants used across controller + AppDelegate. |
| Timer/MVTimerController.swift | Adds per-controller UUID and new timer action helpers; enriches notification payload with category + routing info. |
| Timer/AppDelegate.swift | Registers notification categories and handles notification actions by delegating to the correct controller. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…controller retrieval logic
|
Addressed the remaining Copilot review comments:
Verified with |
|
Hi! Just wanted to follow up on this PR, it's been about a month since I submitted it. Would love to get any feedback or know if there's anything I can update to help move it forward. Thanks! 🙏 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
Timer/MVTimerController.swift:83
UNUserNotificationCenter.add(_:)is called without a completion handler, so failures to schedule the notification (e.g., authorization denied, delivery errors) will be silently ignored. Logging the error will make notification/action issues diagnosable in the field.
let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: nil)
UNUserNotificationCenter.current().add(request)
Co-authored-by: Copilot <[email protected]>
This pull request adds actionable notifications to the timer application, allowing users to interact directly with timer notifications (e.g., restart, add time, stop) and improves how notifications are handled and routed to the correct timer window. The main changes include registering notification categories, handling notification actions, associating notifications with specific timer controllers, and adding new timer control methods.
Notification actions and handling:
registerNotificationCategoriesinAppDelegate.swift). [1] [2]userNotificationCenter(_:didReceive:withCompletionHandler:)andhandleNotificationActioninAppDelegate.swift). [1] [2]Timer controller enhancements:
identifierproperty to eachMVTimerControllerinstance to associate notifications with specific timer windows.Timer control methods:
MVTimerControllerfor restarting the last timer, adding five minutes, and resetting the timer, supporting the new notification actions.Identifiers centralization:
MVNotificationIdentifiersenum to centralize all notification-related string constants.