Unsaved editor comes back after "Don't Save" when switching between Windows and macOS browsers
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- devtools
調査の方向性
Start in src/vs/workbench/services/workingCopy/common/workingCopyBackupService.ts, especially hashPath and the backup deletion flow. Reproduce the Windows-to-macOS browser sequence and compare fsPath with resource.path for the untitled editor. Done means choosing "Don't Save" removes the existing backup and the editor does not return after reload or restart.
索引モデルが issue の本文から書いたものです。
説明
Is there an existing issue for this?
- I have searched the existing issues
OS/Web Information
- Web Browser: Chrome (Windows user agent), Edge 153 (macOS user agent)
- Local OS: Windows, macOS
- Remote OS: Ubuntu 24.04
- Remote Architecture: amd64
code-server --version: 4.117.0 ddeb0a3de0321412c0633dffa85d35770005ae0f with Code 1.117.0
Steps to Reproduce
- From a Windows browser, run this in the terminal (the file doesn't exist):
/app/code-server/lib/vscode/bin/remote-cli/code-server --reuse-window /home/user/project/notes.txt. An untitled editor opens, and a backup is written toUser/Backups/<workspace>/untitled/-dd15b27. - Close the browser tab.
- Open code-server from a macOS browser. The editor is restored.
- Close it and pick "Don't Save".
- Reload. It's back, and
untitled/-dd15b27is still there.
Expected
The editor stays closed and the backup is deleted.
Actual
macOS tries to delete untitled/142ac6d3, which doesn't exist. The Windows backup stays, so the editor reopens on every load, even after restarting code-server. Closing it from Windows works.
Logs
None.
Screenshot/Video
No response
Does this bug reproduce in native VS Code?
This cannot be tested in native VS Code
Does this bug reproduce in VS Code web?
I did not test VS Code web
Does this bug reproduce in GitHub Codespaces?
I did not test GitHub Codespaces
Are you accessing code-server over a secure context?
- I am using a secure context.
Notes
The backup file name is a hash of fsPath (hashPath in src/vs/workbench/services/workingCopy/common/workingCopyBackupService.ts). In the browser, fsPath uses backslashes on Windows and forward slashes everywhere else, so the same file gets a different backup name depending on the client:
\home\user\project\notes.txthashes to-dd15b27/home/user/project/notes.txthashes to142ac6d3
Hashing resource.path for untitled files would fix it, though backups already written with backslash names would still need cleaning up. It's still like this on VS Code main, and none of the patches in 4.139.1 touch it.
- 主要言語
- TypeScript
- スター
- 79.5k
- フォーク
- 6.9k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 41
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/code-server のほかの issue
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
coder/code-server#7976 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
coder/code-server#7962 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
bug needs-investigation
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
coder/code-server#7955 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
coder/code-server#7948 · コメント 1 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug code-server needs-investigation
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
coder/code-server#7938 · コメント 3 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
coder/code-server の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
lichess-org/api#678 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
PostHog/posthog.com#20628 ·
メンテナーはふだん 1 日以内に返信
-
bug status:Needs Triage
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
jupyterlab/jupyterlab#19964 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
agentscope-ai/QwenPaw#8064 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area: notebooks-jupyter bug theme: new notebook frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
posit-dev/positron#16347 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信