Skip to content

[Fraud Protection] Add overview and logs tabs to the portal#5791

Open
jimmycwc wants to merge 5 commits into
authgear:mainfrom
jimmycwc:ui-fraud-protection
Open

[Fraud Protection] Add overview and logs tabs to the portal#5791
jimmycwc wants to merge 5 commits into
authgear:mainfrom
jimmycwc:ui-fraud-protection

Conversation

@jimmycwc

@jimmycwc jimmycwc commented Jun 26, 2026

Copy link
Copy Markdown
Contributor
2026-06-26 14 19 45 2026-06-26 14 19 27

Summary

Adds the Fraud Protection Overview and Logs experiences to the portal, backed by real Admin API data.

  • Admin API: extend the fraud protection overview with time buckets and per-IP geo data, and supporting read-store queries.
  • Overview tab: requests-over-time chart plus top source IPs / IP locations / SMS origins lists and metric cards.
  • Logs tab: filterable, paginated log table wired to the fraudProtectionLogs query, with customizable columns (persisted per app), result/reason-code/date-range filters, and a log detail screen.
  • Date range dialog: time picker support and a custom range label.
  • Fixes: format the logs timestamp column via formatDatetime (instead of the raw ISO string), and restore default-visible optional columns (reason codes, IP country) when stored preferences are empty.

Test plan

  • Overview tab renders chart and top lists for a range with data, and handles empty ranges
  • Logs tab filters (result, reason codes, date range, search) and pagination work
  • Column customization persists across reloads; defaults show reason codes + IP country
  • Timestamp column and log detail show localized, timezone-aware datetimes
  • make -C portal typecheck passes

Made with Cursor

jimmycwc and others added 5 commits June 25, 2026 14:37
Add hourly timeBuckets to the fraud protection overview query for the
requests-by-action chart, and resolve the dominant geo country per source
IP via a two-query merge instead of a correlated subquery.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add an optional time picker to DateRangeDialog/DateTimePicker, let
DateRangeFilterDropdown render a custom range label, and add a
formatCustomDateRangeLabel helper for compact date range display.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add the requests-by-action stacked bar chart (hourly for 24h, daily for
7d), wire the overview metrics, SMS destinations, IP locations and top
source IPs to real query data, and register the Chart.js Legend plugin.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add a customizable columns dropdown with persisted visibility, make the
filter bar responsive, fetch logs and log details from the Admin API, and
remove the experimental Logs B tab variant.

Co-authored-by: Cursor <cursoragent@cursor.com>
Format the logs timestamp column with formatDatetime instead of showing the raw ISO string, and restore the default-visible optional columns (reason codes, IP country) when stored preferences are empty.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant