-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Store state on remote instead of browser #4212
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
Comments
Thanks for opening this up @abhay-ranawat! We'll have to investigate |
I have the same issue. It would be great to have this resolved with v3.12.1. |
That's unlikely to happen given our bandwidth (just setting expectations) but at least we know multiple folks are experiencing this issue. |
Given the changes made in code, everyone should face it (AFAIK) only few might be noticing it. |
Agreed. I noticed it because I regularly delete all cookies and site data that the browser stores. I don't mind setting an exception for the domains on which code-server is deployed, though. It doesn't matter whether the state is stored in ℹ️ I had to delete folder |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days. |
As for stale bot see https://drewdevault.com/2021/10/26/stalebot.html: This is a terrible, horrible, no good, very bad idea. |
That was a great read. In the past we would periodically run through old issues and close out ones that no longer were applicable (this is because things can change a lot when we update Code versions) and the stale bot moves that burden off us to those who opened the issue. We could just leave them alone but we felt like keeping issues up to date was part of good repository maintenance. Maybe there is a better solution, like labeling issues that are on the Code side with something like For the browser state I did look into moving it back to the remote file system but it looked non-trivial so I abandoned that effort since we generally try to avoid patches that deviate too aggressively from mainline. There might be a clean way to do it with a bit more investigation though or maybe upstream would be receptive of a change to make this behavior configurable. |
The main goal of this patch was to make user settings stored on disk instead of in the browser, but this stopped working some time ago. Not only that but it is causing a bug where a workspace will not fully open. A secondary goal was to fix the Vim extension but the extension appears to work just fine without this change now (both the server and browser versions). This patch is not useful anymore anyway because there are remote-level settings that *do* get stored on disk and can be used instead of user-level settings when necessary. Fixes #3061, and possibly #6153.
For now i believe we are going to leave this as-is. If someone wants to dive in and figure out how to move the state to the remote like we do with settings, a PR would be much welcome. |
How about a plugin ? |
Maybe! Something similar to settings sync, where it syncs the state to and from the disk maybe? |
Yeah. Maybe more code-server features could be implemented as plugins and preinstalled for easy activation. |
I like that idea. |
Went ahead and re-opened, still no plans but I do think it would be nice especially since native settings sync does not work with code-server. |
What is being willed is to visual code work as Jupyter Lab does with workspaces, totally portable. In Jupyter Lab, if I run a python file at home computer and open Jupyter interface on work computer, I get the same screen. If I do in code server, I get a new screen and if I need to rerun the python file (mainly if it is a server app), I need to open a new terminal (original one became a ghost, vanished) find its pid, kill it and run again. If I open a next server, it even vanishes from forwarded ports panel, inducing to open a new terminal, start next server again, with a new port (the previous one is used, by a ghost process). Jupyter Lab guys figured out those problems in the beginning of Jupyter notebook classic as reporting already running terminals and made somehow web development easier done in multiple machines than visual code server. |
@fulllagado1 For your use case, use a terminal multiplexer such as screen or tmux. |
Seems the upstream issue for this was closed right away but maybe with enough upvotes we can get it changed without having to patch it here: microsoft/vscode#210775 |
In a century, maybe. |
Faced the same needs, and spent 2 days trying to find settings / "hack" the global state / load profiles during the first run and through the URL It would be really great to have this possibility for store state on the server side. |
Edit by @code-asher: Storing the state in the browser has (at least) the two following problems:
Original issue content follows.
OS/Web Information
code-server --version
: 3.12.0Steps to Reproduce
Expected
Till v3.11 the state of code-server was maintained across browsers.
Actual
The state is saved local storage instead of server and hence the changes does not reflect on browser changes.
Notes
scope === StorageScope.GLOBAL ? 'global' : this.payload.id;
it is in workbench.web.api.js.mapPerhaps it's related to where the state is saved?
From discussion : #4185
The text was updated successfully, but these errors were encountered: