diff --git a/src/features/dashboard/components/AmlDataGrid.tsx b/src/features/dashboard/components/AmlDataGrid.tsx index 59bc5dd..a8cee0e 100644 --- a/src/features/dashboard/components/AmlDataGrid.tsx +++ b/src/features/dashboard/components/AmlDataGrid.tsx @@ -7,6 +7,7 @@ import { useDataRedaction } from '../hooks/useDataRedaction'; import { maskAccount, maskSin } from '../utils/dataRedaction'; import { RequireRole } from '../../auth/components/RequireRole'; import { KYC_RECORDS, type KycRecord } from '../data/kycMockData'; +import { useDemoMode } from '../../../core/hooks/useDemoMode'; export type { KycRecord }; @@ -86,6 +87,9 @@ export const AmlDataGrid = ({ onRowClick, records: recordsProp, onSimulateCrash const isTabletOrLarger = useIsTabletOrLarger(); const scrollContainerRef = useRef(null); const dataSource = recordsProp ?? KYC_RECORDS; + const { isDemoMode } = useDemoMode(); + const [showSpotlight, setShowSpotlight] = useState(() => typeof window !== 'undefined' ? sessionStorage.getItem('aegis_chaos_spotlight') !== 'true' : true); + const handleSimulateCrash = () => { if (isDemoMode) { setShowSpotlight(false); sessionStorage.setItem('aegis_chaos_spotlight', 'true'); } onSimulateCrash?.(); }; const virtualizer = useVirtualizer({ count: dataSource.length, @@ -119,13 +123,34 @@ export const AmlDataGrid = ({ onRowClick, records: recordsProp, onSimulateCrash {/* Chaos engineering trigger: right-aligned in flow so it pushes content instead of overlapping */} {onSimulateCrash && ( - +
+ + {isDemoMode && showSpotlight && ( +
+ {/* Caret pointing up */} +
+
+ ⛈️ +
+

Chaos Engine

+

Click to simulate a total server crash and watch the system gracefully survive.

+ +
+
+
+ )} +
)}