fix code queue trace summary sync contract
This commit is contained in:
@@ -630,8 +630,9 @@ function renderTraceConsoleRows(summary: Record<string, unknown>, steps: Record<
|
||||
const execution = asRecord(summary.execution) ?? {};
|
||||
const stats = asRecord(execution.traceStats) ?? asRecord(summary.traceStats);
|
||||
const statsSource = String(execution.statsSource || summary.statsSource || "");
|
||||
const statsUsable = stats !== null && (statsSource === "oa-event-flow" || statsSource === "raw-trace-fallback" || stats.source === "oa-event-flow");
|
||||
const stat = (key: string): string | number => {
|
||||
if (!stats || statsSource !== "oa-event-flow") return "--";
|
||||
if (!statsUsable) return "--";
|
||||
const value = Number(stats[key]);
|
||||
return Number.isFinite(value) && value >= 0 ? Math.floor(value) : "--";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user