Dashboard Reporting
Purpose
Plan the dashboard's reporting surface: which metrics/reports exist, where aggregation happens (the server), how ranges and filters behave, how results render (tables/charts) and export, and how slow or heavy reports stay usable. Correctness of the numbers is the first requirement.
When to Use
- When the dashboard needs metrics, charts, or downloadable reports.
- When existing reports are slow, inconsistent between views, or aggregate in the browser.
- Not for entity list views (
dashboard-tables) — reports aggregate; tables enumerate.
Inputs
- The metric/report inventory: definitions, dimensions, ranges, audiences.
- Data source capabilities (aggregation endpoints, query cost) via
web-api-integration.
- Permissions: who sees which reports and exports (
dashboard-permissions).
Discovery Questions
- Which metrics matter, and what is each one's exact definition (timezone, inclusion rules, dedup)?
- What ranges/granularity/filters do admins need — and which combinations are expensive?
- Which reports need export (CSV/PDF) or scheduling/emailing?
- How fresh must numbers be — live, hourly, daily?
Responsibilities
- Pin metric definitions in writing — every ambiguity (timezone boundaries, cancelled orders, test accounts) resolved before implementation, so two views never disagree.
- Put aggregation on the server (or warehouse): the browser renders aggregates; it does not compute them from raw rows.
- Plan range/filter UX with state in the URL (shareable report views), sensible defaults, and comparison ranges where needed.
- Evaluate the chart library against actual chart needs (types, theming via
web-theme tokens, accessibility) — a decision, not a default.
- Plan export: CSV from the same server aggregation as the view (not a client re-computation), PDF only if truly required; exports are permissioned (
dashboard-permissions).
- Plan scheduled reports (if needed) as a backend concern the dashboard configures.
- Handle heavy queries: caching with declared freshness, async generation with notify-on-ready, or precomputed rollups — chosen per report cost.
Required Workflow
- Inventory reports/metrics; pin definitions with the user.
- Confirm server-side aggregation paths and their cost.
- Design range/filter/URL-state conventions and rendering (chart vs table) per report.
- Evaluate the chart library; plan export/scheduling where required.
- Record the plan, including the freshness/caching contract per report.
Decision Rules
- If a metric's definition can't be stated in one sentence, it isn't ready to build.
- Aggregation in the browser is acceptable only over small, already-loaded, bounded data.
- Cache or precompute anything users wait >~2s for; declare staleness in the UI rather than hiding it.
- Charts serve the question asked; if a table answers it better, use the table.
Rules
- The same metric shows the same value everywhere it appears — one aggregation source per metric.
- Exports carry the filters/permissions of the requesting view; no privilege escalation via export.
- Chart colors/typography come from design tokens and work in both themes (
web-theme).
Anti-Patterns
- Fetching raw rows to sum them in JavaScript for a "total" tile.
- Two dashboard pages computing "revenue" differently.
- Unbounded ad-hoc range queries against production with no cache or cost control.
- Decorative charts (3D pies, gratuitous animation) obscuring the numbers.
Validation Checklist
Definition of Done
A recorded reporting plan — pinned metric definitions, server-side aggregation paths, range/filter conventions, justified chart library, export/scheduling design, and a freshness contract — under which every displayed number has one authoritative source.
Related Skills
dashboard-tables, dashboard-permissions, web-server-state, web-api-integration, web-theme, web-performance, web-accessibility.
Related Knowledge
../../../knowledge/ (metric definitions, data model).
Related References
../../../references/web/dashboard/ (report specs, metric glossary — when populated).
Context Loading Guidance
- Requires: report inventory, metric definitions, data-source capabilities.
- Does not require: entity CRUD detail, customer-app features.
- May load:
web-server-state for caching mechanics; dashboard-permissions for export gating.
- Stop when: the reporting plan and freshness contracts are recorded.
Token Efficiency Guidance
Keep a metric glossary table (name → definition → source → freshness) as the core artifact; per-report prose stays minimal.
1---2name: dashboard-reporting3description: Use to plan dashboard reports and charts — server-side aggregation, date-range/filter state in the URL, chart library evaluation, CSV/PDF export, scheduled reports, and handling slow queries (async generation, caching). Numbers must be verifiably correct before charts get pretty.4---56# Dashboard Reporting78## Purpose910Plan the dashboard's reporting surface: which metrics/reports exist, where aggregation happens (the server), how ranges and filters behave, how results render (tables/charts) and export, and how slow or heavy reports stay usable. Correctness of the numbers is the first requirement.1112## When to Use1314- When the dashboard needs metrics, charts, or downloadable reports.15- When existing reports are slow, inconsistent between views, or aggregate in the browser.16- **Not** for entity list views (`dashboard-tables`) — reports aggregate; tables enumerate.1718## Inputs1920- The metric/report inventory: definitions, dimensions, ranges, audiences.21- Data source capabilities (aggregation endpoints, query cost) via `web-api-integration`.22- Permissions: who sees which reports and exports (`dashboard-permissions`).2324## Discovery Questions2526- Which metrics matter, and what is each one's **exact definition** (timezone, inclusion rules, dedup)?27- What ranges/granularity/filters do admins need — and which combinations are expensive?28- Which reports need export (CSV/PDF) or scheduling/emailing?29- How fresh must numbers be — live, hourly, daily?3031## Responsibilities3233- Pin **metric definitions** in writing — every ambiguity (timezone boundaries, cancelled orders, test accounts) resolved before implementation, so two views never disagree.34- Put **aggregation on the server** (or warehouse): the browser renders aggregates; it does not compute them from raw rows.35- Plan **range/filter UX** with state in the URL (shareable report views), sensible defaults, and comparison ranges where needed.36- **Evaluate the chart library** against actual chart needs (types, theming via `web-theme` tokens, accessibility) — a decision, not a default.37- Plan **export**: CSV from the same server aggregation as the view (not a client re-computation), PDF only if truly required; exports are permissioned (`dashboard-permissions`).38- Plan **scheduled reports** (if needed) as a backend concern the dashboard configures.39- Handle **heavy queries**: caching with declared freshness, async generation with notify-on-ready, or precomputed rollups — chosen per report cost.4041## Required Workflow42431. Inventory reports/metrics; pin definitions with the user.442. Confirm server-side aggregation paths and their cost.453. Design range/filter/URL-state conventions and rendering (chart vs table) per report.464. Evaluate the chart library; plan export/scheduling where required.475. Record the plan, including the freshness/caching contract per report.4849## Decision Rules5051- If a metric's definition can't be stated in one sentence, it isn't ready to build.52- Aggregation in the browser is acceptable only over small, already-loaded, bounded data.53- Cache or precompute anything users wait >~2s for; declare staleness in the UI rather than hiding it.54- Charts serve the question asked; if a table answers it better, use the table.5556## Rules5758- The same metric shows the same value everywhere it appears — one aggregation source per metric.59- Exports carry the filters/permissions of the requesting view; no privilege escalation via export.60- Chart colors/typography come from design tokens and work in both themes (`web-theme`).6162## Anti-Patterns6364- Fetching raw rows to sum them in JavaScript for a "total" tile.65- Two dashboard pages computing "revenue" differently.66- Unbounded ad-hoc range queries against production with no cache or cost control.67- Decorative charts (3D pies, gratuitous animation) obscuring the numbers.6869## Validation Checklist7071- [ ] Reports/metrics inventoried; definitions pinned and user-confirmed.72- [ ] Server-side aggregation confirmed per report; browser computes nothing material.73- [ ] Range/filter/URL-state conventions defined.74- [ ] Chart library evaluated with justification; theming/accessibility covered.75- [ ] Export/scheduling planned and permissioned where required.76- [ ] Freshness/caching contract recorded per report.7778## Definition of Done7980A recorded reporting plan — pinned metric definitions, server-side aggregation paths, range/filter conventions, justified chart library, export/scheduling design, and a freshness contract — under which every displayed number has one authoritative source.8182## Related Skills8384`dashboard-tables`, `dashboard-permissions`, `web-server-state`, `web-api-integration`, `web-theme`, `web-performance`, `web-accessibility`.8586## Related Knowledge8788`../../../knowledge/` (metric definitions, data model).8990## Related References9192`../../../references/web/dashboard/` (report specs, metric glossary — when populated).9394## Context Loading Guidance9596- **Requires:** report inventory, metric definitions, data-source capabilities.97- **Does not require:** entity CRUD detail, customer-app features.98- **May load:** `web-server-state` for caching mechanics; `dashboard-permissions` for export gating.99- **Stop when:** the reporting plan and freshness contracts are recorded.100101## Token Efficiency Guidance102103Keep a metric glossary table (name → definition → source → freshness) as the core artifact; per-report prose stays minimal.