import React, { useState } from 'react'; import styles from './ForensicsView.module.css'; const TICKETS = [ { id:"TKT-1048", title:"Production DB latency spike — 8x degradation", customer:"Arjun Mehta", priority:"URGENT" }, { id:"TKT-1047", title:"SSO login loop after tenant migration", customer:"Lisa Park", priority:"HIGH" }, { id:"TKT-1046", title:"Webhook delivery failing — 503 responses", customer:"Dev Team B", priority:"HIGH" }, ]; const FORENSIC_STEPS = [ { time:"10:42:01", node:"vision", label:"Vision", detail:"No attachments found. Skipped visual scan.", status:"skip" }, { time:"10:42:02", node:"input_guard", label:"Input Guard", detail:"No injection patterns detected. Cleared.", status:"ok" }, { time:"10:42:02", node:"router", label:"Intent Router", detail:"Intent: DIAGNOSE_TICKET. Tools selected: SQL + KB.", status:"ok" }, { time:"10:42:03", node:"executor", label:"Tool Executor", detail:"Parallel: SQL query (12ms) + KB vector search (31ms).", status:"ok" }, { time:"10:42:04", node:"responder", label:"Responder", detail:"Generated structured diagnosis with code block.", status:"ok" }, { time:"10:42:05", node:"approval", label:"HITL Approval", detail:"Write action detected. Paused for staff approval.", status:"wait" }, ]; export const ForensicsView: React.FC = () => { const [selected, setSelected] = useState(TICKETS[1]); return (
Select ticket to inspect
{TICKETS.map(t => (
setSelected(t)} className={`${styles.ticketCard} ${selected?.id === t.id ? styles.selectedCard : ''}`} >
{t.id} {t.priority}
{t.title}
{t.customer}
))}
Forensic timeline — {selected?.id}
{FORENSIC_STEPS.map((step, i) => (
{step.status === 'ok' ? '✓' : step.status === 'wait' ? '⏸' : '–'}
{i < FORENSIC_STEPS.length - 1 &&
}
{step.label} {step.time}
{step.detail}
))}
AI interaction record
{[ { label:"Confidence", value:"91%", color:"var(--green)" }, { label:"Model", value:"kimi-k2.5:cloud", color:"var(--purple)" }, { label:"Latency", value:"847ms", color:"var(--amber)" }, { label:"Tools called", value:"2", color:"var(--accent)" }, { label:"Tokens used", value:"1,204", color:"var(--text2)" }, { label:"Workspace", value:"snowball-corp", color:"var(--text2)" }, ].map(r => (
{r.label} {r.value}
))}
); };