Detect duplicate documents (especially on import)
TL;DR: Sometimes when bulk-importing, duplicates might be accidentally imported. Catch these potential duplicates and query if we still want to import.
When performing bulk imports, I occasionally have duplicates present (due to the way my main import source structures PDFs). This ultimately means that what I think might be a unique file actually already exists in GoodNotes. Ideally, this could work at the PDF level, but may only be easily-done on a fuzzy-name basis.
e.g. say the file I'm importing has the name "Mind Games 40c0de54-120f-0d77-9ae5-e96083fb1f9b" – while the UUID present (the 40c0de54-120f-0d77-9ae5-e96083fb1f9b) is very likely to be unique, I may later import a PDF named "Mind Games: Game Engines as an Architecture for Intuitive Physics"... both of these files actually have the same underlying PDF.
In the case of a filename based duplicate detector, it would ask if I wanted to import "Mind Games: Game Engines as an Architecture for Intuitive Physics" because I already have a note named "Mind Games 40c0de54-120f-0d77-9ae5-e96083fb1f9b" since "Mind Games" (especially because of the order/capitalization) could quite likely be the same file.
In the case of a PDF-based duplicate detection, it should be somewhat straightforward to compare the SHA256 of the original PDF backing "Mind Games 40c0de54-120f-0d77-9ae5-e96083fb1f9b" to the incoming PDF named "Mind Games: Game Engines as an Architecture for Intuitive Physics" and if they're the same, there's clearly an overlap, so ask if we still want to import.

-
cc commented
I’ve been facing this problem since I restored my notes from a backup.
I keep my notes safe by maintaining two backups: one on iCloud and one on Google Drive, so I had two copies of each note.
When I backed up my database recently, quite a few notes had errors. But I didn’t pay much attention to it, since I had already backed up all my notes to Google Drive.
The worst part is, after I set up and moved my notes back from Google Drive, then turned on iCloud sync—all the notes were duplicated!
And only the iCloud copy has the original edit time, and I want to keep it. So now I need to check the date of each file and delete the old one, one by one!