Skip to content

Reminder troubleshooting - for review #50

Closed
david-allison wants to merge 27 commits intomainfrom
reminder_troubleshooting
Closed

Reminder troubleshooting - for review #50
david-allison wants to merge 27 commits intomainfrom
reminder_troubleshooting

Conversation

@david-allison
Copy link
Copy Markdown
Owner

@david-allison david-allison commented Apr 11, 2026

Work in progress. This won't be in this repo and will be recreated for Anki-Android.

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

criticalAY and others added 15 commits April 8, 2026 20:21
- ImportEntry was a data class with @Suppress(ArrayInDataClass) on top,
but none of the data class features (equals, hashCode, copy, componentN,
toString) were ever used. Drop the data keyword, the suppression, and
the stale comment. Also tighten  to  since it is
never reassigned.
And add tests

There is a bug here, and tests make this bug obvious

Assisted-by: Claude Opus 4.6
If the user is retrying a call to 'sync' due to wanting to do a full
upload/download, then do not show the metered sync dialog again

Fixes 20674

Assisted-by: Claude Opus 4.6
Technically a bugfix, but since the code only ran `onCreate`, it was
never a practical issue.

Also allows us to use `applied` to simplify the logic

But it allows us to trim code in the DeckPicker
We did not follow a common pattern
Fixes BackendCollectionAlreadyOpenException

init { } ran code, but the coroutines were not
 cancelled

Fixes 20704
testFixtures were introduced in fbf2dd0

This allows us to remove a module
In multiselect mode...

User request - delete is normally on the bottom
I left it above 'undo'
This checks the 'main' issue: permission has not been granted

Assisted-by: Claude Opus 4.6
Study reminders are not important enough for us to want to break
 Do not Disturb

But we should warn users that reminders may be silenced due to it

Influenced by Daylio - they also perform this check

https://developer.android.com/develop/ui/views/notifications#dnd-mode

Assisted-by: Claude Opus 4.6
Battery optimization makes it less likely for an app to wake and post a
notification.

There are 3 statuses:
  * Unrestricted
  * Optimized - Default
  * Restricted

Since 'Optimized' is the default, and the 'obvious' Android UI
encourages a user to change this to 'Restricted', Optimized is a warning
and 'Restricted' is an error, to showcase to a user that they have made
things worse

Influenced by Daylio - they also perform this check

https://developer.android.com/training/monitoring-device-state/doze-standby#support_for_other_use_cases

Assisted-by: Claude Opus 4.6
A user can request `Manifest.permission.SCHEDULE_EXACT_ALARM` on API 31+
 which allows scheduling of exact alarms.

We do not currently support this in the manifest, but we should do
before launch

https://developer.android.com/about/versions/14/changes/schedule-exact-alarms

Influenced by Daylio - they also perform this check

Assisted-by: Claude Opus 4.6
Power saving can delay notifications being fired.

OEMs have different restrictions on Android when this feature is enabled

In addition: Doze mode can defer AlarmManager calls unless
a `set...AndAllowWhenIdle` call is made.

https://developer.android.com/training/monitoring-device-state/doze-standby

Influenced by Daylio - they also perform this check

Assisted-by: Claude Opus 4.6
We want to notify the UI about the general status of our troubleshooting
checks, so we can know:

* If reminders are broken
* If reminders may not work
* If reminders are likely working

Assisted-by: Claude Opus 4.6
Copy link
Copy Markdown

@ericli3690 ericli3690 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only nits, looks amazing, ship it 🔥

android:gravity="center"
android:textAppearance="?attr/textAppearanceBodyMedium"
android:textColor="?android:attr/textColorSecondary"
tools:text="Everything looks good! Your reminders should work as expected." />
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, we'll yank these guys out into separate strings once everything is stable 🔥
Although I think this string here never actually shows up since it gets overridden programmatically

Comment on lines +334 to +335
// TODO: convert error icon to outline
private fun CheckResult.iconRes(): Int =
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, consider moving this to where CheckResult is defined

@ericli3690
Copy link
Copy Markdown

Actually on second thought don't forget:

  1. See the UI bug I pointed out in our DMs
  2. Lint is failing :(

`CollectionLoadingErrorDialog().toMessage()` was incorrect

introduced in 6ba468e

Fixes 20712

Assisted-by: Calude Opus 4.6
@david-allison david-allison force-pushed the reminder_troubleshooting branch 2 times, most recently from 672929b to 31032f6 Compare April 12, 2026 09:43
@david-allison david-allison force-pushed the reminder_troubleshooting branch 2 times, most recently from 6d2c63a to 57e47eb Compare April 12, 2026 10:07
For now, this only shows the status, not the checks

* Adds a menu item on reminders to open troubleshooting
* Display the overall status of checks

Assisted-by: Claude Opus 4.6
Allow a user to tap a troubleshooting issue and open an appropriate
screen to fix the issue

Assisted-by: Claude Opus 4.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants