anchoredPopover.close() can clobber a newer popover sharing the same dom refKey
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 74/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript
- Área
- frontend
Línea de trabajo
Empieza en src/ui/popover.ts, en createAnchoredPopovers, y compara la ruta de cierre con la regresión I-21/stale-clobber en tests/unit/popover.test.ts. Ejecuta primero esa prueba y después actualiza el comportamiento para que un close handle conservado no pueda eliminar un popover más nuevo que ocupe el mismo refKey. Se considera terminado cuando el popover más nuevo permanece presente mientras el original todavía puede cerrarse de forma segura.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
anchoredPopover's close() (now in src/ui/popover.ts, createAnchoredPopovers) removes whatever node currently occupies app.dom[refKey] without verifying that node is the one it opened:
close() {
if (getRef(refKey)) { ... /* removes it unconditionally */ }
}
Repro: open popover A on refKey, open popover B on the same refKey (A's slot is now B), then invoke A's retained close() handle — B gets removed/clobbered even though A never touched it, and the keyboard owner it releases may no longer belong to A either (keyboard release itself is idempotent via the released flag in acquireKeyboardOwner; the DOM removal is not).
This predates the #588 phase-4 composition-root refactor (the code moved verbatim from src/ui/app.ts, byte-identical) — surfaced during that refactor's readiness review, not introduced by it. Deliberately not fixed there, per this repo's "surface out-of-scope findings, don't bury them" discipline: fixing it would have been a behavior change inside a PR whose scope and review budget were both set for a pure structural extraction.
A regression test pinning the current (buggy) behavior lives in tests/unit/popover.test.ts (search for "I-21" / "stale-clobber").
Suggested fix direction: give each open() call a token/generation and have close() no-op if the ref slot's current occupant token doesn't match the token the closer was handed.
- Lenguaje dominante
- TypeScript
- Estrellas
- 8
- Forks
- 2
- Merge medio
- 1 h 17 min
- PR fusionados (30 d)
- 3
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una 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 Altinity/altinity-sql-browser
-
inbox
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Altinity/altinity-sql-browser#605 ·
Los mantenedores suelen responder en 1 día
-
inbox
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Altinity/altinity-sql-browser#509 ·
Los mantenedores suelen responder en 1 día
-
inbox
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Altinity/altinity-sql-browser#489 ·
Los mantenedores suelen responder en 1 día
-
flamegraphAbiertoenhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Altinity/altinity-sql-browser#684 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
Altinity/altinity-sql-browser#680 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de Altinity/altinity-sql-browser
Issues similares
-
area/core status/need-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
google-gemini/gemini-cli#29602 ·
Los mantenedores suelen responder en 1 día
-
area: backend enhancement priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
snapotter-hq/SnapOtter#1879 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Tencent/BrowserSkill#390 ·
Los mantenedores suelen responder en 1 día
-
good first issue status: needs triaging type: bug version: 2.0
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
medusajs/medusa#17094 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día