Repository navigation
Conversation
…dified The quote of an existing order is cached for a minute and its key only holds the order and the origin warehouse. The API quotes with the current lines and destination of the order, but saving a modification invalidated orders and inventory only: dispatching within that minute showed the old quote and sent its shipping_cost, which the backend stores on the shipment. Saving a modification now removes the quotes of that order, so the next dispatch asks the carriers again with the new lines and address. Quotes of other orders are left alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Revisado. No lo mergearía para esta entrega. El análisis es correcto: Es un bug de verdad, pero acotado: dura hasta un minuto, se corrige solo y hace falta modificar una orden y volver a cotizar dentro de esa ventana. Lo agruparía con #70, #74 y #75 en una sola card de pulido para después de la entrega. |
This was referenced Oct 3, 2026
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.
Ticket de Jira
https://proyectofinalfrlp.atlassian.net/browse/TESIS-999026
Descripción
La cotización de una orden existente (TESIS-134) se cachea un minuto (
useOrderQuotes,staleTime: 60_000) bajoquoteKeys.order(orderId, originWarehouseId), una clave que no sabe nada de la versión de la orden. La API cotiza con las líneas y el código postal actuales de la orden, pero guardar una modificación (useUpdateOrder) sólo invalidaba órdenes e inventario.Repro en
master:POST /shipments/:id/dispatchmanda elshipping_costviejo, que el backend guarda en el envío.useUpdateOrderborra (removeQueries) las cotizaciones de esa orden al guardar, de cualquier depósito de origen. Se borran y no sólo se invalidan: el diálogo de despacho está cerrado, y una entrada invalidada se seguiría mostrando hasta que llegue la nueva.useUpdateOrder.test.tsx(no había): borra las de esa orden, conserva las de otras y sigue invalidando la orden.Evidencia visual
N/A
Cómo probar
Verificación:
npm run test(679 tests, 0 fallas),npm run lint,npm run format:checkynpm run buildlimpios.Impacto y consideraciones
¿Introduce breaking changes?
No
¿Requiere nuevas variables de entorno?
No
¿Afecta la arquitectura o genera un nuevo patrón?
No
🤖 Generated with Claude Code