Repository navigation
v1.5.26
Fix stale dashboard totals and polling lifecycle issues, make the site pass TypeScript checking, and clean up repository and Docker build configuration. This release includes #149, #150, and #151 by @aaroncchung.
Changed
- The site passes
tsc --noEmit(#149 by @aaroncchung) — the type check reported 122 errors inpackages/site, almost all because the database client was typed as a bare query function:sql.begindid not exist for the compiler, and transaction handles were typed as query results. The client and transaction handles now have their postgres.js types, query results take their row types as the query's type argument instead of an assertion, and the last few parameter and predicate errors are fixed. The site now reports no errors. Types only: nothing changes at run time. The CI step that keeps it at zero follows separately. - Repository housekeeping (#150 by @aaroncchung) — the pnpm store index committed by accident (
.pnpm-store/) is no longer tracked and is now ignored. The CLI Docker image preparespnpm@9.15.0, thepackageManagerversion it already ran, instead of downloading an unusedpnpm@lateston every build. The site'sdb:seedscript, which ran aseed.tsthat never existed, is removed.
Fixed
- Overview and Home showed totals from before the latest refresh (#151 by @aaroncchung) — the dashboard kept summary responses in a cache and kept returning the stored copy; a newer copy fetched in the background only replaced the cache and was never shown. Overview, which parses new logs and then loads again, still showed the totals from before the refresh (and disagreed with Tokens, Cost and Models), and every Home poll and the first click on refresh now showed the previous result. Summary responses are no longer cached, so each load shows what the local server has at that moment. Overview's reload after the refresh keeps the figures on screen instead of flashing the loading state.
- Home was mounted twice on a cold load of
/and left a polling loop running (#151 by @aaroncchung) — the layout created the page again when the dashboard's auth check finished, and the first copy, still loading, then started its countdown and its/api/home-summarypolling after it had already been torn down. Both kept running on every page until the tab was closed; the same happened when leaving Home while a poll was in flight. The public home and the full dashboard now share one page instance, so Home is mounted once (unlocking the dashboard from the home page still loads it again, with access to the settings and quotas it could not read while locked), and Home starts no timer or listener once it has been left.