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-16552-pushed-head-ci-track.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- The Activity Monitor keeps the CI track lit on a 071/072 row whose pushed or checking head has checks running, instead of muting it as waiting on the contributor ([#16552](https://github.com/hivecommons/hive/issues/16552)).
11 changes: 11 additions & 0 deletions src/pkg/dashboard/stage_tracker_activity.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,17 @@ test('known and original chevrons keep full long text inside a shared one-line c
assert.match(css, /\.ham-row > \.ham-strip-row, \.ham-sub > \.ham-strip-row, \.ham-cols > \.ham-strip-row \{ overflow-x: auto; \}/);
});

test('a 071/072 row with a pushed or checking head keeps its running CI track lit (#16552)', () => {
for (const stage of [71, 72]) {
for (const state of ['pushed', 'checking']) {
const cells = physicalTracks(livePR({ stage, display_column: 50, push: { state }, ci_activity: activity('running', 'CI running · 1/2 checks done', true) }));
assert.match(cells.ci, /ham-activity-track active/, stage + '/' + state + ': checks run on the pushed head');
}
const parked = physicalTracks(livePR({ stage, display_column: 50, ci_activity: activity('running', 'CI running · 1/2 checks done', true) }));
assert.doesNotMatch(parked.ci, /ham-activity-track active/, stage + ': no push in flight stays settled, waiting on the contributor');
}
});

test('real source repair can show three concurrent activities without naming a generic worker as reviewer', () => {
const row = fs.readFileSync(path.join(root, 'tracker-row.js'), 'utf8');
const definitions = globals + `
Expand Down
4 changes: 3 additions & 1 deletion src/pkg/dashboard/static-src/js/tracker-row-strip.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
if (!item) return false;
if (item.needs_human || item.on_hold || item.hold) return true;
const stage = Number(item.stage);
if (stage === 71 || stage === 72) return true;
// A freshly pushed head is in motion: checks run on it, matching
// tracker-row-anchor's column-50 anchor (hivecommons/hive#16552).
if ((stage === 71 || stage === 72) && !(item.push && ['pushed', 'checking'].includes(item.push.state))) return true;
const code = item.code_activity;
return !!(code && code.head === item.head && code.state === 'waiting_owner');
}
Expand Down
4 changes: 3 additions & 1 deletion src/pkg/dashboard/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17915,7 +17915,9 @@ <h3 class="faq-group-title">Where to get help</h3>
if (!item) return false;
if (item.needs_human || item.on_hold || item.hold) return true;
const stage = Number(item.stage);
if (stage === 71 || stage === 72) return true;
// A freshly pushed head is in motion: checks run on it, matching
// tracker-row-anchor's column-50 anchor (hivecommons/hive#16552).
if ((stage === 71 || stage === 72) && !(item.push && ['pushed', 'checking'].includes(item.push.state))) return true;
const code = item.code_activity;
return !!(code && code.head === item.head && code.state === 'waiting_owner');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,12 @@
assert(Math.abs((text.left + text.right) / 2 - (bounds.left + bounds.right) / 2) <= glyphTolerance, name + 'caption text is horizontally centred within its copy box: ' +
JSON.stringify({ text, copy: { left: bounds.left, right: bounds.right } }));
}
// A `display: contents` wrapper (.ham-active-ico-wrap) has no box of
// its own: its children are the flex items that take space, so the
// union measures them, not the box-less wrapper.
const boxes = el => getComputedStyle(el).display === 'contents' ? [...el.children].flatMap(boxes) : [el];
const group = copy.parentElement === info
? [...info.children].filter(child => visible(child) && !child.classList.contains('config-tooltip')).map(rect)
? [...info.children].flatMap(boxes).filter(child => visible(child) && !child.classList.contains('config-tooltip')).map(rect)
: [bounds];
const union = { left: Math.min(...group.map(box => box.left)), right: Math.max(...group.map(box => box.right)),
top: Math.min(...group.map(box => box.top)), bottom: Math.max(...group.map(box => box.bottom)) };
Expand Down
Loading