Store state on remote instead of browser
- 主要语言
- TypeScript
- 星标
- 79.3k
- 派生
- 6.8k
- 平均合并
- 2 天 6 小时
- 30 天内合并 PR
- 41
描述
**Edit by @code-asher:** Storing the state in the browser has (at least) the two following problems:
1. If you switch to another browser you have to open and configure everything all over again (what this issue was originally about).
2. It is impossible to seed the initial state like you could in native VS Code by writing to the JSON state file.
Original issue content follows.
## OS/Web Information
- Web Browser: Chrome v91
- Local OS: Windows 10
- Remote OS: Ubuntu 20.04
- Remote Architecture: Debian
- `code-server --version`: 3.12.0
## Steps to Reproduce
1. Open a new code server instance in browser and make some changes (eg : hide remote host).
3. Open the same instance in incognito tab.
4. The changed made above will not be reflected, and you have to make those changes again.
## 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
贡献指南
调研方向
从所引用的 workbench.web.api.js.map 条目和 `StorageScope.GLOBAL` 条件开始,然后查看链接的讨论以了解状态存储的上下文。完成标准是:同一远程实例的状态更改能够在浏览器之间共享,并且能够支持 issue 中所述的初始状态播种。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript, vscode
- 领域
- full-stack, web-dev
- Issue 类型
- 缺陷
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 冷清
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100