Expand description
Analytics chart rendering for the ftui analytics views.
Provides AnalyticsChartData (pre-computed chart data) and rendering
functions that turn analytics query results into terminal-native
visualizations using ftui-extras charts and canvas widgets.
Chart data is loaded via load_chart_data(db, filters, group_by) — a single
DB query path that all 8 analytics views share. Views consume
pre-computed data during view() without further DB access.
The Explorer view layer adds dimension overlays via build_dimension_overlay()
for proportional breakdowns by agent/workspace/source.
Structs§
- Analytics
Chart Data - Pre-computed chart data for the analytics views.
- Explorer
State - Explorer view state passed to the render function.
Functions§
- breakdown_
rows - Number of selectable rows in the Breakdowns view for the given tab.
- coverage_
row_ count - Number of visible rows in the Coverage view (for selection bounds).
- load_
chart_ data - Load analytics data from the database, returning an
AnalyticsChartData. - plans_
rows - Number of selectable rows in the Plans view (per-agent plan breakdown).
- render_
analytics_ content - Dispatch rendering to the appropriate view function.
- render_
breakdowns - Render the Breakdowns view: tabbed agent/workspace/source/model bar charts.
- render_
coverage - Render the Coverage view: overall bar + per-agent breakdown + daily sparkline.
- render_
dashboard - Render the Dashboard view: KPI tile wall with sparklines + top agents.
- render_
explorer - Render the Explorer view: interactive metric selector + line area/scatter charts.
- render_
heatmap - Render the Heatmap view: GitHub-contributions-style calendar with metric selector, day-of-week labels, month headers, selection highlight, and legend.
- render_
tools - Render the Tools view: per-agent table with calls, messages, tokens, calls/1K, and trend.
- tools_
row_ count - Number of visible rows in the Tools view (for selection bounds).