From bb4accfe96f93da751b06c1fddb05d397580883d Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Tue, 28 Jul 2026 13:11:20 +0200 Subject: [PATCH] feat: API Latency as optional column in dashboard session list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Off by default; sortable via avgApiLatencyMs. Data comes from the SessionsIndex mirror the list already reads — no extra query or table. Co-Authored-By: Claude Fable 5 --- .../app/dashboard/components/SessionTable.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Web/autopilot-monitor-web/app/dashboard/components/SessionTable.tsx b/src/Web/autopilot-monitor-web/app/dashboard/components/SessionTable.tsx index d127cb22..5405e2f2 100644 --- a/src/Web/autopilot-monitor-web/app/dashboard/components/SessionTable.tsx +++ b/src/Web/autopilot-monitor-web/app/dashboard/components/SessionTable.tsx @@ -30,6 +30,7 @@ const ALL_COLUMNS: ColumnDef[] = [ { key: "duration", label: "Duration", defaultVisible: true, sortKey: "durationSeconds" }, { key: "started", label: "Started", defaultVisible: true, sortKey: "startedAt" }, { key: "country", label: "Country", defaultVisible: false, sortKey: "geoCountry", filterKey: "geoCountry" }, + { key: "apiLatency", label: "API Latency", defaultVisible: false, sortKey: "avgApiLatencyMs" }, { key: "agentVersion", label: "Agent Version", defaultVisible: false, sortKey: "agentVersion", filterKey: "agentVersion" }, { key: "osName", label: "OS Name", defaultVisible: false, sortKey: "osName", filterKey: "osName" }, { key: "osBuild", label: "OS Build", defaultVisible: false, sortKey: "osBuild", filterKey: "osBuild" }, @@ -640,7 +641,7 @@ export function SessionTable({ currentSort={sortColumn} direction={sortDirection} onSort={onSort} - className={["eventCount", "duration", "started", "country", "agentVersion", "osName", "osBuild", "osDisplayVersion", "osEdition", "osLanguage"].includes(col.key) ? "px-3" : undefined} + className={["eventCount", "duration", "started", "country", "apiLatency", "agentVersion", "osName", "osBuild", "osDisplayVersion", "osEdition", "osLanguage"].includes(col.key) ? "px-3" : undefined} filterKey={col.filterKey} filterValues={col.filterKey ? uniqueValuesByField[col.filterKey] : undefined} activeFilter={col.filterKey ? columnFilters[col.filterKey] : undefined} @@ -904,6 +905,19 @@ function SessionCell({ ); + case "apiLatency": + return ( + + {(session.avgApiLatencyMs ?? 0) > 0 ? ( + + {Math.round(session.avgApiLatencyMs!)} ms + + ) : ( + — + )} + + ); + case "agentVersion": { const fullVersion = session.agentVersion || ""; const shortVersion = fullVersion.split("+")[0];