dendron
dendron copied to clipboard
incorrect note created on lookup (+ possible race condition?)
Please select the area your bug applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)
- [ ] Workspace. VSCode workspace, vaults, Intellisense/autocomplete, Dendron settings
- [x] Lookup. Dendron's Lookup Command
- [ ] Views. Dendron Preview, Tree View, Side Panels in the UI
- [ ] Schema. Dendron Schemas
- [ ] Pod. Data import from / export to Dendron
- [ ] Publish. External Site Publish
- [ ] Markdown. Markdown features, such as syntax support and features
Describe the bug
Sometimes, when I type note.that.doesnt-exist into dendron, it'll create a note with a truncated title (e.x. note.that.doesnt-exi. When I try to rename the note, it says note.that.doesnt-exist already exists.
To Reproduce
- Create a new note with Lookup, but type really fast.
- Try to rename the note (if it gets named incorrectly).
Expected behavior
Either...
- The note gets created with a correct title the first time.
- The note gets created with an incorrect title, but can be renamed.
Screenshots
Next time I run into the renaming thing I can take a screenshot.
Desktop (please complete the following information)
- OS: MacOS 12.4
- Versions (all that apply to bug):
- Dendron Extension: v0.98.0
- VS Code version: 1.68.0
Dendron Log file
Have since restarted VSCode, I'll attach this when I see it.
Thank you for the report @nikhiljha. We have recently made some tweaks to the lookup command so that this happens a lot less. As far as I'm aware, there are multiple reasons this happens, so we'll keep track of this issue and let you know when we fix it.
@jonathanyeung, pinging for visibility. Does the recent fix resolve this issue?
Hmm, the recent fix I made should address latency at the leading edge of the query, for example te.that.doesnt-exist. I made a fix several months ago that should help with the trailing edge problem, but I haven't seen this issue since then.
@nikhiljha - how often does this repro for you? I'll keep an eye out and revisit the code.
Okay so I wasn't able to reproduce this since filing this issue, until today.
If you have the "Spell Right" plugin installed (which I believe is workspace recommended?) and then type a really long line (paragraph length), then future inputs on that line become very high latency. (I can type a sentence and it'll appear 20 seconds later).
Once VSCode is lagging like that I can consistently get this bug to trigger. I'm not sure if this is just my machine, but I have very normal standard hardware (M1 Mac) so I'd be surprised if it was just me.