Textualize / frogmouth

A Markdown browser for your terminal
https://www.textualize.io/
MIT License
2.35k stars 42 forks source link

Bug: The local filesystem tree is doubling up on entries #50

Closed davep closed 1 year ago

davep commented 1 year ago

Mentioned in a video on YouTube. The content of the local file view is doubling up the entries for some reason:

Screenshot 2023-05-25 at 11 03 26
davep commented 1 year ago

Weird. My initial suspicion was something relating to the recent changes to DirectoryTree and perhaps the use of a filter; so I removed the filter for a moment, ran up the application, and it fixed the issue. So I put the filer back, ran up the application, and...

Screenshot 2023-05-25 at 12 50 02

So now I can't actually recreate the issue any more!

davep commented 1 year ago

Recreating this is a bit hit-and-miss. On my own M2 Pro Mac Mini I can generally recreate this if I run the pipx-installed version, but if I run a "local" copy from the repo I can never reproduce it.

I do, however, have a hypothesis as to what might be going on. The recent changes to DirectoryTree in Textual itself, to load directories in the background, does have a possible window of opportunity whereby the root of the tree could end up getting loaded twice, in an additive way. I'm struggling to think of a way of forcing that to happen, but I think there's a chance it could and it would explain what I'm seeing here.

willmcgugan commented 1 year ago

Assuming fix. Unable to reproduce with latest Textual.