]*title="The one PR Author: hive · @hive-bot · linked PR, shown on its issue's row"/.test(row), 'the PR link also explains the shared row: ' + row);
// tracker-cues: with no agent on the item the chevron is static (waiting);
// the pulse and the "Working now" lead need a worker in ctx.workers.
-assert.ok(row.includes('CI unknown') && row.includes('Review unknown') && !strip(row).includes('data-motion='), 'a stage label alone supplies no activity: ' + row);
+assert.ok(row.includes('CI · no data for head') && row.includes('Review · no data for head') && !strip(row).includes('data-motion='), 'a stage label alone supplies no activity: ' + row);
row = stageTrackerRowHtml(g[1], stages, Object.assign({}, ctx, { workers: { 'g/r#21': { agent: 'scout', action: 'agent_comment_created', at: new Date(now - 120000).toISOString() } } }));
-assert.ok(row.includes('Review unknown') && !strip(row).includes('data-motion='), 'a generic commenter is not a current-head reviewer: ' + row);
+assert.ok(row.includes('Review · no data for head') && !strip(row).includes('data-motion='), 'a generic commenter is not a current-head reviewer: ' + row);
assert.ok(/class="ham-row cue-working"/.test(row), 'the row carries the working cue: ' + row);
assert.ok(!/]*title="Claimed"/.test(stageTrackerRowHtml(g[0], stages, ctx)), 'Claimed is static: no data-motion');
// Issue with two PRs: #N link + title on the issue line, nothing lit there;
diff --git a/src/pkg/dashboard/static-src/js/tracker-row-strip.js b/src/pkg/dashboard/static-src/js/tracker-row-strip.js
index 3740621d3a..e2834b73b3 100644
--- a/src/pkg/dashboard/static-src/js/tracker-row-strip.js
+++ b/src/pkg/dashboard/static-src/js/tracker-row-strip.js
@@ -112,6 +112,10 @@
case 'adjudicating': return count + ' · ' + (actor ? actor + ' adjudicating' : 'adjudicating');
case 'assigned': return count + ' · ' + (actor ? actor + ' queued' : 'queued') + stageTrackerQueueAheadWord(a);
case 'unassigned': return count + ' · queued' + stageTrackerQueueAheadWord(a);
+ // Derived from the PR's own state when no reviewer has touched the
+ // head (stage_tracker_review_fallback.go): the words are the
+ // statement itself (hivecommons/hive#16661).
+ case 'waiting_ci': case 'not_started': case 'not_requested': case 'closed': case 'unverified': return a.caption || count;
default: return count + ' · ' + (newHead ? reReview : total && done ? 'perspectives' : 'queued');
}
}
@@ -266,16 +270,29 @@
const name = kind === 'ci' ? 'CI' : 'Review';
const a = item && item[kind + '_activity'];
const matches = a && item.head && a.head === item.head;
- let caption = matches ? a.caption || name + ' unknown' : name + ' unknown';
+ // No evidence for the head is still a statement with a next step —
+ // never "activity unknown" (hivecommons/hive#16661).
+ const noData = name + ' · no data for head ' + (item.head ? String(item.head).slice(0, 7) : 'unknown') + ' yet · refreshing';
+ let caption = matches ? a.caption || noData : noData;
+ // A legacy "CI unknown · reason" caption keeps its reason behind the statement.
+ caption = caption.replace(/^(CI|Review) unknown(?= ·|$)/, noData);
const observed = matches && a.observed_at ? Date.parse(a.observed_at) : NaN;
const activityFreshMS = 2 * 60 * 1000;
const clock = Number(nowMs) || Date.now();
+ // "12m ago" beside a timestamp (kept local: harnesses lift this function alone).
+ const agoWord = (atMs, nowMs) => { const mins = Math.floor((nowMs - atMs) / 60000); return !Number.isFinite(mins) || mins < 1 ? 'just now' : mins < 60 ? mins + 'm ago' : mins < 1440 ? Math.floor(mins / 60) + 'h ago' : Math.floor(mins / 1440) + 'd ago'; };
const stale = Number.isFinite(observed) && (clock - observed > activityFreshMS || observed > clock);
const current = sg.state === 'active';
const state = matches ? a.state || 'unknown' : 'unknown';
- const known = matches && state !== 'unknown' && Number.isFinite(observed) && !stale;
- const active = known && a.active;
- if (matches && !known && state !== 'unknown') caption = name + ' activity unknown · last observed ' + state + ' · ' + caption;
+ // A settled verdict on the head stays known as its observation
+ // ages; only motion needs a fresh observation (hivecommons/hive#16617).
+ const settledState = ['approved', 'changes_requested', 'human_decision', 'passing', 'failing', 'skipped', 'missing', 'waiting_ci', 'not_started', 'not_requested', 'closed', 'unverified'].includes(state);
+ const fresh = Number.isFinite(observed) && !stale;
+ const known = matches && state !== 'unknown' && (settledState || fresh);
+ const active = known && fresh && a.active;
+ const perspectives = matches && kind === 'review' && Array.isArray(a.perspectives) ? a.perspectives : [];
+ const perspectiveMark = v => v === 'approve' ? '✓' : ['changes_requested', 'reject'].includes(v) ? '✗' : v === 'requires_human' ? 'requires human' : String(v || '?');
+ const perspectiveLine = p => String(p.name || 'perspective') + ' ' + perspectiveMark(p.verdict) + (p.summary ? ': ' + p.summary : '');
const ownsPR = item.kind === 'pr' || item.via_pr;
const text = typeof stageTrackerTrackWord === 'function' ? stageTrackerTrackWord(item, kind, current) : (matches ? a.caption || name + ' ' + state : '');
const finished = matches && (state === 'passing' || state === 'approved');
@@ -298,7 +315,7 @@
const humanAction = approvalPending > 0 ? STAGE_TRACKER_WORKFLOW_APPROVAL_TIP : kind === 'review' && state === 'human_decision' ? 'Needs a person\'s decision' : '';
const personIco = stalled && humanAction ? stageTrackerIcon('human', 'ham-ico ham-actor-ico', humanAction) : '';
const source = matches ? a.source || 'unavailable' : 'unavailable';
- const freshness = !Number.isFinite(observed) ? 'observation time unknown' : (stale ? 'stale · ' : 'observed · ') + new Date(observed).toISOString();
+ const freshness = !Number.isFinite(observed) ? 'observation time unknown' : (stale ? 'stale · ' : 'observed · ') + new Date(observed).toISOString() + ' (' + agoWord(observed, clock) + ')';
const since = matches && a.since && Number.isFinite(Date.parse(a.since)) ? ' · since ' + new Date(a.since).toISOString() : '';
let blocker = matches && a.blocker ? ' · ' + a.blocker : '';
// A sign-off ask: the tooltip carries the question itself (who should
@@ -309,12 +326,15 @@
// The backend's plain-language sentence behind the caption rides in
// the tooltip only; the chevron clamps the caption.
const detail = matches && a.detail ? ' · ' + a.detail : '';
- let tip = caption + blocker + detail + ' · head ' + (item.head || 'unknown') + ' · ' + source + ' · ' + freshness + since;
+ const sinceAgo = matches && a.since && Number.isFinite(Date.parse(a.since)) && settledState ? ' · ' + agoWord(Date.parse(a.since), clock) : '';
+ let tip = caption + blocker + detail + sinceAgo + (perspectives.length ? ' · ' + perspectives.map(perspectiveLine).join(' · ') : '') + ' · head ' + (item.head || 'unknown') + ' · ' + source + ' · ' + freshness + since;
const code = item.code_activity;
const codeNote = code && code.head === item.head && Number(item.display_column) === 50 &&
((kind === 'review' && code.state === 'waiting_fixer') || (kind === 'ci' && code.state === 'waiting_ci')) ? code.caption : '';
if (codeNote) tip += ' · code source ' + (code.source || 'unavailable') + ' · observed ' + (code.observed_at || 'unknown') + ' · since ' + (code.since || 'unknown') + (code.blocker ? ' · ' + code.blocker : '');
- const contextWord = kind === 'review' && sg.state === 'active' && !codeNote && sg.detour ? sg.detour.text : '';
+ // The detour's words ride along, minus the code lane's "activity unknown"
+ // (the Review tooltip states what is observed, hivecommons/hive#16661).
+ const contextWord = kind === 'review' && sg.state === 'active' && !codeNote && sg.detour ? String(sg.detour.text || '').replace(/ · activity unknown$/, ' · no fix work observed yet').replace(/^Code activity unknown$/, 'no code work observed yet') : '';
let decided = kind === 'review' && sg.state === 'active' && item.decided && typeof stageTrackerMergeGateWordHtml === 'function' ? stageTrackerMergeGateWordHtml(item, nowMs) : '';
const codeObserved = Date.parse(code && code.observed_at || '');
const codeFresh = code && code.head === item.head && code.source === 'fix-dispatch+successful-edit+verified-git-worktree' && code.active && code.state === 'fixing' && Number.isFinite(codeObserved) && codeObserved <= clock && clock - codeObserved <= activityFreshMS;
@@ -336,7 +356,7 @@
const evidenceLink = ownsPR && evidenceURL ? `${icon}${word}` : icon + word;
const routeState = (sg.state || 'todo') + (sg.detour ? ' detoured' : '');
const hold = item.hold;
- const fullTip = (current ? 'Current pipeline phase · ' : '') + name + ': ' + (text ? text + ' · ' : '') + tip +
+ const fullTip = (current ? 'Current pipeline phase · ' : '') + name + ': ' + (text && text !== caption ? text + ' · ' : '') + tip +
(matches && a.actor ? ' · actor ' + a.actor : '') +
(codeNote || contextWord ? ' · ' + (codeNote || contextWord) : '') +
(hold ? ' · ' + (hold.pill || 'Held by @' + hold.by) + (hold.reason ? ' · ' + hold.reason : '') : '') +
@@ -552,13 +572,15 @@
const tracks = (item.kind === 'pr' || item.via_pr) && item.head ? ['ci', 'review'].map(kind => {
const a = item[kind + '_activity'];
const name = kind === 'ci' ? 'CI' : 'Review';
- if (!a || a.head !== item.head) return name + ' unknown';
+ const noData = name + ' · no data for head ' + String(item.head).slice(0, 7) + ' yet · refreshing';
+ if (!a || a.head !== item.head) return noData;
const observed = Date.parse(a.observed_at || '');
const activityFreshMS = 2 * 60 * 1000;
const clock = Number(nowMs) || Date.now();
const fresh = Number.isFinite(observed) && observed <= clock && clock - observed <= activityFreshMS;
- if ((a.active || ['running', 'reviewing', 'adjudicating'].includes(a.state)) && !fresh) return name + ' activity unknown · last observed ' + (a.state || 'unknown');
- return (a.caption || name + ' unknown') + (!Number.isFinite(observed) ? ' · observation time unknown' : !fresh ? ' · stale observation' : '');
+ const agoWord = (atMs, nowMs) => { const mins = Math.floor((nowMs - atMs) / 60000); return !Number.isFinite(mins) || mins < 1 ? 'just now' : mins < 60 ? mins + 'm ago' : mins < 1440 ? Math.floor(mins / 60) + 'h ago' : Math.floor(mins / 1440) + 'd ago'; };
+ const moving = a.active || ['running', 'reviewing', 'adjudicating'].includes(a.state);
+ return (a.caption || noData).replace(/^(CI|Review) unknown(?= ·|$)/, noData) + (!Number.isFinite(observed) ? ' · observation time unknown' : !fresh ? ' · last observed ' + agoWord(observed, clock) + (moving ? ' · refreshing' : '') : '');
}).join(' · ') : '';
return `${esc(text + (tracks ? ' · ' + tracks : ''))}
`;
}
diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html
index 3f924a52b6..6081cc0581 100644
--- a/src/pkg/dashboard/static/index.html
+++ b/src/pkg/dashboard/static/index.html
@@ -18047,6 +18047,10 @@ Where to get help
case 'adjudicating': return count + ' · ' + (actor ? actor + ' adjudicating' : 'adjudicating');
case 'assigned': return count + ' · ' + (actor ? actor + ' queued' : 'queued') + stageTrackerQueueAheadWord(a);
case 'unassigned': return count + ' · queued' + stageTrackerQueueAheadWord(a);
+ // Derived from the PR's own state when no reviewer has touched the
+ // head (stage_tracker_review_fallback.go): the words are the
+ // statement itself (hivecommons/hive#16661).
+ case 'waiting_ci': case 'not_started': case 'not_requested': case 'closed': case 'unverified': return a.caption || count;
default: return count + ' · ' + (newHead ? reReview : total && done ? 'perspectives' : 'queued');
}
}
@@ -18201,16 +18205,29 @@ Where to get help
const name = kind === 'ci' ? 'CI' : 'Review';
const a = item && item[kind + '_activity'];
const matches = a && item.head && a.head === item.head;
- let caption = matches ? a.caption || name + ' unknown' : name + ' unknown';
+ // No evidence for the head is still a statement with a next step —
+ // never "activity unknown" (hivecommons/hive#16661).
+ const noData = name + ' · no data for head ' + (item.head ? String(item.head).slice(0, 7) : 'unknown') + ' yet · refreshing';
+ let caption = matches ? a.caption || noData : noData;
+ // A legacy "CI unknown · reason" caption keeps its reason behind the statement.
+ caption = caption.replace(/^(CI|Review) unknown(?= ·|$)/, noData);
const observed = matches && a.observed_at ? Date.parse(a.observed_at) : NaN;
const activityFreshMS = 2 * 60 * 1000;
const clock = Number(nowMs) || Date.now();
+ // "12m ago" beside a timestamp (kept local: harnesses lift this function alone).
+ const agoWord = (atMs, nowMs) => { const mins = Math.floor((nowMs - atMs) / 60000); return !Number.isFinite(mins) || mins < 1 ? 'just now' : mins < 60 ? mins + 'm ago' : mins < 1440 ? Math.floor(mins / 60) + 'h ago' : Math.floor(mins / 1440) + 'd ago'; };
const stale = Number.isFinite(observed) && (clock - observed > activityFreshMS || observed > clock);
const current = sg.state === 'active';
const state = matches ? a.state || 'unknown' : 'unknown';
- const known = matches && state !== 'unknown' && Number.isFinite(observed) && !stale;
- const active = known && a.active;
- if (matches && !known && state !== 'unknown') caption = name + ' activity unknown · last observed ' + state + ' · ' + caption;
+ // A settled verdict on the head stays known as its observation
+ // ages; only motion needs a fresh observation (hivecommons/hive#16617).
+ const settledState = ['approved', 'changes_requested', 'human_decision', 'passing', 'failing', 'skipped', 'missing', 'waiting_ci', 'not_started', 'not_requested', 'closed', 'unverified'].includes(state);
+ const fresh = Number.isFinite(observed) && !stale;
+ const known = matches && state !== 'unknown' && (settledState || fresh);
+ const active = known && fresh && a.active;
+ const perspectives = matches && kind === 'review' && Array.isArray(a.perspectives) ? a.perspectives : [];
+ const perspectiveMark = v => v === 'approve' ? '✓' : ['changes_requested', 'reject'].includes(v) ? '✗' : v === 'requires_human' ? 'requires human' : String(v || '?');
+ const perspectiveLine = p => String(p.name || 'perspective') + ' ' + perspectiveMark(p.verdict) + (p.summary ? ': ' + p.summary : '');
const ownsPR = item.kind === 'pr' || item.via_pr;
const text = typeof stageTrackerTrackWord === 'function' ? stageTrackerTrackWord(item, kind, current) : (matches ? a.caption || name + ' ' + state : '');
const finished = matches && (state === 'passing' || state === 'approved');
@@ -18233,7 +18250,7 @@ Where to get help
const humanAction = approvalPending > 0 ? STAGE_TRACKER_WORKFLOW_APPROVAL_TIP : kind === 'review' && state === 'human_decision' ? 'Needs a person\'s decision' : '';
const personIco = stalled && humanAction ? stageTrackerIcon('human', 'ham-ico ham-actor-ico', humanAction) : '';
const source = matches ? a.source || 'unavailable' : 'unavailable';
- const freshness = !Number.isFinite(observed) ? 'observation time unknown' : (stale ? 'stale · ' : 'observed · ') + new Date(observed).toISOString();
+ const freshness = !Number.isFinite(observed) ? 'observation time unknown' : (stale ? 'stale · ' : 'observed · ') + new Date(observed).toISOString() + ' (' + agoWord(observed, clock) + ')';
const since = matches && a.since && Number.isFinite(Date.parse(a.since)) ? ' · since ' + new Date(a.since).toISOString() : '';
let blocker = matches && a.blocker ? ' · ' + a.blocker : '';
// A sign-off ask: the tooltip carries the question itself (who should
@@ -18244,12 +18261,15 @@ Where to get help
// The backend's plain-language sentence behind the caption rides in
// the tooltip only; the chevron clamps the caption.
const detail = matches && a.detail ? ' · ' + a.detail : '';
- let tip = caption + blocker + detail + ' · head ' + (item.head || 'unknown') + ' · ' + source + ' · ' + freshness + since;
+ const sinceAgo = matches && a.since && Number.isFinite(Date.parse(a.since)) && settledState ? ' · ' + agoWord(Date.parse(a.since), clock) : '';
+ let tip = caption + blocker + detail + sinceAgo + (perspectives.length ? ' · ' + perspectives.map(perspectiveLine).join(' · ') : '') + ' · head ' + (item.head || 'unknown') + ' · ' + source + ' · ' + freshness + since;
const code = item.code_activity;
const codeNote = code && code.head === item.head && Number(item.display_column) === 50 &&
((kind === 'review' && code.state === 'waiting_fixer') || (kind === 'ci' && code.state === 'waiting_ci')) ? code.caption : '';
if (codeNote) tip += ' · code source ' + (code.source || 'unavailable') + ' · observed ' + (code.observed_at || 'unknown') + ' · since ' + (code.since || 'unknown') + (code.blocker ? ' · ' + code.blocker : '');
- const contextWord = kind === 'review' && sg.state === 'active' && !codeNote && sg.detour ? sg.detour.text : '';
+ // The detour's words ride along, minus the code lane's "activity unknown"
+ // (the Review tooltip states what is observed, hivecommons/hive#16661).
+ const contextWord = kind === 'review' && sg.state === 'active' && !codeNote && sg.detour ? String(sg.detour.text || '').replace(/ · activity unknown$/, ' · no fix work observed yet').replace(/^Code activity unknown$/, 'no code work observed yet') : '';
let decided = kind === 'review' && sg.state === 'active' && item.decided && typeof stageTrackerMergeGateWordHtml === 'function' ? stageTrackerMergeGateWordHtml(item, nowMs) : '';
const codeObserved = Date.parse(code && code.observed_at || '');
const codeFresh = code && code.head === item.head && code.source === 'fix-dispatch+successful-edit+verified-git-worktree' && code.active && code.state === 'fixing' && Number.isFinite(codeObserved) && codeObserved <= clock && clock - codeObserved <= activityFreshMS;
@@ -18271,7 +18291,7 @@ Where to get help
const evidenceLink = ownsPR && evidenceURL ? `${icon}${word}` : icon + word;
const routeState = (sg.state || 'todo') + (sg.detour ? ' detoured' : '');
const hold = item.hold;
- const fullTip = (current ? 'Current pipeline phase · ' : '') + name + ': ' + (text ? text + ' · ' : '') + tip +
+ const fullTip = (current ? 'Current pipeline phase · ' : '') + name + ': ' + (text && text !== caption ? text + ' · ' : '') + tip +
(matches && a.actor ? ' · actor ' + a.actor : '') +
(codeNote || contextWord ? ' · ' + (codeNote || contextWord) : '') +
(hold ? ' · ' + (hold.pill || 'Held by @' + hold.by) + (hold.reason ? ' · ' + hold.reason : '') : '') +
@@ -18487,13 +18507,15 @@ Where to get help
const tracks = (item.kind === 'pr' || item.via_pr) && item.head ? ['ci', 'review'].map(kind => {
const a = item[kind + '_activity'];
const name = kind === 'ci' ? 'CI' : 'Review';
- if (!a || a.head !== item.head) return name + ' unknown';
+ const noData = name + ' · no data for head ' + String(item.head).slice(0, 7) + ' yet · refreshing';
+ if (!a || a.head !== item.head) return noData;
const observed = Date.parse(a.observed_at || '');
const activityFreshMS = 2 * 60 * 1000;
const clock = Number(nowMs) || Date.now();
const fresh = Number.isFinite(observed) && observed <= clock && clock - observed <= activityFreshMS;
- if ((a.active || ['running', 'reviewing', 'adjudicating'].includes(a.state)) && !fresh) return name + ' activity unknown · last observed ' + (a.state || 'unknown');
- return (a.caption || name + ' unknown') + (!Number.isFinite(observed) ? ' · observation time unknown' : !fresh ? ' · stale observation' : '');
+ const agoWord = (atMs, nowMs) => { const mins = Math.floor((nowMs - atMs) / 60000); return !Number.isFinite(mins) || mins < 1 ? 'just now' : mins < 60 ? mins + 'm ago' : mins < 1440 ? Math.floor(mins / 60) + 'h ago' : Math.floor(mins / 1440) + 'd ago'; };
+ const moving = a.active || ['running', 'reviewing', 'adjudicating'].includes(a.state);
+ return (a.caption || noData).replace(/^(CI|Review) unknown(?= ·|$)/, noData) + (!Number.isFinite(observed) ? ' · observation time unknown' : !fresh ? ' · last observed ' + agoWord(observed, clock) + (moving ? ' · refreshing' : '') : '');
}).join(' · ') : '';
return `${esc(text + (tracks ? ' · ' + tracks : ''))}
`;
}