Repository navigation
fix(window): the panel's table and its pool read one rule, not two - #1308
Merged
Merged
Conversation
The panel still opened on one arm of 114. #1307 taught the pool that an arm which kept the query as its own neighbour is superseded only where the window also holds arms that excluded it, but the table is built by visibleResults() in another file, and that copy kept the old rule: hide every arm whose exclude_self is false. In this window 112 of 114 are exactly that, so the table dropped them all and left the two method arms, one of which is the reference. The rule now lives once, inside visibleResults, which already receives every result and can see whether anything in the window excluded the query. The panel's pool calls that same function instead of filtering by hand, so the two cannot drift apart again. A hand-rolled copy of a rule is what made this bug possible, and removing the copy is the fix, not patching it. The test states production's shape: two method arms with no exclusion and neighbour arms that keep the first hit on purpose, all of them visible without asking for the superseded ones.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
El panel seguia abriendo con un brazo de 114, con la revision anterior desplegada.
Por que. #1307 enseno al
poolque un brazo que conservo la consulta como vecino propio esta superado solo donde la ventana contiene ademas brazos que la excluyeron. Pero la tabla no la arma el pool: la armavisibleResults(), en otro fichero, y esa copia mantenia la regla vieja --esconder todo brazo conexclude_self === false--. En esta ventana 112 de 114 son exactamente eso, asi que la tabla los tiraba todos y dejaba los dos brazos de metodo, uno de los cuales es la referencia: "1 de 1 brazos".El arreglo quita la copia, no la parchea. La regla vive ahora una sola vez, dentro de
visibleResults, que ya recibe todos los resultados y puede ver por si misma si algo en la ventana excluyo la consulta. Elpooldel panel llama a esa misma funcion en vez de filtrar a mano, asi que las dos no pueden volver a divergir. Una copia a mano de una regla es lo que hizo posible este fallo.El test fija la forma de produccion: dos brazos de metodo sin exclusion y brazos de vecinos que conservan el primer hit a proposito, todos visibles sin pedir los superados. 21 pruebas en verde en local.