rewrite reports page to show email preview with week-to-date live view

- Rewrite reports page to render the exact weekly email in an iframe
  (srcdoc) instead of a custom dashboard view
- Add "Week to Date" live preview entry at top of sidebar that shows
  what the next weekly email will look like
- Add /p/:pid/reports/live route for the live preview
- Move getSpanTypeStats and computeDurationChanges from BackgroundJobs
  to Reports (BackgroundJobs uses them via RP.* prefix)
- Use project timezone (tz package) instead of server timezone
- Add thousand-separator formatting for event/error counts in email
- Extract shared renderWeeklyEmail helper, anomalyTypeCounts, and
  wrapSingleResponse to reduce duplication
This commit is contained in:
Anthony Alaribe 2026-03-02 00:01:59 +01:00
commit 364d728aa2
6 changed files with 198 additions and 223 deletions