This protocol finds or creates a new note with a given roam_key (see Files):
So I assumed, that when I use my bookmarklet to create a reference note then on the first use I create a new note. If later I use the bookmarklet again on the same URL then I expected roam-ref protocol to open the already existing note. Instead it captures a new note. If I would finish to create the new note the result wourld be:
Looking at org-roam-protocol-open-ref, it does not look to be able to open a file when ref already exists. I could be wrong, but the documentation might need updating (or the function).
I just posted an issue on github. There is a function org-roam--find-ref in org-roam.el that looks like it was designed to see if a ref exists and open it, but this function is referenced nowhere in the source tree.
I consider this a bug, especially because capturing the same ref multiple times would lead to the duplicate ref warning.