fix(web-probe): restore analyzer runtime diagnostics visibility

This commit is contained in:
Codex
2026-07-02 17:39:41 +00:00
parent c08d0fbdb1
commit dc50f0c715
6 changed files with 105 additions and 10 deletions
@@ -114,6 +114,9 @@ export function renderWebObserveAnalyzeTable(value: Record<string, unknown>): st
const archiveMetrics = record(archiveSummary?.sampleMetrics);
const archivePagePerformance = record(archiveSummary?.pagePerformance);
const runtimeAlerts = record(analysis?.runtimeAlerts);
const webPerformanceRuntime = record(analysis?.webPerformanceRuntimeDiagnostics);
const webPerformanceRuntimeSummary = record(webPerformanceRuntime?.summary);
const webPerformanceRuntimeGroups = webObserveArray(webPerformanceRuntime?.groups).map(record).filter((item): item is Record<string, unknown> => item !== null).slice(0, 4);
const pagePerformance = record(analysis?.pagePerformance);
const pagePerformanceSummary = record(pagePerformance?.summary);
const nonEmptyRecord = (item: unknown): Record<string, unknown> | null => {
@@ -456,6 +459,20 @@ export function renderWebObserveAnalyzeTable(value: Record<string, unknown>): st
webObserveShort(webObserveText(item.sourceFunctionName ?? item.functionName ?? item.invoker), 42),
webObserveShort(webObserveText(item.sourceURL ?? item.url), 64),
]) : [["-", "-", "-", "-"]]),
webObserveTable(["PAYLOADS", "PARSED", "PARSE_ISSUES", "RUNTIME_EVENTS", "GROUPS"], [[
webObserveText(webPerformanceRuntimeSummary?.payloadRequestCount),
webObserveText(webPerformanceRuntimeSummary?.payloadParsedCount),
webObserveText(webPerformanceRuntimeSummary?.payloadParseIssueCount),
webObserveText(webPerformanceRuntimeSummary?.runtimeDiagnosticCount),
webObserveText(webPerformanceRuntimeSummary?.runtimeDiagnosticGroupCount),
]]),
webObserveTable(["DIAGNOSTIC", "REASON", "MODULE", "EVENTS", "FLUSH_MAX"], webPerformanceRuntimeGroups.length > 0 ? webPerformanceRuntimeGroups.map((item) => [
webObserveShort(webObserveText(item.diagnosticCode ?? item.eventType), 36),
webObserveShort(webObserveText(item.reason), 28),
webObserveShort(webObserveText(item.module), 32),
webObserveText(item.eventCount ?? item.count),
webObserveText(item.maxFlushDurationMs),
]) : [["-", "-", "-", "-", "-"]]),
"",
"Next:",
` bun scripts/cli.ts web-probe observe collect ${id} --view turn-summary`,