Applications editor: make the save/rename interlock hold across tabs
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- frontend
調査の方向性
Start with src/features/instance/applications/lib/editorSaveInterlock.ts, which holds the in-memory save/rename interlock added in #1959, and find the save and rename call sites that use it. The task is to make that lock span tabs, probably with the Web Locks API, which needs a design decision on lock names per instance and path. Done means two tabs on one application can't lose saved text when a save and a rename of the same file overlap; this is hard to test automatically, so a manual two-tab check is likely needed.
索引モデルが issue の本文から書いたものです。
説明
What happens
#1959 makes an application file's save and a rename wait for each other (src/features/instance/applications/lib/editorSaveInterlock.ts). A save that lands while a rename is copying the file would otherwise lose the saved text: the rename reads the file, writes the copy and drops the original.
That interlock lives in one tab's memory. Two tabs on the same instance don't see each other, so a save in tab A can still land in the middle of a rename in tab B, and the saved text is lost from the renamed file.
It takes two tabs on one application, with a save and a rename of the same file within a second or so of each other.
Possible fix
Take the interlock across tabs with the Web Locks API: navigator.locks.request on a name per instance and path, held for the save or the rename. All tabs of an origin share it, and a closed tab's locks are released. BroadcastChannel could tell other tabs that a lock is held, but on its own it can't make one tab wait for another.
This only covers tabs in one browser. Another person, or the assistant's tools run elsewhere, can still interleave. The server would have to make renames atomic to close that.
Review-Deferral: 10b5354eb1c693c0 severity=nit category=concurrency
Raised by the cross-model review of #1959 (#1945).
🤖 Generated by Anthropic Claude Code (Claude Opus 5.5); posted via @dawsontoth.
- 主要言語
- TypeScript
- スター
- 5
- フォーク
- 4
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 140
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
HarperFast/studio のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
HarperFast/studio#2070 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
HarperFast/studio#2067 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
HarperFast/studio#2053 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
HarperFast/studio#2026 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
HarperFast/studio#2021 ·
メンテナーはふだん 2 日以内に返信
HarperFast/studio の issue をすべて見る
似ている issue
-
fehler
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Azure/azure-functions-nodejs-extensions#180 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
laaielichter/Threesmith#28 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 2 日以内に返信
-
iso-bmff: add IsoBoxReadView.readUint64 and IsoBoxWriteView.writeUint64 for exact 64-bit fieldsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
streaming-video-technology-alliance/common-media-library#611 ·
メンテナーはふだん 1 日以内に返信