Thatâs actually kind of cool
Wonât this potentially result in duplicate notes that are only unique on the guid/anki note id level? Iâm not sure this is a complete solution because users could unknowingly have a bunch of duplicates across decks, resulting in more reviews.
Iâm wondering if we should try to come up with a solution such that normal users wonât need to make a decision about related to this detail. I.e., I wonder if we can make this problem totally opaque to normal users.
That said, from a UX perspective, I think the primary thing we should solve for here is to avoid
- average users needing to care about this
- inadvertent proliferation of duplicate notes, resulting in more reviews
@jakub.f , I think the solution of just skipping duplicates is a fine solution for now. I think the average user doesnât need to care and this will avoid errors.
In the future, we may need an âadvanced,â option which would essentially allow users to choose which version of the notes to prefer, as @jakub.f suggested. I could imagine a simple way of ordering subscribed decks in order of priority/preference and the ordering decides which deck/note version to prefer when installing or updating. However, we may be able to avoid this (which would be preferable, probably) with an alternative approach (see below)
My original solution for this was to use a single ID for notes such that the primary key in AnkiHubâs database was the same as the Anki Note ID. and that we could therefore treat the Anki Note ID as a GUID. This would have required us modifying the Anki Note ID at deck creation time.
Other questions that come to mind:
Should we consider solving this on the backend? For example:
- a data migration that ensures all Anki Note IDs are unique
- modify Anki Note IDs locally on the next sync
- modify the deck creation process to ensure Anki Note IDs are unique
- upload the deck
- return a payload with new Anki Note IDs
The above would have the downside I mentioned above: users could subscribe to multiple decks and unwittingly get a bunch of duplicate notes.
Perhaps this could be mitigated one the AnkiHub side by helping deck maintainers identify duplicate notes, not just in their own decks but across all AnkiHub notes.