WorkspaceService.open() reloads full app even with { preserveWindow: true } – how to switch workspace without full reload? #16023
Unanswered
sumit140792
asked this question in
Q&A
Replies: 3 comments 4 replies
-
Hey @sumit140792, I don't think this is possible. You will find that VSCode has the same issue. Note that the On a technical level, a lot of things have a dependency to the workspace. For example, the plugin host needs to be restarted when changing the workspace, etc. It is just much easier to reload the whole frontend than to ensure that every component can correctly deal with a changed workspace. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Theia team,
We are currently using Theia in a custom setup and trying to switch workspaces without reloading the entire app or losing the UI state.
await this.workspaceService.open(workspaceFilePath, { preserveWindow: true });
This avoids opening a new browser tab.
But the application still reloads, and we lose things like open editors, side panel state, etc.
Questions:
Is there a supported way to create a new project and open it as a workspace without reloading the full browser context?
Is the workspace switch API (workspaceService.open) designed to always trigger a reload?
Are there any workarounds to simulate a workspace switch more smoothly, e.g. by dynamically updating the workspace roots without triggering a hard reload?
We want a smooth UX where switching workspaces doesn't force a full browser reload or destroy state.
Beta Was this translation helpful? Give feedback.
All reactions