generated from coulomb/repo-seed
feat(dashboard): add mouseover tooltips to WHI metric abbreviations
DD, BR, SPR, PEP, CDDR now show full name + one-sentence explanation on hover via title attributes. Metric labels get a dotted underline and cursor:help to signal they are hoverable. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -158,11 +158,11 @@ function _warnLevel(name, val) {
|
||||
function _warnColor(lv) { return lv === 2 ? "#dc2626" : lv === 1 ? "#d97706" : "var(--theme-foreground-muted, #666)"; }
|
||||
|
||||
const _whiMetrics = [
|
||||
{name: "DD", val: _DD, fmt: v => v.toFixed(2)},
|
||||
{name: "BR", val: _BR, fmt: v => (v*100).toFixed(0)+"%"},
|
||||
{name: "SPR", val: _SPR, fmt: v => (v*100).toFixed(0)+"%"},
|
||||
{name: "PEP", val: _PEP, fmt: v => (v*100).toFixed(0)+"%"},
|
||||
{name: "CDDR", val: _CDDR, fmt: v => (v*100).toFixed(0)+"%"},
|
||||
{name: "DD", val: _DD, fmt: v => v.toFixed(2), tip: "Dependency Density — average number of dependencies per open workstream; high values indicate a tightly coupled graph that is hard to parallelise."},
|
||||
{name: "BR", val: _BR, fmt: v => (v*100).toFixed(0)+"%", tip: "Blocked Ratio — share of open workstreams currently in a blocked state; directly reduces the work that can proceed right now."},
|
||||
{name: "SPR", val: _SPR, fmt: v => (v*100).toFixed(0)+"%", tip: "Single-Point Risk — share of open workstreams that are depended on by others but have no incoming dependencies themselves; losing one stalls everything downstream."},
|
||||
{name: "PEP", val: _PEP, fmt: v => (v*100).toFixed(0)+"%", tip: "Parallel Execution Potential — share of open workstreams with zero blocking dependencies that could start or continue immediately."},
|
||||
{name: "CDDR", val: _CDDR, fmt: v => (v*100).toFixed(0)+"%", tip: "Cross-Domain Dependency Ratio — share of dependency edges that cross domain boundaries; high values mean progress in one domain is gated on another team or project."},
|
||||
];
|
||||
|
||||
const _whiBox = html`<div class="kpi-infobox whi-box">
|
||||
@@ -179,7 +179,7 @@ const _whiBox = html`<div class="kpi-infobox whi-box">
|
||||
${_whiMetrics.map(m => {
|
||||
const lv = _warnLevel(m.name, m.val);
|
||||
return html`<div class="whi-metric-row">
|
||||
<span class="whi-metric-name" style="color:${_warnColor(lv)}">${m.name}</span>
|
||||
<span class="whi-metric-name" style="color:${_warnColor(lv)}" title="${m.tip}">${m.name}</span>
|
||||
<span class="whi-metric-val" style="color:${_warnColor(lv)}">${m.fmt(m.val)}</span>
|
||||
</div>`;
|
||||
})}
|
||||
@@ -323,7 +323,7 @@ if (wsWithDeps.length === 0) {
|
||||
.whi-cycle-alert { background: #fef2f2; color: #dc2626; border-radius: 4px; padding: 0.2rem 0.45rem; font-size: 0.72rem; font-weight: 600; margin-bottom: 0.4rem; }
|
||||
.whi-metrics { border-top: 1px solid var(--theme-foreground-faint, #eee); padding-top: 0.35rem; margin-bottom: 0.35rem; }
|
||||
.whi-metric-row { display: flex; justify-content: space-between; padding: 0.16rem 0; }
|
||||
.whi-metric-name { font-family: monospace; font-size: 0.72rem; }
|
||||
.whi-metric-name { font-family: monospace; font-size: 0.72rem; text-decoration: underline dotted; text-underline-offset: 2px; cursor: help; }
|
||||
.whi-metric-val { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.78rem; }
|
||||
.whi-domains { border-top: 1px solid var(--theme-foreground-faint, #eee); padding-top: 0.35rem; }
|
||||
.whi-domain-header { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--theme-foreground-faint, #aaa); margin-bottom: 0.2rem; }
|
||||
|
||||
Reference in New Issue
Block a user