-
Notifications
You must be signed in to change notification settings - Fork 1
feat: events lookahead milestone 2 — pre actions #196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: events lookahead milestone 2 — pre actions #196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
android/app/src/main/java/com/github/quarck/calnotify/app/ApplicationController.kt
Show resolved
Hide resolved
📊 Code Coverage Summary
|
📊 Code Coverage Summary
|
99aaf27 to
64270a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
android/app/src/main/java/com/github/quarck/calnotify/ui/PreActionActivity.kt
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/ui/PreActionActivity.kt
Show resolved
Hide resolved
📊 Code Coverage Summary
|
64270a2 to
7712e11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
android/app/src/main/java/com/github/quarck/calnotify/ui/PreActionActivity.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/ui/PreActionActivity.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
android/app/src/main/java/com/github/quarck/calnotify/app/ApplicationController.kt
Show resolved
Hide resolved
📊 Code Coverage Summary
|
75a5cd8 to
605f139
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
android/app/src/main/java/com/github/quarck/calnotify/ui/PreActionActivity.kt
Show resolved
Hide resolved
📊 Code Coverage Summary
|
📊 Code Coverage Summary
|
android/app/src/main/java/com/github/quarck/calnotify/ui/UpcomingEventsFragment.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/ui/UpcomingEventsFragment.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/ui/ViewEventActivityNoRecents.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/app/ApplicationController.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/app/ApplicationController.kt
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/ui/PreActionActivity.kt
Outdated
Show resolved
Hide resolved
📊 Code Coverage Summary
|
Fixes: PreActionActivity missing calendarId: Now passes calendarId through intent instead of hardcoding -1L, preserving calendar association during pre-snooze/pre-dismiss Confusing unsnooze string: Changed "Back to upcoming" → "Unsnooze (to Upcoming)" for clarity
Unsnooze ignores delete result causing duplicate event display Medium Severity The unsnoozeToUpcoming function ignores the return value of deleteEvent, which returns Boolean to indicate success. After clearing wasHandled in MonitorStorage (step 1), if the subsequent deleteEvent from EventsStorage (step 2) fails, the function still returns true and logs success. This creates a data inconsistency where the same event appears in both the Upcoming list (via MonitorStorage with wasHandled=false) and the Active list (still in EventsStorage). The PR discussion noted concern about rollback mechanisms, which was not addressed here. Race condition between swipe dismiss and inline undo Medium Severity When a user swipes to dismiss an upcoming event, onItemRemoved launches preDismissEvent in a background thread while the adapter immediately shows an inline undo button. If the user clicks undo quickly (before preDismissEvent completes), onItemRestored calls restoreEvent synchronously on the main thread. These concurrent operations on MonitorStorage and DismissedEventsStorage can race, potentially leaving the event incorrectly dismissed or in an inconsistent state where it appears in both Upcoming and Dismissed lists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
android/app/src/main/java/com/github/quarck/calnotify/ui/UpcomingEventsFragment.kt
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/ui/PreActionActivity.kt
Show resolved
Hide resolved
📊 Code Coverage Summary
|
Swipe-to-dismiss fails silently without UI recovery Medium Severity When preDismissEvent fails in onItemRemoved, the code only handles the success case but provides no feedback or recovery for failure. The EventListAdapter immediately shows the undo UI upon swipe (optimistic update), but if the backend operation fails, users see no error and the event appears dismissed. The event will silently reappear on next refresh or fire its notification unexpectedly. The if (success) check at line 175 gates adding the undo state but doesn't handle the else case with error feedback or UI restoration. Mute toggle fails silently without user feedback Low Severity The toggleMute function doesn't provide error feedback when the alert is not found in MonitorStorage. When success is false, the runOnUiThread block only handles the success case (lines 408-412) with no else clause for errors. This is inconsistent with executePreSnooze (line 354) and executePreDismiss (line 429) in the same file, which both show Toast.makeText(this, R.string.error, ...) on failure. Users who tap the mute button when the alert has been processed (race condition) see no response at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
android/app/src/main/java/com/github/quarck/calnotify/app/ApplicationController.kt
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/app/ApplicationController.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/ui/PreActionActivity.kt
Outdated
Show resolved
Hide resolved
0. refactor to togglePreMuted 1. preDismissEvent now uses injectable storage: 2. restoreEvent handles restoreToUpcoming failure:
📊 Code Coverage Summary
|
📊 Code Coverage Summary
|
📊 Code Coverage Summary
|
Note
Enables pre-actions for upcoming events with end-to-end storage, UI, and alarm behavior changes, plus comprehensive tests.
PreActionActivitywith snooze presets, pre-mute toggle, and pre-dismiss; manifest/activity/layout/menu/strings added.UpcomingEventsFragmentnow launches pre-action UI and supports swipe-to-dismiss (pre-dismiss).ViewEventActivityNoRecentsadds "Unsnooze to Upcoming".ApplicationControllergainspreDismissEvent, smartrestoreEvent(restore to Upcoming vs Active), andunsnoozeToUpcoming; appliespreMutedonregisterNewEvents; injectible storage providers; integratesMonitorStoragehelpers (set/clearWasHandled,togglePreMuted).EventAlertRecordaddshasAlertFired/canUnsnoozeToUpcoming;TagsManagerpreserves existing mute; new dismiss typeManuallyDismissedFromUpcoming; new intent keys.Written by Cursor Bugbot for commit ab0bf94. This will update automatically on new commits. Configure here.