Open GGlider opened 1 month ago
Hi @GGlider , thanks for reporting your observations!
This is related to #161, #162 and #163 and to some other closed tickets.
Originally implemented plugin startup sequence, which ends up with auto-application of custom sorting, doesn't work correctly on newer releases of Obsidian. It looks like every new Obsidian release brings some minor or major internal changes, which introduce unexpected sequences of events (unexpected from the perspective of the plugin logic) or previously non-existing states of views (vide the 'delayed views' introduced in Obsidian 1.7.2).
In some cases the plugin fails to auto-apply the custom sorting on start. In some other scenarios the plugin keeps trying to auto-apply the custom sort constantly (that's what you encountered probably) not having a clear status information of success or failure. On the same device with the same setup the behavior can vary between app starts.
The ultimate goal (and the challenge) is for the plugin to automatically apply the custom sorting on start. And do it once. The challenge at technical level is to recognise the state of the start up sequence, availability and state of dependencies, the scenario playing out.
I've created a new branch and dedicated Pull Request (#164) where I'm experimenting and collecting information about Obsidian behavior in various scenarios. So far there are more questions and open points than answers. Each testing round brings more items to the table.
Hi @SebastianMC Made some further tests: In my case it really seems to be connected with the typing and executing commands like copy paste.
Test: Typing, 2x 30s pause and shortly typing, at the end typing a lot...😅 https://github.com/user-attachments/assets/5087ea4c-58d6-4a10-82d9-d84cd80e6e79
Hope this docu helps!
Thanks @GGlider !
this ties the scenario to the 'metadata cache populated / updated' event raised by Obsidian. Theoretically the custom sort plugin (current version) should react only once to this event and try to apply custom sorting if it has not been applied already. It seems that in the specific scenario the plugin tries to apply custom sorting and fails (or 'thinks' so) so repeats the cycle on next metadata event from Obsidian.
Same behavior here with Obsidian v1.7.4 and Custom File Explorer sorting v2.1.14.
In the meantime, I've switched the "Enable notifications of plugin state changes" off for the plugin, which is an effective bandaid!
Just came to say that CFESorting v 2.1.14 and Obsidian 1.7.4 is doing this to me today. Thanks thompsonmj for the suggestion to turn off notifications. That helps.
I am not sure in which regard this is related to #162 and/or #163 but I read through them and there seems to be similar problems occuring.
Mine is "simple" and happened after I updated to the newest Obsidian version: When I am writing in a note, I get constant popups of the notifications both "Custom sorting ON" and "Parsing custom sorting specification SUCCEEDED!"
I cannot reproduce it on demand, it happens once in a while and unfortunately I cannot tell you what triggers this. But I'll keep an eye out and let you know.