RBoy
(RBoy)
4 Enero, 2026 19:23
1
¡Feliz año nuevo!
Encontré un error secundario después de que se corrigiera el error original aquí: Minor UI bug in LLM Usage page - #2 by zogstrip
Cuando se carga la página, la duración de tiempo predeterminada es el mes pasado.
Hago clic en el menú desplegable del modelo y veo esto:
Me muestra todos los modelos que se utilizaron el mes pasado.
Ahora selecciono uno de los modelos:
Ahora hago clic en Últimas 24 horas, y todavía me muestra la misma lista (y uso):
Esto es incorrecto, parece estar guardando en caché la lista antigua (y los números de uso).
Si actualizo la página y hago clic directamente en últimas 24 horas sin seleccionar ningún modelo primero, ahora la lista desplegable me muestra la lista correcta (y el uso correspondiente).
1 me gusta
¡Buena observación @RBoy ! También me olvidé de manejar/limpiar la caché al cambiar el período
main ← fix/ai-usage-dropdown-cache
opened 11:04AM - 06 Jan 26 UTC
Follow-up to a1cc09d22d.
The model and feature dropdown lists in the AI Usage… admin page weren't updating when users changed the time period. For example, switching from "Last month" to "Last 24 hours" would still show models that had no usage in the last 24 hours.
The root cause was a race condition in the caching mechanism. The cache was being cleared inside the async `fetchData` method, but tracked property changes in methods like `setPeriodDates` would trigger Glimmer re-renders before the cache was cleared. This caused the stale cached values to be used during re-render.
Additionally, the cache could be populated with empty arrays during initial render before the AJAX response arrived, preventing proper population once data was available.
The fix moves cache invalidation to happen synchronously before any tracked property changes, and only populates the cache when actual data is present. This ensures the dropdown options always reflect the currently selected time period.
Ref - https://meta.discourse.org/t/bug-in-llm-usage-ui/392652
1 me gusta