Repository navigation
✨ dashboard: running-cost tile rotates hour / today / week / month - #15620
Conversation
The Overview RUNNING tile now rotates its cost window every ~4s (this hour → today → this week → this month) with a quiet vertical crossfade of only the amount+window phrase. Agent count stays fixed, width is reserved for the widest phrase (nowrap + ellipsis fallback), prefers-reduced-motion swaps instantly, rotation pauses on hover or while the tab is hidden and resumes in step, and the tooltip lists all four values. Server side, /api/status.fleetRun gains dayUSD / weekUSD / monthUSD / windowsPriced, aggregated from the existing cost ledger (UTC day, ISO week, calendar month) plus the live tail since the last snapshot. Fixes #15614 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
@clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
|
stage 080-awaiting-merge-admission → 071-needs-author: optional-check-failing:test (dashboard 2/4) |
TestNavbarUpgradeBeeDoesNotAddBareSetInterval caps bare setInterval( calls in static/index.html; use dashboardSetInterval (paused while the tab is hidden) and hold its visibilitychange re-fire so the rotation resumes in step. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #15614
The Overview RUNNING tile (
3 · $53.91 this hour) now rotates its cost window continuously — this hour → today → this week → this month — with ~4 s dwell per phrase.Frontend
3 ·agent count stays fixed.inline-gridwith all four phrases stacked in one grid area, so width is reserved for the widest phrase; the tile value isnowrapwith ellipsis fallback (fixes the "this hour" wrapping to a second line).var(--amber)/var(--text)); no raw hex/rgba (style ratchet clean).prefers-reduced-motion: reduce→ instant swap, no transition.document.hidden; resumes in step (the tick skips rather than advancing).Server
/api/status.fleetRungainsdayUSD,weekUSD,monthUSD,windowsPriced, aggregated from the existing cost ledger inUpdateStatusIfFresh:CostDailyRollupfor complete days, folded 5-min snapshots for today) summed from 00:00 UTC today / Monday 00:00 UTC (ISO week) / the 1st 00:00 UTC, plus the live tail since the last snapshot, floored athourUSD.windowsPriced=falsewhen there is no ledger yet (UI then shows only the hour phrase).Tests
fleet_cost_windows_test.go— window starts (ISO week / zone), ledger + tail sum, hour floor / unpriced path.fleet_cost_rotor.test.js(Node, fake timers) — rotation order and 4 s timing, repaint keeps index, hover/hidden pause + resume in step, reduced-motion path sets nois-out, markup/tooltip, nowrap/ellipsis/token-only CSS.webstatic/fleet_run_stat_test.goupdated for the new markup.Docs
src/docs/dashboard-sections.md,src/docs/api-reference/health-status-events.md,changelog.d/added-15614-running-cost-rotor.md.Screenshots (one per window)