improve 'Your collection file is too large'
https://www.reddit.com/r/Anki/comments/1ws4i02/how_to_fix_this_sync_issue_in_anki_please_help/#lightbox
Idea: if the collection is too large, the app should run check database automatically and determine if it's necessary to show the error. The error message can then just tell the user to delete some decks.
Hi @david-allison ! From my understanding, the goal is to improve the database-size warning so that it gives the user clearer guidance on what they can do, particularly directing them toward → Check Database to perform the relevant database maintenance.
Could you please confirm that I’m understanding the intended change correctly and assign the issue to me if so? I’d be happy to work on it XD
Ah, I put this up for myself to triage
If you want to work on it:
- Use the same mechanism we used for the the "clock is off" dialog (recent pull request)
- https://github.com/ankidroid/Anki-Android/pull/21946
- Add a "Check database" option
- Optionally ask AnkiWeb (upstream) for a help page on how to handle this issue
Be sure to read our AI policy:
https://github.com/ankidroid/Anki-Android/blob/main/AI_POLICY.md
Please let me know if you have any questions
I had a look at the recent clock error dialog PR (#21946) you mentioned, and I think I understand the direction here — improve the “collection file is too large” dialog using the same mechanism, with a clear explanation and a “Check database” action so the user can directly take the suggested action instead of having to figure out where to find it.
I’ll also look into the optional AnkiWeb help page and the existing database-check flow to see how it can fit in cleanly.
If that matches what you had in mind, could you assign the issue to me?
I traced it further and the backend already detects the oversized collection and returns syncUploadTooLarge(details). So I think we just need to identify that BackendSyncException on Android and route it to the existing dialog with the Check Database action. Is that the intended approach?
Best guess heuristic, trim, then match before the first newline
I'd put 'Check database' as a secondary action, not the primary, Keep 'OK' as the primary.
According to M3 guidelines:
If two actions are provided, one must be a confirming action, and the other a dismissing action.
So it should be "Cancel" on the left and "Check database" on the right.
Though, I don't see the point in telling the user to check the database instead of just doing it automatically.
Ok, agreed given the M3 guidelines. I'll give them another read. Thank you!
Check database: it can require a full sync, so I'd want an explicit user action to trigger it, if there was a subset which only did the optimisations, then we should run it automatically
I didn't know that Check database can cause a full sync and I suspect that most users don't know either, so maybe the dialog should explain that this is a possibility.