dendronhq / dendron

The personal knowledge management (PKM) tool that grows as you do!
https://wiki.dendron.so
Apache License 2.0
6.64k stars 252 forks source link

Glitching / Stuttering with Show Note Graph in Workspace #1800

Open ScriptAutomate opened 2 years ago

ScriptAutomate commented 2 years ago

Please select the area your bug applies to. (Multiple selections are Possible)

Describe the bug

Depending on whether the graph is interacted with, or particular steps are taken while the note graph is open, the workspace will glitch/stutter. This causes the open workspace to be unusable unless closing the Note Graph window, and I was unable to run a diagnostics report. I was able to dump the dendron log, though.

I'm not sure if I need to open a new issue, but I can't seem to run diagnostics in my workspaces. I get: error while running command: no workspace file

To Reproduce

Steps to reproduce the behavior:

  1. `Dendron: Show Note Graph'
  2. Ctrl+LeftClick inside Note Graph window, to highlight and create a multi-selector box
  3. Upon selecting multiple notes and letting go, the workspace bugs out

multi-select-node-graph-bug

Another approach:

  1. Dendron: Show Note Graph' (more reproducible inShow Full Graph` mode, for me)
  2. Select a note in the Note Graph
  3. Rename the note, placing it within a different hierarchy.
    • Example: testing.release -> testing.ref.release (where ref is a new hierarchy beneath testing)
    • This doesn't seem to cause a problem when adding a new sub-hierarchy at the end (ex. testing.release -> testing.release.announce)

rename-note-graph-bug

The glitching/stuttering appears much faster than the gif recorder is able to present

Expected behavior

No glitching/stuttering is triggered during specific renames or selecting multiple nodes in a note graph.

Could temporary disable the ability to multi-select within the Note Graph? If the multi-select is meant to open multiple notes at once, that should be revisited. If it isn't, the multi-select should be disabled perhaps.

Desktop (please complete the following information)

Additional context

Some reports from users in the community have run into this on Windows, too. Multiple users have experienced, and I was able to reproduce.

Dendron Log file

Please attach the output of > Dev:Dendron: Open Logs here

jonathanyeung commented 2 years ago

I think this is probably the same bug as with the infinite file-open cycling issue we've been discussing with graph view. Does your repro occur consistently?

ScriptAutomate commented 2 years ago

I think this is probably the same bug as with the infinite file-open cycling issue we've been discussing with graph view. Does your repro occur consistently?

Yeah. I can reproduce in each of my workspaces. Others in the Dendron Discord have experienced this, also.. Could definitely be related to the infinite file-open cycling issue, because that's what ends up getting triggered. If this is a duplicate, could combine issues or at least reference each other in them?

hikchoi commented 2 years ago

I've disabled the drag-to-select behavior temporarily to prevent this from happening. (this is in master and will be out with the next release) The current way we pass around messages between VSCode and the webview is causing this problem (multiple active note changes that triggers an infinite chain of messages to rerender the graph / switch active note back and forth), and it should be resolved fundamentally by better messaging, which will come in a bit. Just leaving this here for reference and keeping this issue open for now.