Open abhay-ranawat opened 2 years ago
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.
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.
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 ~/.local/share/code-server/User/state
or the browser 's site data - but it should be documented, which is the case.
👉 In order to reset the state, one has to either delete ~/.local/share/code-server/User/state
or clear the browser's site data.
ℹ️ I had to delete folder ~/.local/share/code-server/User/state
after I moved from debian:buster
to debian:bullseye
, because e.g. the new Python version was not displayed correctly in v3.10.2.
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 upstream
and then adding stale
or revalidate
or something to those when we update Code?
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.
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.
There might be a clean way to do it
How about a plugin ?
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: https://github.com/microsoft/vscode/issues/210775
maybe with enough upvotes we can get it changed without having to patch it here
In a century, maybe.
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.map Perhaps it's related to where the state is saved? From discussion : https://github.com/cdr/code-server/discussions/4185