Store state on remote instead of browser - #7914
Open
Daywin67 wants to merge 1 commit into
Open
Conversation
Daywin67
marked this pull request as draft
July 30, 2026 15:00
Daywin67
marked this pull request as ready for review
July 30, 2026 15:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4212
Problem
Workbench state was stored in browser local storage, so it was not shared between browsers or incognito sessions.
Motivation
The goal is to provide the same persistent development experience as using VS Code on a personal computer, with an identical workspace available from anywhere and from any browser.
Persisting the workbench state on the remote server is important to achieve that experience: settings, authenticated accounts, and other state should follow the remote workspace rather than the local browser.
Solution
Store the relevant state on the remote, restoring the behavior expected by code-server users.
Based on @hefanbo fix proposition. Thanks to him. Link
Test
Testing steps:
The same behavior also works with a BYOM provider API key configured in GitHub Copilot.
Tested & deployed on my personal vscode-server self hosted instance.
AI assistance and review
This change was developed with the assistance of an AI coding assistant. I reviewed and tested the implementation on my self-hosted code-server instance running on a NAS.
However, I cannot fully assess all possible side effects or interactions with other code-server features. Community review, testing, and criticism are very welcome, especially regarding compatibility, security, and backward compatibility.