orgzly-revived / orgzly-android-revived

Outliner for taking notes and managing to-do lists
https://www.orgzlyrevived.com
GNU General Public License v3.0
669 stars 42 forks source link

git repo: incorrect sync attempts on ignored file #330

Open tmplt opened 1 month ago

tmplt commented 1 month ago
  1. Sync git repo
  2. Add notebook file to .orgzlyignore from a remote repo
  3. Sync again: it partially fails with a notification that the "notebook has no repository link"

Deleting the notebook fixes the issue, but I expected the ignore to be automatically respected. Unsure it this is expected behavior due to the general error message. If no behavior change is in-scope, some message in the error noting that the notebook can be safely removed would be nice.


Device: Pixel 7a
Android Version: 14
Orgzly Revived Version: 1.8.26
Sync repository type (directory/Dropbox/WebDAV/Git): git
amberin commented 1 month ago

This is currently the expected behavior upon the second sync after adding the ignore rule. Upon the first sync, the message should be that the notebook was removed from the repository, and that it needs to be linked to a repo if the user wants to sync it.

Your feedback is valuable; apparently the current UX is not 100% intuitive.

I'm open to suggestions about the optimal UX in this scenario.

On the one hand, I believe that if a user has chosen to ignore something in their repo, it should be fairly obvious that they can safely delete the corresponding notebook from Orgzly. But I'm sure the experience can be improved.

I expected the ignore to be automatically respected

I suppose you mean that the notebook should be immediately deleted. I believe this is somewhat risky, since a new ignore rule may not have exactly the result that the user intended. If the notebook is deleted from Orgzly, there is no easy way to restore it, and the user may not even notice that it's missing. That's why I opted for a sync error message and de-linking from the repo.

tmplt commented 1 month ago

I'd be happy if the error message is expanded to (conditionally) explain that the file is in .orgzlyignore now, and that the notebook can probably be safely removed. I do agree that the removal should be a manual action (e.g. shared reposity).

amberin commented 1 month ago

@tmplt The thing is, there is currently no way for Orgzly to distinguish between a deleted file and an ignored file. It just no longer sees the file in the repo. I think making this distinction would require a significantly more complex storage abstraction.

But I am curious why you never got to see the longer error message upon your first sync. The later error message "notebook has no link" is not enough on its own.

tmplt commented 1 month ago

I just retried and got the longer message.