Skip to content

Conversation

@williscool
Copy link
Owner

@williscool williscool commented Jan 19, 2026

  • docs: plan
  • feat: snooze all filter by pills

Note

Implements filter-pill-aware bulk snoozing and improves user feedback when lists are empty or filtered.

  • Extend ApplicationController.snoozeAllEvents(...) to accept FilterState and combine with search query
  • Pass FilterState via INTENT_FILTER_STATE; MainActivityModern includes it when launching SnoozeAllActivity and shows no-events toasts when nothing matches
  • SnoozeAllActivity reads FilterState, updates count/confirmation text, and forwards it to controller
  • Add FilterState bundle (de)serialization, hasActiveFilters(), toDisplayString(...), and matching/filter helpers
  • Improve empty-state messages in ActiveEventsFragment, UpcomingEventsFragment, and DismissedEventsFragment to reflect search/filters
  • Add/adjust strings for filtered messages and no-results toasts
  • Update UI/robolectric tests; add new tests for FilterState serialization/display and controller filtering; adapt DateTimeUtilsTest to fixed-time setup

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

cursor[bot]

This comment was marked as outdated.

@github-actions
Copy link

Build artifacts for PR #219 (commit de86f36) are available:

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

ll code review issues addressed. Here's a summary of the fixes:

**`MainActivityModern.kt`:**
- Removed duplicate `saveFilterState()`/`restoreFilterState()` implementation
- Now uses `FilterState.toBundle()` and `FilterState.fromBundle()` directly
- Stores under `Consts.INTENT_FILTER_STATE` key to avoid any potential key collision
- Removed unused constants (`STATE_CALENDAR_IDS`, `STATE_CALENDAR_NULL`, `STATE_STATUS_FILTERS`, `STATE_TIME_FILTER`)

**`FilterState.kt`:**
- Changed `toDisplayString()` to show "0 calendars" when `selectedCalendarIds` is an empty set
- Empty set is a valid filter state that shows 0 events (none selected)
- Removed the `if (count > 0)` check

**`FilterState.kt`:**
- Changed from `when` with `else -> null` to exhaustive `when` without `else`
- Now the compiler will catch any future enum additions at compile time
- Explicitly handles `TimeFilter.ALL` case with an empty block

**`FilterStateTest.kt`** - Added 15 new tests:
- Bundle serialization round-trip (all fields, null calendars, empty calendars, empty status, all time filters, all status options)
- `hasActiveFilters()` (default, calendar filter, empty calendar, status filter, time filter)
- `toDisplayString()` (no filters, calendar count, empty set, status names, multiple status, time filter, combined)

**`ApplicationControllerCoreRobolectricTest.kt`** - Added 7 new tests:
- `snoozeAllEvents` with no filter
- `snoozeAllEvents` with status filter
- `snoozeAllEvents` with calendar filter
- `snoozeAllEvents` with search AND filter combined
- `snoozeAllEvents` with empty calendar filter (none selected)
- `snoozeAllEvents` with null filterState (backward compatibility)
- `snoozeAllEvents` with time filter
@github-actions
Copy link

github-actions bot commented Jan 19, 2026

Code Coverage Report

Overall Project 27.11% -0.73%
Files changed 50.73%

File Coverage
FilterState.kt 93.07% -6.63% 🍏
ActiveEventsFragment.kt 63.76% -12.04%
ApplicationController.kt 58.85% 🍏
UpcomingEventsFragment.kt 57.72% -12.17%
DismissedEventsFragment.kt 57.7% -12.58%
MainActivityModern.kt 48.39% -3.75%
SnoozeAllActivity.kt 36.37% -13.98%
Consts.kt 0% 🍏

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall null
Changed Files 100

View detailed coverage report

@williscool williscool force-pushed the feat/snooze_all_pill_filters_215 branch from dc0ec6d to 3e171a8 Compare January 19, 2026 23:22
@github-actions
Copy link

Build artifacts for PR #219 (commit 60cf5a6) 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 null
Changed Files 100

View detailed coverage report

@williscool williscool changed the title feat/snooze all pill filters 215 feat: snooze all pill filters 215 Jan 20, 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 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 #219 (commit 7a2ca88) 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 42.95
Changed Files 62.29

View detailed coverage report

@williscool williscool enabled auto-merge (squash) January 20, 2026 02:51
@williscool williscool disabled auto-merge January 20, 2026 02:51
@williscool williscool enabled auto-merge (squash) January 20, 2026 02:52
@github-actions
Copy link

Build artifacts for PR #219 (commit 775730d) are available:

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

@williscool williscool merged commit a75aca0 into master Jan 20, 2026
13 of 14 checks passed
@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 27.11
Changed Files 55.05

View detailed coverage report

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.

2 participants