From 6c945fff2343a43fa5a4bd5e396e3a84ac414b22 Mon Sep 17 00:00:00 2001 From: Yvette Carlisle Date: Tue, 16 Jun 2026 11:21:02 +0800 Subject: [PATCH] {"schema":"decodex/commit/1","summary":"Compact max output UI labels","authority":"manual"} --- .../Sources/DecodexApp/AccountPanelView.swift | 52 +++---------------- .../src/orchestrator/operator_dashboard.html | 23 +++----- .../tests/operator/status/dashboard.rs | 9 +++- 3 files changed, 23 insertions(+), 61 deletions(-) diff --git a/apps/decodex-app/Sources/DecodexApp/AccountPanelView.swift b/apps/decodex-app/Sources/DecodexApp/AccountPanelView.swift index 1e58ffac0..d7548daa0 100644 --- a/apps/decodex-app/Sources/DecodexApp/AccountPanelView.swift +++ b/apps/decodex-app/Sources/DecodexApp/AccountPanelView.swift @@ -3039,10 +3039,7 @@ struct OperatorLanePopoverView: View { items.append( OperatorLaneReadoutItem( label: "max output", - value: formatLargestOutput( - bytes: largestOutput, - tool: activity.largestToolOutputTool - ) + value: formatLargestOutput(bytes: largestOutput) ) ) } @@ -3179,10 +3176,7 @@ struct OperatorLanePopoverView: View { items.append( OperatorLaneReadoutItem( label: "max output", - value: formatLargestOutput( - bytes: largestOutput, - tool: metrics.largestToolOutputTool - ) + value: formatLargestOutput(bytes: largestOutput) ) ) } @@ -3258,8 +3252,7 @@ struct OperatorLanePopoverView: View { inputTokens: phase.inputTokensCumulative, outputTokens: phase.outputTokensCumulative, toolCallCount: phase.toolCallCount, - largestOutputBytes: phase.largestToolOutputBytes, - largestOutputTool: phase.largestToolOutputTool + largestOutputBytes: phase.largestToolOutputBytes ) } } @@ -3272,8 +3265,7 @@ struct OperatorLanePopoverView: View { inputTokens: Int, outputTokens: Int, toolCallCount: Int, - largestOutputBytes: Int?, - largestOutputTool: String? + largestOutputBytes: Int? ) -> OperatorLifecycleTableRow { let runtimeSeconds = lifecycleModelSeconds(buckets) ?? 0 let runtime = runtimeShareParts( @@ -3284,7 +3276,7 @@ struct OperatorLanePopoverView: View { runtimeSeconds: runtimeSeconds ) ) - let largestOutput = formatLargestOutput(bytes: largestOutputBytes, tool: largestOutputTool) + let largestOutput = formatLargestOutput(bytes: largestOutputBytes) return OperatorLifecycleTableRow( stage: stage, @@ -3297,15 +3289,12 @@ struct OperatorLanePopoverView: View { ) } - private func formatLargestOutput(bytes: Int?, tool: String?) -> String { + private func formatLargestOutput(bytes: Int?) -> String { guard let bytes, bytes > 0 else { return "-" } - guard let tool = panelTrimmed(tool) else { - return formatCompactBytes(bytes) - } - return "\(formatCompactBytes(bytes))(\(tool))" + return formatCompactBytes(bytes) } private func lifecycleWallSeconds( @@ -3771,9 +3760,6 @@ struct OperatorLaneReadoutItem: Identifiable { case "output bytes": return [.value(displayValue), .meta(" output")] case "max output", "max tool output", "largest output": - if let source = splitLargestOutputSource(displayValue) { - return [.value("\(source.output)(\(source.tool))"), .meta(" max output")] - } return [.value(displayValue), .meta(" max output")] case "largest tool", "source": return [.value(displayValue), .meta(" source")] @@ -3796,20 +3782,6 @@ struct OperatorLaneReadoutItem: Identifiable { } } -fileprivate func splitLargestOutputSource(_ value: String) -> (output: String, tool: String)? { - guard let range = value.range(of: " from ") else { - return nil - } - - let output = String(value[..Run History if (metrics.largest_tool_output_bytes != null) { facts.push([ "max output", - formatLargestOutputValue( - metrics.largest_tool_output_bytes, - metrics.largest_tool_output_tool, - ), + formatLargestOutputValue(metrics.largest_tool_output_bytes), ]); } @@ -8525,14 +8522,12 @@

Run History

} } - function formatLargestOutputValue(bytes, tool = "") { + function formatLargestOutputValue(bytes) { if (bytes == null) { return "-"; } - const output = formatCompactBytes(bytes); - const source = tool ? String(tool).trim() : ""; - return source ? `${output}(${source})` : output; + return formatCompactBytes(bytes); } function renderLifecycleMetricSegment(segment, slotIndex) { @@ -8620,7 +8615,7 @@

Run History

if (largestOutput != null) { appendLifecycleMetricSegment( toolSegments, - formatLargestOutputValue(largestOutput, lifecycle?.largest_tool_output_tool), + formatLargestOutputValue(largestOutput), "max output", ); } @@ -8671,10 +8666,7 @@

Run History

const outputTokens = lifecycleNumber(phase.output_tokens_cumulative); const toolCalls = lifecycleNumber(phase.tool_call_count); const largestOutput = phase?.largest_tool_output_bytes != null - ? formatLargestOutputValue( - phase.largest_tool_output_bytes, - phase.largest_tool_output_tool, - ) + ? formatLargestOutputValue(phase.largest_tool_output_bytes) : "-"; return [ @@ -8862,7 +8854,7 @@

Run History

? "" : `, ${peakInput} peak window`; - return `input ${latestInput} current window${peakSummary}, cumulative input ${formatCompactCount(summary.input_tokens_cumulative)}, max output ${formatLargestOutputValue(summary.largest_tool_output_bytes, summary.largest_tool_output_tool)}`; + return `input ${latestInput} current window${peakSummary}, cumulative input ${formatCompactCount(summary.input_tokens_cumulative)}, max output ${formatLargestOutputValue(summary.largest_tool_output_bytes)}`; } function childAgentLargeOutputSummary(summary) { @@ -8987,10 +8979,9 @@

Run History

]; if (metrics.largest_tool_output_bytes != null) { - const tool = metrics.largest_tool_output_tool || "tool"; facts.push([ "Largest output", - formatLargestOutputValue(metrics.largest_tool_output_bytes, displayToken(tool)), + formatLargestOutputValue(metrics.largest_tool_output_bytes), ]); } diff --git a/apps/decodex/src/orchestrator/tests/operator/status/dashboard.rs b/apps/decodex/src/orchestrator/tests/operator/status/dashboard.rs index ee242efb6..8ad4f4f68 100644 --- a/apps/decodex/src/orchestrator/tests/operator/status/dashboard.rs +++ b/apps/decodex/src/orchestrator/tests/operator/status/dashboard.rs @@ -437,10 +437,12 @@ fn assert_child_lifecycle_contract(response: &str) { "gap: 4px clamp(24px, 2vw, 34px);", "overflow: hidden;", "text-overflow: ellipsis;", + "function formatLargestOutputValue(bytes)", + "return formatCompactBytes(bytes);", "const header = [\"Stage\", \"attempts\", \"inference\", \"input\", \"output\", \"tools\", \"max output\"];", "const alignRight = new Set([1, 2, 3, 4, 5, 6]);", "width: fit-content;\n\t\t\t\tmax-width: 100%;", - "appendLifecycleMetricSegment(\n\t\t\t\t\t\t\ttoolSegments,\n\t\t\t\t\t\t\tformatLargestOutputValue(largestOutput, lifecycle?.largest_tool_output_tool),\n\t\t\t\t\t\t\t\"max output\",", + "appendLifecycleMetricSegment(\n\t\t\t\t\t\t\ttoolSegments,\n\t\t\t\t\t\t\tformatLargestOutputValue(largestOutput),\n\t\t\t\t\t\t\t\"max output\",", "\"tools\"", "output bytes", "field(\"Large outputs\", childAgentLargeOutputSummary(childAgentActivity(run)))", @@ -463,6 +465,11 @@ fn assert_child_lifecycle_contract(response: &str) { "\"model time\"", "\"input tokens\"", "\"output tokens\"", + "${output}(${source})", + "function largestOutputHelp(bytes, tool = \"\")", + "const titleAttribute = segment.help ? ` title=\"${escapeHtml(segment.help)}\"` : \"\";", + "largestOutputHelp(largestOutput, lifecycle?.largest_tool_output_tool)", + "formatLargestOutputValue(largestOutput, lifecycle?.largest_tool_output_tool)", ], ); }