You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realized there is a race condition that can occur when using the Capture thought functionality while having multiple Contexts set in the settings. In this setup, the user gets prompted immediately after the new note is created by the Capture thought flow to select the context to apply to the note. If the user selects a context too quickly, the frontmatter properties of the new note end up getting overwritten (sometimes a property or two might survive, but in some test cases I found none of them did).
I suspect the issue arises right around this section of the code. I need to try adding in some sort of check to validate the new note is "at rest" and fully created prior to running the following steps of the flow.
The text was updated successfully, but these errors were encountered:
From some further testing, this may only arise in the case of vaults containing a large number of notes. I first saw this bug in my own real vault, which has ~2,300 notes but when I tried to replicate the error in my test vault (with only ~10 notes) I couldn't ever select the context fast enough to create the same race condition. This makes sense as it's likely related to the metadata cache update occurring on the new note.
I realized there is a race condition that can occur when using the Capture thought functionality while having multiple Contexts set in the settings. In this setup, the user gets prompted immediately after the new note is created by the Capture thought flow to select the context to apply to the note. If the user selects a context too quickly, the frontmatter properties of the new note end up getting overwritten (sometimes a property or two might survive, but in some test cases I found none of them did).
I suspect the issue arises right around this section of the code. I need to try adding in some sort of check to validate the new note is "at rest" and fully created prior to running the following steps of the flow.
The text was updated successfully, but these errors were encountered: