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
1 change: 1 addition & 0 deletions changelog.d/fixed-10658.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- dashboard: Overview median-age KPI names its population and basis (#10658)
1 change: 1 addition & 0 deletions src/changelog.d/fixed-overview-median-age-label.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Clarify the Overview median-age KPI label and tooltip so it names the actionable open issue/PR population and age basis.
2 changes: 2 additions & 0 deletions src/pkg/dashboard/overview_kpi_sparklines_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ assert.equal((markup.match(/class="overview-kpi"/g) || []).length, 6);
assert.equal((markup.match(/<svg/g) || []).length, 6);
assert.match(markup, />39<\/span><span class="overview-kpi-label">Total open issues<\/span>/);
assert.match(markup, />31<\/span><span class="overview-kpi-label">Total open PRs<\/span>/);
assert.match(markup, />—<\/span><span class="overview-kpi-label">Median actionable age \(updated\)<\/span>/);
assert.match(markup, /Median time since updated for actionable open issues and PRs in the selected repos \(not MTTR, which measures time-to-resolve for closed items\)\./);
for (const key of ['open-issues','open-prs','actionable-now','held','blocked-needs-human','median-age']) {
assert.match(markup, new RegExp('overview-kpi:' + key));
}
Expand Down
6 changes: 5 additions & 1 deletion src/pkg/dashboard/overview_kpi_values_10139_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ assert.deepEqual(Object.fromEntries(values), {
'Actionable now (issues and PRs)': '103',
'Held': '1',
'Blocked / needs-human': '1',
'Median age': '7m',
'Median actionable age (updated)': '7m',
});

repos[0].issues = 123;
Expand All @@ -83,6 +83,10 @@ const rawOut = renderOverviewKPIs(repos, issueSlices, prSlices, state);
const rawValues = Object.fromEntries([...rawOut.matchAll(/<span class="overview-kpi-value"[^>]*>([^<]*)<\/span><span class="overview-kpi-label">([^<]*)<\/span>/g)].map(m => [m[2], m[1]]));
assert.equal(rawValues['Total open issues'], '123');
assert.equal(rawValues['Total open PRs'], '45');
assert.match(out, /title="Median time since updated for actionable open issues and PRs in the selected repos \(not MTTR, which measures time-to-resolve for closed items\)\."/);
const createdOut = renderOverviewKPIs(repos, issueSlices, prSlices, { showKPIs: true, timeBasis: 'created' });
assert.match(createdOut, />7m<\/span><span class="overview-kpi-label">Median actionable age \(created\)<\/span>/);
assert.match(createdOut, /title="Median time since created for actionable open issues and PRs in the selected repos \(not MTTR, which measures time-to-resolve for closed items\)\."/);
`
out, err := exec.Command(node, "-e", script).CombinedOutput()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/dashboard/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13348,7 +13348,7 @@ <h4 style="font-size:0.95rem;margin:var(--sp-0) var(--sp-0) var(--sp-3)">What sh
{ key: 'actionable-now', field: 'overviewActionable', label: 'Actionable now (issues and PRs)', value: actionableNow, rawValue: actionableNow, color: 'var(--accent)', tip: 'Items in bands that can move without waiting.' },
{ key: 'held', field: 'overviewHeld', label: 'Held', value: held, rawValue: held, color: 'color-mix(in srgb, var(--orange) 65%, var(--muted))', tip: 'Issues and PRs deliberately paused by a hold.' },
{ key: 'blocked-needs-human', field: 'overviewBlockedHuman', label: 'Blocked / needs-human', value: blockedNeedsHuman, rawValue: blockedNeedsHuman, color: 'var(--red)', tip: 'Waiting, blocked, or escalated work needing a person or dependency.' },
{ key: 'median-age', field: 'overviewMedianAgeSec', label: 'Median age', value: age, rawValue: ageSec, color: 'var(--purple)', sparkFmt: fmtDurationFromSeconds, tip: 'Median selected actionable item age by the configured time basis.' }
{ key: 'median-age', field: 'overviewMedianAgeSec', label: `Median actionable age (${state.timeBasis === 'created' ? 'created' : 'updated'})`, value: age, rawValue: ageSec, color: 'var(--purple)', sparkFmt: fmtDurationFromSeconds, tip: `Median time since ${state.timeBasis === 'created' ? 'created' : 'updated'} for actionable open issues and PRs in the selected repos (not MTTR, which measures time-to-resolve for closed items).` }
];
overviewKPIRecordLocal(overviewKPICurrentSample(cards));
return `<div class="overview-kpis sec-headline" data-collapsed-keep>${overviewKPIWindowControls()}${cards.map(card => {
Expand Down
Loading