franciskafieh / obsidian-list-modified

🪨 The advanced and adaptive changelog for Obsidian. Links all modified files meeting certain criteria to a timed (daily, weekly, monthly) note.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: only update daily notes on the one computer that is currently seeing activity, to avoid backend sync issues

thomasvs opened this issue · comments

Enabling this plugin on multiple computers that I sync with SyncThing, I notice it ends up creating a lot of conflicts. My guess is that's because the plugin is running on multiple computers, making changes to the daily notes on each of them independently, and making conflict resolution hard/impossible for the underlying sync mechanism.

I saw another issue that seemed similar on iCloud.

I think one way the issue can be avoided is for the plugin to be aware of the Obsidian process being actively used or not in some way, so that only one copy at any point is getting updates.

I don't know if obsidian exposes a useful signal of activity?

I notice it ends up creating a lot of conflicts

could you elaborate a little? what are the conflicts? how/when exactly do they happen? could help me understand better :)

I think one way the issue can be avoided is for the plugin to be aware of the Obsidian process being actively used or not [...] so that only one copy at any point is getting updates

if you mean what i think you mean, this is not possible... all i can do is manipulate a file on your local computer the plugin is installed on

syncthing synchronizes in the background and is typically able to merge conflicts automatically.

Most conflicts are in the list of recently edited files at the bottom updated by this plugin, and they are conflicts for the daily log itself. So my theory is that the plugin is active on multiple computers, which then triggers creating a conflict file, and that conflict file then gets added to the daily log on either computer, causing a few repeats until one sync does automatically merge, at which the chain stops.

do the conflict files follow a certain naming convention? i could add a feature to ignore files that match a certain regex pattern

edit: googled it and it seems to be <filename>.sync-conflict-<date>-<time>-<modifiedBy>.<ext>

would love if you could confirm though :)

If yes, I could make this a setting. just gotta create new RegExp()s for each in the list and check the file name before appending :)

@thomasvs can you please give me an update on this?

Closed due to inactivity

I don't have any conflict files right now to compare it to, but the regex you propose looks correct to me. That may reduce issues with use on multiple computers when using SyncThing.