Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esbonio does not always show content for files with identical names #951

Open
marcel-22 opened this issue Jan 22, 2025 · 4 comments
Open
Labels
bug Something isn't working lsp Issues that relate to the language server
Milestone

Comments

@marcel-22
Copy link

Expected behavior

Have a working preview for each individual file.

Actual behavior

In a multi-root workspace we have multiple Sphinx projects defined, each with their own index.rst. When I switch between those files, for example activating another index file, sometimes(?) the preview does not switch to the content for the selected file, but instead still shows the content of the previously shown index.rst. When I close the Esbonio preview window inside the IDE, and then reactivate the preview, the tab with the old index.rst is activated in the editor whilst the other index.rst was active!

I am not sure what the conditions are, for example when documents are edited etc.
Before I start collecting more information, I would like to ask if this is a known issue?

Log output

(Optional) Settings from conf.py

@marcel-22 marcel-22 added bug Something isn't working triage Issues needing triage labels Jan 22, 2025
@alcarney
Copy link
Member

When I close the Esbonio preview window inside the IDE, and then reactivate the preview, the tab with the old index.rst is activated in the editor whilst the other index.rst was active!

I hoped v0.96.1 included a fix for that - are you still on v0.96.0 at the moment?

the preview does not switch to the content for the selected file, but instead still shows the content of the previously shown index.rst

I'll have to see if I can reproduce it, but I think I can guess what's happening.

If you switch from docs/index.rst in root A to docs/index.rst in root B, then the preview url for each document will be identical. It's possible that the <iframe> in the preview pane is reading from its cache rather than the server - resulting in you seeing the wrong content.

Hopefully it's just a case of making sure the urls are unique in some way 🤞

@alcarney alcarney added lsp Issues that relate to the language server and removed triage Issues needing triage labels Jan 23, 2025
@alcarney alcarney added this to Esbonio Jan 23, 2025
@github-project-automation github-project-automation bot moved this to Todo in Esbonio Jan 23, 2025
@alcarney alcarney added this to the 1.0 milestone Jan 23, 2025
@marcel-22
Copy link
Author

I hoped v0.96.1 included a fix for that - are you still on v0.96.0 at the moment?

Hm, I have manually installed v0.96.1 and I believe the issue occured with that version..

@alcarney
Copy link
Member

That's disappointing, will have to investigate when I look at the rest of the issue :/

And I assume esbonio has done a full rebuild of the docs since the upgrade?

@marcel-22
Copy link
Author

I will check again, maybe it was with v0.96.0, I am not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lsp Issues that relate to the language server
Projects
Status: Todo
Development

No branches or pull requests

2 participants