Skip to content

Conversation

@williscool
Copy link
Owner

@williscool williscool commented Jan 17, 2026

  • docs: plan
  • feat: pre mute

Note

Enables pre-actions for upcoming events with end-to-end storage, UI, and alarm behavior changes, plus comprehensive tests.

  • Add Pre-Action UI: New PreActionActivity with snooze presets, pre-mute toggle, and pre-dismiss; manifest/activity/layout/menu/strings added. UpcomingEventsFragment now launches pre-action UI and supports swipe-to-dismiss (pre-dismiss). ViewEventActivityNoRecents adds "Unsnooze to Upcoming".
  • Core logic: ApplicationController gains preDismissEvent, smart restoreEvent (restore to Upcoming vs Active), and unsnoozeToUpcoming; applies preMuted on registerNewEvents; injectible storage providers; integrates MonitorStorage helpers (set/clearWasHandled, togglePreMuted).
  • Model/tag updates: EventAlertRecord adds hasAlertFired/canUnsnoozeToUpcoming; TagsManager preserves existing mute; new dismiss type ManuallyDismissedFromUpcoming; new intent keys.
  • Tests: Extensive Robolectric/instrumentation coverage for pre-mute, pre-snooze, pre-dismiss, smart restore, and storage flag behavior.

Written by Cursor Bugbot for commit ab0bf94. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a 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.

@github-actions
Copy link

Build artifacts for PR #196 (commit b0233e5) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

github-actions bot commented Jan 17, 2026

Code Coverage Report

Overall Project 34.79% -1.73% 🍏
Files changed 36.32%

Module Coverage
app 43.41% -2.21%
x8664Debug 26.37% -1.26%
Files
Module File Coverage
app Consts.kt 98.9% 🍏
TagsManager.kt 98.9% 🍏
DismissedEventAlertRecord.kt 83.76% 🍏
ActiveEventsFragment.kt 75.62% 🍏
ApplicationController.kt 69.75% -6.3%
MonitorStorageInterface.kt 66.23% -33.77% 🍏
EventAlertRecord.kt 62.86% -0.94%
UpcomingEventsFragment.kt 57.76% -31.59%
MainActivityLegacy.kt 55.52% 🍏
ViewEventActivityNoRecents.kt 51.43% -1.49%
DismissedEventListAdapter.kt 49.88% -5.12%
EventListAdapter.kt 44.78% 🍏
PreActionActivity.kt 0% -99.15%
x8664Debug TagsManager.kt 98.9% 🍏
DismissedEventAlertRecord.kt 77.78% 🍏
MonitorStorageInterface.kt 66.23% -33.77% 🍏
ActiveEventsFragment.kt 65.45% 🍏
ApplicationController.kt 59.56% -4.37% 🍏
EventAlertRecord.kt 57.23% -0.94%
UpcomingEventsFragment.kt 57.01% -31.59%
PreActionActivity.kt 55.25% -44.5%
MainActivityLegacy.kt 51.63% 🍏
DismissedEventListAdapter.kt 44.28% -5.12%
EventListAdapter.kt 44.25% 🍏
ViewEventActivityNoRecents.kt 44.19% -1.49%
Consts.kt 0% 🍏

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall null
Changed Files 100

View detailed coverage report

@github-actions
Copy link

Build artifacts for PR #196 (commit 35ab9bd) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 34.45
Changed Files 62.4

View detailed coverage report

@williscool williscool force-pushed the feat/events_lookahead_milestone2_pre_actions branch from 99aaf27 to 64270a2 Compare January 18, 2026 00:23
Copy link

@cursor cursor bot left a 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.

@github-actions
Copy link

Build artifacts for PR #196 (commit d54ee38) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 34.5
Changed Files 59.64

View detailed coverage report

@williscool williscool force-pushed the feat/events_lookahead_milestone2_pre_actions branch from 64270a2 to 7712e11 Compare January 18, 2026 01:06
@williscool williscool changed the title feat/events lookahead milestone2 pre actions feat/events lookahead milestone2 pre actions pre mute and pre snooze Jan 18, 2026
@williscool williscool changed the title feat/events lookahead milestone2 pre actions pre mute and pre snooze feat/events lookahead milestone2 pre actions Jan 18, 2026
Copy link

@cursor cursor bot left a 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.

@github-actions
Copy link

Build artifacts for PR #196 (commit 114e867) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

Copy link

@cursor cursor bot left a 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.

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 34.4
Changed Files 57.4

View detailed coverage report

@github-actions
Copy link

Build artifacts for PR #196 (commit 769d2b7) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@williscool williscool force-pushed the feat/events_lookahead_milestone2_pre_actions branch from 75a5cd8 to 605f139 Compare January 18, 2026 01:30
Copy link

@cursor cursor bot left a 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.

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 43.27
Changed Files 56.07

View detailed coverage report

@github-actions
Copy link

Build artifacts for PR #196 (commit cfacc83) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 34.44
Changed Files 53.95

View detailed coverage report

@github-actions
Copy link

Build artifacts for PR #196 (commit 02edfca) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 26.15
Changed Files 53.05

View detailed coverage report

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.
Copy link

@cursor cursor bot left a 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.

@github-actions
Copy link

Build artifacts for PR #196 (commit efbec35) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 34.81
Changed Files 54.37

View detailed coverage report

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.
Copy link

@cursor cursor bot left a 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.

@github-actions
Copy link

Build artifacts for PR #196 (commit e22e316) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

0. refactor to togglePreMuted

1. preDismissEvent now uses injectable storage:

2. restoreEvent handles restoreToUpcoming failure:
@github-actions
Copy link

Build artifacts for PR #196 (commit 7219eb6) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall null
Changed Files 100

View detailed coverage report

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 43.38
Changed Files 55.62

View detailed coverage report

@github-actions
Copy link

Build artifacts for PR #196 (commit 4c0d1b5) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 34.79
Changed Files 54.36

View detailed coverage report

@williscool williscool changed the title feat/events lookahead milestone2 pre actions feat: events lookahead milestone 2: pre actions Jan 19, 2026
@williscool williscool changed the title feat: events lookahead milestone 2: pre actions feat: events lookahead milestone 2 — pre actions Jan 19, 2026
@williscool williscool merged commit 9b65bfc into master Jan 19, 2026
17 checks passed
@williscool williscool mentioned this pull request Jan 19, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants