Skip to content

feat(email-service): add Error Report tab with delivery failure analysis#2066

Open
ornokreans wants to merge 2 commits into
masterfrom
ornokreans/email-error-report
Open

feat(email-service): add Error Report tab with delivery failure analysis#2066
ornokreans wants to merge 2 commits into
masterfrom
ornokreans/email-error-report

Conversation

@ornokreans
Copy link
Copy Markdown
Contributor

@ornokreans ornokreans commented May 27, 2026

Summary

Adds an Error Report tab to the Email Service widget that provides delivery failure analysis for the current project, giving operators a quick overview of what is failing and why without having to sift through individual mail log entries.

Changes Made

  • New ErrorReport component (ErrorReport.tsx) — full-page report view with summary stat cards, a day-range selector (persisted to localStorage), and interactive bar-chart rankings that filter a detail table on click.
  • New Error Report tab in AppContent.tsx — inserted between Setup and Maillog; tab selection is synced to the URL hash (#error-report) for deep-linking.
  • New reportDataFn + useGetReportData hook — fetches /v1/report via the existing API infrastructure and exposes typed response interfaces (Report, RankingList, ReportSearchResponse, etc.) in actions.ts / queries.ts.
  • Generified fetchFromAPI — refactored to fetchFromAPI<T> so it can be reused for both mail-search and report endpoints without duplicating response-handling logic; removed now-redundant checkStatus helper.
  • Minor fixes — added tag[] filter field to MailSearchOptions, added response field to MailLogEntry, and added enabled prop to useGetData to support conditional queries.

Related Issues

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.

Copy link
Copy Markdown
Collaborator

@andypf andypf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good but I'm missing tests. Could you please add some tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants