Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions apps/decodex/src/orchestrator/operator_dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -6855,6 +6855,10 @@ <h2 id="recent-title">Run History</h2>
return `${childBucketSharePercent(bucket, totalWall)}% · ${formatDuration(seconds)} / ${formatDuration(totalWall)}`;
}

function childBucketRenderKey(bucket) {
return `child-bucket:${bucket?.name || "unknown"}`;
}

function childDiagnosticBucketRank(bucket) {
const name = String(bucket?.name || "").toLowerCase();
if (name.includes("protocol")) {
Expand Down Expand Up @@ -6955,7 +6959,7 @@ <h2 id="recent-title">Run History</h2>
const width = childBucketWidth(bucket, totalWall);

return `
<div class="child-bucket is-share" data-duration="wall-share">
<div class="child-bucket is-share" data-render-key="${escapeHtml(childBucketRenderKey(bucket))}" data-duration="wall-share">
<span class="child-bucket-name">${escapeHtml(humanizeToken(bucket.name))}</span>
<span class="child-bucket-bar" aria-hidden="true" style="--bucket-width: ${width}%"><span></span></span>
<span class="child-bucket-value">${escapeHtml(childBucketShareLabel(bucket, totalWall))}</span>
Expand All @@ -6982,7 +6986,7 @@ <h2 id="recent-title">Run History</h2>
const signalSummary = childBucketDiagnosticSummary(bucket);

return `
<div class="${bucketClass}"${bucketState}>
<div class="${bucketClass}" data-render-key="${escapeHtml(childBucketRenderKey(bucket))}"${bucketState}>
<span class="child-bucket-name">${escapeHtml(humanizeToken(bucket.name))}</span>
<span class="child-bucket-signals" aria-label="${escapeHtml(signalSummary)}">
${renderChildBucketDiagnosticSignals(bucket)}
Expand Down
13 changes: 13 additions & 0 deletions apps/decodex/src/orchestrator/tests/operator/status/dashboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,19 @@ fn operator_dashboard_child_bucket_rows_split_time_bars_from_event_diagnostics()
));
}

#[test]
fn operator_dashboard_keys_child_bucket_rows_for_stable_patching() {
let response = dashboard_response();

assert!(response.contains("function childBucketRenderKey(bucket)"));
assert_eq!(
response
.matches("data-render-key=\"${escapeHtml(childBucketRenderKey(bucket))}\"")
.count(),
2
);
}

#[test]
fn operator_dashboard_active_run_status_copy_stays_concise() {
let response = dashboard_response();
Expand Down