Description
Is there an existing issue for this?
- I have searched the existing issues
OS/Web Information
Web Browser: Safari/Chrome on iPadOS (and other platforms)
Local OS: iPadOS
Remote OS: Ubuntu 24.04 LTS
Remote Architecture: ARM64
code-server --version: 4.100.2
Deployment Method: Docker via docker-compose, served through an Nginx reverse proxy with HTTPS.
Steps to Reproduce
Deploy code-server on an ARM64 server using the provided docker-compose.yaml and Nginx configuration.
Access the code-server instance from a client browser (e.g., on an iPad).
Perform any UI customization, for example, move the sidebar to the right.
Install an extension, for example, Kilo Code.
In the extension's settings, enter and save an API key for một LLM provider.
Hard refresh the browser page (Cmd+R or reload).
Expected
The UI layout (sidebar position, panel sizes, etc.) should be preserved.
The installed extension should remain active.
The saved API key within the extension's settings should be retained.
Actual
The UI layout resets to its default state.
The extension needs to be re-activated or sometimes re-installed.
Crucially, the saved API key is lost. Any settings stored by extensions are wiped.
This makes code-server effectively stateless and unusable for any serious work on affected platforms.
Logs
Initial debugging showed RequestStore#acceptReply and Unknown reconnection token errors, which were resolved by correcting the Nginx reverse proxy configuration to properly handle WebSocket headers. However, the state persistence issue remains.
The browser's developer tools provide the most critical evidence:
Under Application > Storage > IndexedDB, all code-server databases (vscode-web-db, vscode-web-state-db-global, etc.) show Is persistent: No.
The Service Worker is active and running, but calls to navigator.storage.persist() (injected for debugging) are silently denied, with the promise resolving to false.
Screenshot/Video
No response
Does this bug reproduce in native VS Code?
No, this works as expected in native VS Code
Does this bug reproduce in GitHub Codespaces?
No, this works as expected in GitHub Codespaces
Are you accessing code-server over a secure context?
- I am using a secure context.
Notes
Further Analysis & Proposed Solution:
The root cause is the browser's security and resource management policy, which refuses to grant persistent storage permission to the code-server origin in this specific environment (self-hosted, ARM, accessed from iPadOS). This is a browser-level decision that cannot be overridden by server-side configuration or client-side code requests.
Since forcing the browser to grant permission is not feasible, the most robust solution is to make code-server less reliant on browser-side storage for critical state.
We request a new feature: optional server-side synchronization for client UI state. This would involve syncing essential UI state (panel sizes, sidebar location, etc.) to a state.json file on the server's file system, similar to how settings.json is handled. This would make code-server resilient to browser storage policies and dramatically improve its usability on platforms like iPadOS.