Problem
The telemetry system fires DOM events locally but has no production sink. Two PRD KPI events are defined but never fired:
- `core_workflow_complete` — defined in types, never dispatched
- `time_to_first_insight_seconds` — not even defined yet
Without these, the PRD success metrics (adoption rate, time-to-insight, usability score) cannot be measured.
Scope
- Add `web-vitals` package — report LCP, INP, CLS via `trackEvent`
- Add `time_to_first_insight_seconds` event — measure from `dashboard_render_complete` to first detail navigation
- Fire `core_workflow_complete` in the log explorer on workflow completion
- Extend `trackEvent` to POST to `NEXT_PUBLIC_TELEMETRY_URL` when set (no-op if unset)
- Tests for all new telemetry paths
Acceptance Criteria
References
PRD KPIs: `projects/RemedyIQ/prd-ui-refactor-core-focus.md`
Audit gap: `projects/RemedyIQ/audit-refactor-scoping-q1.md` — "No RUM"
Problem
The telemetry system fires DOM events locally but has no production sink. Two PRD KPI events are defined but never fired:
Without these, the PRD success metrics (adoption rate, time-to-insight, usability score) cannot be measured.
Scope
Acceptance Criteria
References
PRD KPIs: `projects/RemedyIQ/prd-ui-refactor-core-focus.md`
Audit gap: `projects/RemedyIQ/audit-refactor-scoping-q1.md` — "No RUM"