Repository navigation
feat(galaxy): range selector — 1 month, 3 months, all time (gitmoot/gitmoot#2655) - #144
Conversation
…itmoot#2655) GET /api/graph?range=30d|90d|all; missing or unknown means 30d, so the default request is unchanged. DataSource.Graph takes a canonical GraphRange (CanonicalGraphRange). Graph gains an optional Truncated {shown,total} for a wide range the server capped. Web: a range select under the repo filter, same style; ?range= in the URL (replaceState, like the Runs ?reviewer= facet) so reload keeps it; the loading veil shows for a user-initiated load of a different range; a late response for a superseded selection is dropped; the repo list refills per range and keeps the current selection; a note says 'updated every few minutes' or 'newest N of M runs' when truncated.
Decision: Findings
Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
…range= (gitmoot/gitmoot#2655 review) Each fetch takes a sequence number; success, failure and the loading-veil cleanup act only for the newest, so A → B → A can no longer let the first A's late response overwrite the second, nor a superseded failure show an error after its replacement succeeded. A poll is skipped while a request is in flight. ?range= is read with URLSearchParams, so encoded values such as range=%61ll agree with the server's decoded query.
Decision: Findings
Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
Decision: Findings
Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
Module half of gitmoot/gitmoot#2655: a Galaxy range selector with 1 month, 3 months and all time. Assignment: owner request via
gitmoot(msg 484511), seatgitmoot-intern.API
GET /api/graph?range=30d|90d|all. Missing, unknown or wrong-case values mean30d, so clients that never send?range=are unchanged.DataSource.Graph(ctx, repo, rng GraphRange). Handlers always pass a canonical value fromCanonicalGraphRange.FakeDataSourcetakes the range and returns its single-run graph for every range.Graph.Truncated *GraphTruncation {shown,total}is optional and omitted when unset. The gitmoot server sets it when a wide range holds more runs than the UI can draw (see the server PR). It is never set for the default.Web (
web/dist/index.html)/galaxy?range=90d|all, written withreplaceStatelike the Runs page's?reviewer=facet. Reload, deep links and Back/Forward (popstate) keep the range. The default stays/galaxy.Tests
TestGraphRangeReachesDataSourceCanonical: the handler passes 30d, 90d and all through, and maps missing, empty, unknown, wrong-case and a duplicatedrangeto the canonical value. The repo filter still reaches Graph alongside it.go build,go vetandgo test ./...pass; the page script parses (node --checkon the inline script).