Applications editor: make the save/rename interlock hold across tabs
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- frontend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 5
- Forks
- 4
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 144
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de HarperFast/studio
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
HarperFast/studio#2070 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
HarperFast/studio#2067 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
HarperFast/studio#2053 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
HarperFast/studio#2026 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
HarperFast/studio#2021 ·
Los mantenedores suelen responder en 2 días
Todos los issues de HarperFast/studio
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
duolicious/duolicious#1943 ·
Los mantenedores suelen responder en 1 día
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
nightly-labs/openbot#6451 ·
Los mantenedores suelen responder en 1 día
-
complexity: easy good first issue impact: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ueberdosis/hocuspocus#1211 ·
Los mantenedores suelen responder en 1 día
-
e2e-failure ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
redhat-developer/rhdh-plugin-export-overlays#4733 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
S-Needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días