Workbench var-strip rebuild signature ignores enum option identities (only counts them)

Abierto Apto para principiantes
#605 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
76/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/workbench/variable-strip.ts, en renderVarStrip y en el cálculo de sigNew para reconstruir la firma, comparándolo con el código trasladado desde src/ui/app.ts. Reproduce dos pasadas en las que las opciones de enum inferidas tengan la misma longitud pero identidades diferentes, y después añade cobertura que muestre que el desplegable se actualiza del conjunto antiguo al nuevo. Se considera terminado cuando los cambios en la identidad de las opciones activan una reconstrucción sin depender únicamente de enumOptions.length.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

inbox

renderVarStrip's rebuild-signature computation (src/ui/workbench/variable-strip.ts, the sigNew build — moved verbatim from src/ui/app.ts, present unchanged on origin/main before the #588 phase-4 refactor) folds in each variable's control kind and enumOptions.length, but not the option identities:

return v.name + ':' + v.type + (v.optional ? '?' : '') + (v.conflict ? '!' : '')
  + ':' + c.kind + (c.enumOptions ? c.enumOptions.length : '');

Repro: a variable's inferred enum options change from ['a', 'b'] to ['c', 'd'] (same cardinality) between two renderVarStrip passes — e.g. a background schema/column reload landing between keystrokes. The signature is unchanged, so the strip does not rebuild, and the dropdown keeps offering the stale ['a', 'b'] set even though deps.params.inferredEnumOptions(...) now returns different values.

Surfaced during phase 4 of the #593 refactor umbrella's PR review (#604) — pre-existing, not introduced by that PR, and deliberately left unfixed there (a pure structural extraction is not the place for a behavior change). A comment at the signature site documents this; no regression test was added for the same reason.

Suggested fix direction: fold a stable digest of the option identities themselves into the signature (e.g. join the resolved enumOptions array), not just its length.

Lenguaje dominante
TypeScript
Estrellas
8
Forks
2
Merge medio
1 h 34 min
PR fusionados (30 d)
6

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Altinity/altinity-sql-browser

Todos los issues de Altinity/altinity-sql-browser

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.