Open codingthat opened 1 year ago
I see this was already implemented at https://github.com/xuhcc/mindstream/blob/858f506f6e0849950e88b3cf318a6cf7b17b64a5/src/app/shared/todo-file.service.ts#L12 . Maybe 60s is too long for my use case, since I often enough switch projects to jot down a new idea/todo within a minute of the last update from the previous context?
Is there any danger to making it check every 500ms? Or is it better to trigger an immediate check when the tab receives focus?
500 ms seems to work OK here (with just 2 tabs, anyway), for what it's worth. Definitely solves the above issue, at least. ✔
I would change it to 5s first, to see how this affects performance
Hey, something small and reproducible for once ;)
v1.6.1
So the stale state from browser 2 becomes current again because browser 2 wasn't refreshed first.
This is also true if browser 2 was already opened and just not refreshed lately.
Perhaps whenever receiving the focus, or maybe on any user action, the file timestamp could be checked and a refresh forced only if todo.txt seems to have been modified since we last modified it (implying another tab or CLI or manual edit modified it).
I often use mindstream in multiple tabs because it's nice to have one-click access to multiple views by project/context/etc. More specifically, it's nice to keep a mindstream tab filtered by the relevant project beside other tabs relevant to the project, all in the same browser window.
Same goes for doing cleanup in a text editor though. Either way you have to remember to refresh in every browser tab, otherwise you risk losing all your changes and have to redo them.