Hey there!
I've just started using your plugin, and so far it's far ahead of the other plug-ins in terms of UI/UX for a human. However, it seems like my AI agents couldn't see the comments, so I made a small skill to parse the data.json file.
However, it seems like while reading is not an issue, direct edits to data.json are overwritten with in-memory state of the application.
I managed to patch (with the help of Codex) the local bundled main.js so external edits to data.json are picked up while Obsidian is running. The issue was that direct writes to the plugin data file could update disk state without updating SideNote’s in-memory comments array, so comments created by external tools were invisible until restart.
The patch adds a 2-second polling refresh, normalized fingerprinting of plugin data, and save/reload guards. When changes to the data.json are detected, it reloads plugin data, updates the CommentManager, re-renders SideNote views, and refreshes editor decorations.
Plugin-originated saves update the fingerprint and are guarded so SideNote does not react to its own writes to the file.
I'm happy to create a pull-request, but not sure if this is the best method to accomplish what I wanted.
Thank you for your continued development of the plugin!
Hey there!
I've just started using your plugin, and so far it's far ahead of the other plug-ins in terms of UI/UX for a human. However, it seems like my AI agents couldn't see the comments, so I made a small skill to parse the
data.jsonfile.However, it seems like while reading is not an issue, direct edits to
data.jsonare overwritten with in-memory state of the application.I managed to patch (with the help of Codex) the local bundled
main.jsso external edits todata.jsonare picked up while Obsidian is running. The issue was that direct writes to the plugin data file could update disk state without updating SideNote’s in-memory comments array, so comments created by external tools were invisible until restart.The patch adds a 2-second polling refresh, normalized fingerprinting of plugin data, and save/reload guards. When changes to the
data.jsonare detected, it reloads plugin data, updates the CommentManager, re-renders SideNote views, and refreshes editor decorations.Plugin-originated saves update the fingerprint and are guarded so SideNote does not react to its own writes to the file.
I'm happy to create a pull-request, but not sure if this is the best method to accomplish what I wanted.
Thank you for your continued development of the plugin!