Risk & compliance reports
modules/dashboard/pages/{Exposure*, Hedging*, IdleTime*, TOSBreach*, MicroScalpingDetailsUI, RiseKycDetailsUI, SIMFundedTradersUI, PayoutDetailsUI}
Exposure — Live
Routes: /dashboard/reports/exposure /dashboard/reports/exposure/details
List of trader exposure positions with filters, drilling into per-account exposure detail (intervals, positions, analysis graph).
Sub-modules
- List —
CommonDashboardTable,BrokerFilter,DateRangePicker - Details —
ExposureSummary,ExposureAnalysis(chart),Positions,ExposureReportDetailsSkeleton, collapsible side rail
| Control | Effect |
|---|---|
| Search (Account/Email), date range | Filters list |
| Broker filter (multi-select) | Filters list |
| Funded Type / Is Overexposed / Mini+Micro Overlap selects | Filters list |
| Min/Max Overall Exposure | Numeric filter fields — note: the Yup schema for these exists but is not actually wired to any validation call |
| Clear filters / Refresh | Resets filter state / refetches list |
| Pagination | Server-paginated |
| "Details" row button | Encrypts {id, fromDate, toDate} → localStorage.encBrkAccId → navigates to details |
| Details: Back / Refresh / collapse side rail | Standard detail-page controls; supports deep-link via URL query params too |
Hedging — Live
Routes: /dashboard/reports/hedging /dashboard/reports/hedging/details
List of detected hedging clusters/violations, with drill-down to cluster detail (position overlap graph, involved accounts, violations).
Sub-modules
Details tabs: "Involved Accounts" / "Detected Violations" — both mounted, CSS-hidden by tab, not separately fetched.
| Control | Effect |
|---|---|
| Search (Email), date range, broker, Funded Type, Status selects | Filters list |
| Clear filters / Refresh | Resets / refetches |
| "Details" row button | Encrypts {id: hedgeClusterId} → localStorage.hedCluAccId → navigates to details |
| Details tabs, Back, Refresh, collapse rail | Standard detail-page controls; deep-linkable via query param |
Idle Time — Live (details route is a legacy redirect)
Routes: /dashboard/reports/idle-report /dashboard/reports/idle-report/details
List of idle-time compliance flags with a bulk/individual "Run Idle Check" action. The old details route is now a redirect shim to the unified Security Flags details page.
Sub-modules
- List — checkbox-enabled
CommonDashboardTable,DynamicFilter(Status/User ID/Account ID) - Result modal — "Idle Check Started" — fire-and-forget ack per account, not a polled result
| Control | Effect | Hook |
|---|---|---|
| Search, dynamic filters, clear | Filters list | — |
| Row checkbox selection | Account-based dedup selection | — |
| Run Idle Check (N) | One mutation per unique selected account (parallel, partial-failure tolerant) or a single full-scan call if none selected; opens result modal, invalidates + refetches list | useRunIdleTimeCheckMutation |
| "Details" row button | Encrypts flag id → navigates to unified /dashboard/reports/security-flags/details?flag_id= | — |
:::info Note
Details are documented under Security Flags → Flag Details: Review Actions (Pending Verification / Passed / Failed via useReviewIdleTimeMutation) plus a separate, independently-paginated user idle-history table.
:::
TOS Breach — Live (details route is a legacy redirect)
Routes: /dashboard/reports/tos-breach /dashboard/reports/tos-breach/details
List of Terms-of-Service breach flags with bulk/individual "Run TOS Check". Old details route redirects to the unified Security Flags details page.
| Control | Effect | Hook |
|---|---|---|
| Search, dynamic filters (Status/Breach Type/User ID), clear | Filters list | — |
| Row checkbox selection (by user id) | Multi-select | — |
| Run TOS Check (N) | One mutation per unique user via Promise.all — note: not allSettled, so one failure aborts the whole batch (unlike Idle Check); opens results modal with per-user, per-breach-type breakdown | useRunTOSBreachCheckMutation |
| "Details" row button | Encrypts flag id → navigates to unified security-flags details | — |
:::info Note Details also documented under Security Flags → Flag Details: Review Actions plus breach-type-conditional read-only panels (Multiple Profiles / Third Party Name + Mismatched Vaults/Orders) and independent user breach-history table. :::
Microscalping Report — Live, read-only
Route: /dashboard/reports/microscalping
Account microscalping breach analysis — summary stats + qualifying trades. Account resolved from URL query param only.
| Control | Effect |
|---|---|
| Trades table pagination | Server-paginated (20/50/100 page sizes) |
:::info Note
No filters, export, run-check, or navigation actions — purely a display page reached via an external link carrying account_id.
:::
Rise KYC — Live, read-only
Route: /dashboard/reports/rise-kyc
Aggregated view of a user's Rise KYC/onboarding status, invite log, recent payment intents, and recent payouts. User resolved from URL query param only.
:::info Note
No interactive controls at all — status chips, invite-log JSON dump, and two unpaginated tables are all static display for the resolved user_id.
:::
SIM Funded Traders — Live
Routes: /dashboard/sim_funded_traders /dashboard/payout
Top SIM-funded traders by payout, combined with the embedded Trader Payout History widget and a payout-time distribution pie chart. Identical component mounted at both routes.
| Control | Effect |
|---|---|
| Refresh | Refetches all active queries on the page (broader than other pages' scoped refresh) |
| Table pagination | Server-paginated top-traders table |
| "Details" row button | Encrypts user id (via a different encrypt helper than most pages) → localStorage["pot_data"] → hard navigation (window.location.href, full reload) to Payout Details |
Payout Details — Legacy
Route: /dashboard/payout_details
Read-mostly detail of a single user's payout summary + active trading accounts, reached only via SIM Funded Traders' "Details" button. An orphaned typo'd duplicate file (PauyoutDetailsUI.tsx) sits unused in the same folder.
| Control | Effect |
|---|---|
| Back / Refresh | router.back() / refetches payout detail |
| Active Trading Accounts table | Full array rendered at once, no server pagination, no row actions |
:::danger Dead code
An "Edit Email" action exists in code but its trigger button is commented out, so it's unreachable. The confirm-modal handler is a setTimeout-based mock that just alerts "Action completed!" — no real API call. ID is read only from localStorage["pot_data"]; a router.query.user_id read exists in source but is dead/unused.
:::