diff --git a/scripts/assets/web-probe-sentinel-dashboard/dashboard.css b/scripts/assets/web-probe-sentinel-dashboard/dashboard.css index 5e9dd415..9af6b424 100644 --- a/scripts/assets/web-probe-sentinel-dashboard/dashboard.css +++ b/scripts/assets/web-probe-sentinel-dashboard/dashboard.css @@ -989,6 +989,17 @@ select { font-size: 12px; } +.aggregation-root-cause { + align-items: stretch; +} + +.root-cause-chip { + max-width: 100%; + justify-content: flex-start; + white-space: normal; + text-align: left; +} + .finding-list { display: grid; gap: 8px; @@ -1052,6 +1063,10 @@ select { display: none; } +.finding-item.is-collapsed { + gap: 5px; +} + .finding-row { display: flex; align-items: center; @@ -1077,6 +1092,21 @@ select { gap: 6px; } +.finding-direct-cause { + display: grid; + grid-template-columns: auto minmax(0, 1fr); + gap: 6px; + align-items: start; + color: #1f2937; + font-size: 11px; + line-height: 1.35; + overflow-wrap: anywhere; +} + +.finding-direct-cause strong { + color: #1d4ed8; +} + .finding-summary { color: #1f2937; font-size: 12px; diff --git a/scripts/assets/web-probe-sentinel-dashboard/dashboard.js b/scripts/assets/web-probe-sentinel-dashboard/dashboard.js index 3340738a..71c09775 100644 --- a/scripts/assets/web-probe-sentinel-dashboard/dashboard.js +++ b/scripts/assets/web-probe-sentinel-dashboard/dashboard.js @@ -306,6 +306,10 @@ async function loadDashboard(options) { state.runViews = null; state.selectedTraceChoiceIndex = 0; } + if (state.selectedRunId === null) { + const latestRunId = latestRunIdFrom(overview, state.runs); + if (latestRunId) state.selectedRunId = latestRunId; + } renderDashboard(); if (state.selectedRunId && state.runDetail === null) await selectRun(state.selectedRunId); } catch (error) { @@ -477,7 +481,8 @@ function renderFindings() { refs.findingsList.innerHTML = groups.map((group) => { const visibleItems = group.items.slice(0, findingVisibleLimit(group.key)); const hiddenCount = Math.max(0, group.items.length - visibleItems.length); - return `
+ const defaultOpen = group.items.some(findingHasRootCause) || isBlockingSeverity(group.key) || groups.length <= 2; + return `
${escapeHtml(displaySeverity(group.key))} ${formatNumber(group.totalCount)} @@ -526,11 +531,13 @@ function renderFindingItemCollapsed(item) { const rootCause = findingRootCauseText(item); const evidence = findingEvidenceText(item); const nextAction = item.nextAction || findingNextAction(code); + const directCause = rootCause || nextAction; return `