You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(frontend): Trends view consuming GET /api/analytics/trends #30
The savings-snapshot historical time-series is now collected and exposed via GET /api/analytics/trends (PR for LeanerCloud/cloud-commitments-cli#1023/#1033), but there is no frontend view
consuming it. Users cannot yet see coverage %, utilization, committed spend, or
realized savings over time by account/provider/service.
Proposed work
Add a basic "Trends" view in frontend/src that consumes /api/analytics/trends:
Render the monthly series (coverage %, committed spend, usage, realized
savings) and the by-provider / by-service breakdowns.
Account scoping: pass the top-bar chip account_id through to the endpoint
(the backend already enforces allowed_accounts scope).
Escape every API field rendered into any innerHTML template via escapeHtml() (feedback_innerhtml_xss).
Install event listeners once per element (stored ref / AbortController), never
re-add on a repeatedly-called render (feedback_event_listener_dedup).
Do NOT touch frontend/src/dashboard.tsServiceSavings or handler_dashboard.go / types.goServiceSavings (owned elsewhere).
Status update (2026-10-28): #1563 merged: each monthly row of GET /api/analytics/trends now has total_commitment (upfront amortized per month) and total_usage (recurring fees), with unknown kept unknown. Committed spend is their sum.
Left: showing them on the Trends view (UI owner), and a coverage data source (design call: the collector has no on-demand baseline).
Activity
IAmJSD commentedon Oct 24, 2026
Claiming: working on this
feat(frontend): add a Trends sub-tab for the analytics trends endpoint (
docs(api): describe total_commitment as amortized upfront and total_u…
feat(analytics): return committed spend and usage in the monthly tren…
IAmJSD commentedon Oct 28, 2026
Status update (2026-10-28): #1563 merged: each
monthlyrow ofGET /api/analytics/trendsnow hastotal_commitment(upfront amortized per month) andtotal_usage(recurring fees), with unknown kept unknown. Committed spend is their sum.Left: showing them on the Trends view (UI owner), and a coverage data source (design call: the collector has no on-demand baseline).
chore: align MonthlySummary docs and warn on capped ladder configs (#…