From dfcd6445ad4de2cf49674e12c93e9b95e39870ea Mon Sep 17 00:00:00 2001
From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Date: Sat, 7 Nov 2026 21:26:24 -0500
Subject: [PATCH 1/4] =?UTF-8?q?=E2=9C=A8=20dashboard:=20Activity=20monitor?=
=?UTF-8?q?=20merged=20and=20queue=20lists=20open=20as=20sheets=20on=20pho?=
=?UTF-8?q?nes?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
---
...ivity-monitor-phone-merged-queue-sheets.md | 1 +
.../dashboard/stage_tracker_pop_sheet.test.js | 46 ++++++++++++
src/pkg/dashboard/static-src/css/tracker.css | 12 +++
.../dashboard/static-src/js/tracker-merged.js | 48 +++++++++++-
.../dashboard/static-src/js/tracker-queue.js | 14 +++-
src/pkg/dashboard/static/index.html | 74 ++++++++++++++++++-
6 files changed, 189 insertions(+), 6 deletions(-)
create mode 100644 changelog.d/added-activity-monitor-phone-merged-queue-sheets.md
create mode 100644 src/pkg/dashboard/stage_tracker_pop_sheet.test.js
diff --git a/changelog.d/added-activity-monitor-phone-merged-queue-sheets.md b/changelog.d/added-activity-monitor-phone-merged-queue-sheets.md
new file mode 100644
index 0000000000..4a3add1e2d
--- /dev/null
+++ b/changelog.d/added-activity-monitor-phone-merged-queue-sheets.md
@@ -0,0 +1 @@
+- Dashboard: on phones the Activity monitor Merged and merge-queue lists now open as full-width modal sheets with tap-sized rows, closable with ✕, Esc or backdrop, instead of clipped popovers; desktop popovers are unchanged (#17165).
diff --git a/src/pkg/dashboard/stage_tracker_pop_sheet.test.js b/src/pkg/dashboard/stage_tracker_pop_sheet.test.js
new file mode 100644
index 0000000000..cd2df82e66
--- /dev/null
+++ b/src/pkg/dashboard/stage_tracker_pop_sheet.test.js
@@ -0,0 +1,46 @@
+// Activity Monitor Merged / merge-queue lists (hivecommons/hive#17165): on
+// phones they open as a .hive-dialog.modal-sheet wired through hiveWireDialog
+// (Esc, ✕, backdrop, focus back to the chip); desktop keeps the anchored
+// popovers. Asserts against the shipped index.html.
+const test = require('node:test');
+const assert = require('node:assert');
+const fs = require('node:fs');
+const path = require('node:path');
+
+const html = fs.readFileSync(path.join(__dirname, 'static', 'index.html'), 'utf8');
+
+function pick(re, what) {
+ const m = html.match(re);
+ assert.ok(m, what + ' not found in index.html');
+ return m[0];
+}
+
+test('sheet vs popover uses the modal-sheet media tier', () => {
+ assert.ok(html.includes("const STAGE_TRACKER_POP_SHEET_QUERY = '(max-width: 640px), ((pointer: coarse) and (max-width: 820px))';"));
+ assert.ok(html.includes('window.matchMedia(STAGE_TRACKER_POP_SHEET_QUERY).matches'));
+});
+
+test('both toggles open a hiveWireDialog sheet on phones and leave the popover hidden', () => {
+ const sheet = pick(/function stageTrackerPopSheetOpen\([\s\S]*?\n \}\n/, 'stageTrackerPopSheetOpen');
+ assert.ok(sheet.includes('hiveWireDialog(overlay'), 'wired through hiveWireDialog');
+ assert.ok(sheet.includes('modal-scroll ham-pop-sheet-body'), 'scroll body so the ✕ is decorated');
+ assert.ok(sheet.includes("chip.setAttribute('aria-expanded', 'false')") && sheet.includes('chip.focus()'), 'focus returns to the chip');
+ const merged = pick(/function hamMergedToggle\(open\) \{[\s\S]*?\n \}\n/, 'hamMergedToggle');
+ const queue = pick(/function hamQueueToggle\(open\) \{[\s\S]*?\n \}\n/, 'hamQueueToggle');
+ assert.ok(merged.includes("stageTrackerPopSheetOpen('merged'") && merged.includes('pop.hidden = true;'));
+ assert.ok(queue.includes("stageTrackerPopSheetOpen('queue'") && queue.includes('pop.hidden = true;'));
+});
+
+test('desktop popover path is unchanged', () => {
+ assert.ok(html.includes("const want = typeof open === 'boolean' ? open : !!pop.hidden;\n pop.hidden = !want;"));
+ assert.ok(html.includes('
{
+ const m = html.match(/@media \(max-width: 640px\), \(\(pointer: coarse\) and \(max-width: 820px\)\) \{\n\s*\.ham-pop-sheet[\s\S]*?\n \}\n/);
+ assert.ok(m, 'phone-scoped .ham-pop-sheet block');
+ assert.ok(m[0].includes('min-height: var(--tap-target)'));
+ assert.ok(m[0].includes('-webkit-line-clamp: 2'));
+ assert.ok(m[0].includes('--safe-area-bottom'));
+ assert.ok(html.includes('.ham-merged-list .ham-merged-repo { display: none; }'));
+});
diff --git a/src/pkg/dashboard/static-src/css/tracker.css b/src/pkg/dashboard/static-src/css/tracker.css
index 728f9fdb90..6520a7ca19 100644
--- a/src/pkg/dashboard/static-src/css/tracker.css
+++ b/src/pkg/dashboard/static-src/css/tracker.css
@@ -723,6 +723,18 @@
.ham-merged-list .ham-merged-meta { color: var(--text-faint); white-space: nowrap; font-size: var(--fs-xs); }
.ham-merged-pop .ham-empty { padding: var(--sp-2) 0; }
.ham-merged-pop-foot { margin-top: var(--sp-3); color: var(--text-faint); font-size: var(--fs-xs); }
+ .ham-merged-list .ham-merged-repo { display: none; }
+ @media (max-width: 640px), ((pointer: coarse) and (max-width: 820px)) {
+ .ham-pop-sheet .ham-merged-pop-head > span:first-child { display: none; }
+ .ham-pop-sheet .ham-merged-pop-head { margin-bottom: var(--sp-3); }
+ .ham-pop-sheet .ham-merged-list li { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "title title title" "num repo meta"; align-items: center; row-gap: var(--sp-1); min-height: var(--tap-target); padding: var(--sp-2) var(--sp-0); border-bottom: var(--line-width) solid var(--line); }
+ .ham-pop-sheet .ham-merged-list .ham-merged-title { grid-area: title; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
+ .ham-pop-sheet .ham-merged-list .ham-merged-num { grid-area: num; }
+ .ham-pop-sheet .ham-merged-list .ham-merged-meta { grid-area: meta; font-size: var(--fs-sm); }
+ .ham-pop-sheet .ham-merged-list .ham-merged-repo { grid-area: repo; display: inline-block; justify-self: start; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: var(--sp-0) var(--sp-2); border: var(--line-width) solid var(--line); border-radius: var(--r-lg); color: var(--text-faint); font-size: var(--fs-xs); }
+ .ham-pop-sheet .ham-merged-list a { display: inline-flex; align-items: center; min-height: var(--tap-target); }
+ .ham-pop-sheet .ham-merged-pop-foot { padding-bottom: var(--safe-area-bottom); }
+ }
/* Merge queue chip + popover (hivecommons/hive issue 15395): the train in merge order. */
.ham-queue-chip .ham-queue-n { margin-left: var(--sp-1); font-variant-numeric: tabular-nums; }
.ham-queue-train { margin: var(--sp-3) 0 var(--sp-2); font-weight: var(--fw-semibold); }
diff --git a/src/pkg/dashboard/static-src/js/tracker-merged.js b/src/pkg/dashboard/static-src/js/tracker-merged.js
index 55a3b498bb..1c63126a3d 100644
--- a/src/pkg/dashboard/static-src/js/tracker-merged.js
+++ b/src/pkg/dashboard/static-src/js/tracker-merged.js
@@ -524,7 +524,7 @@
// Numbers and counts go through String(): esc() drops non-strings.
const n = esc(String(e.number || ''));
const num = e.url ? `
#${n}` : `#${n}`;
- return `
${num}${esc(e.title || e.repo)}${meta}`;
+ return `
${num}${esc(e.title || e.repo)}${esc(String(e.repo || ''))}${meta}`;
}).join('');
const head = `
Recent merges${esc(String(txt.today))} today · ${esc(String(txt.week))} this week · ${esc(String(txt.total30d))} in 30 days
`;
const body = rows ? `
${rows}
` : `
No merges recorded yet.
`;
@@ -762,14 +762,58 @@
// Stateful: redraw the popover when it is open.
function stageTrackerMergedPopDraw(txt, nowMs) {
const pop = document.getElementById('activity-monitor-merged-pop');
- if (!pop || pop.hidden) return;
+ const sheet = stageTrackerPopSheet('merged');
+ if (!pop || (pop.hidden && !sheet)) return;
const html = stageTrackerMergedPopHtml(txt || stageTrackerMergedText(_stageTrackerMerged, nowMs || Date.now(), 0), nowMs || Date.now());
+ if (sheet) { stageTrackerPopSheetDraw(sheet, html); return; }
if (pop.innerHTML !== html) pop.innerHTML = html;
}
+ // Phones get the Merged and queue lists as a .hive-dialog.modal-sheet
+ // (hiveWireDialog: Esc, ✕, backdrop) instead of the anchored popover;
+ // the same tier as the CSS .modal-sheet rules.
+ const STAGE_TRACKER_POP_SHEET_QUERY = '(max-width: 640px), ((pointer: coarse) and (max-width: 820px))';
+ function stageTrackerPopSheetPhone() {
+ return typeof window !== 'undefined' && typeof window.matchMedia === 'function' && !!window.matchMedia(STAGE_TRACKER_POP_SHEET_QUERY).matches;
+ }
+ function stageTrackerPopSheet(kind) {
+ return document.querySelector('.hive-dialog-overlay[data-ham-pop-sheet="' + kind + '"]');
+ }
+ function stageTrackerPopSheetDraw(overlay, html) {
+ const body = overlay.querySelector('.ham-pop-sheet-body');
+ if (body && body.innerHTML !== html) body.innerHTML = html;
+ }
+ function stageTrackerPopSheetOpen(kind, title, html, chip) {
+ const overlay = document.createElement('div');
+ overlay.className = 'hive-dialog-overlay';
+ overlay.setAttribute('data-ham-pop-sheet', kind);
+ hiveRememberModalOpen(overlay);
+ const id = 'ham-pop-sheet-' + kind;
+ overlay.innerHTML = '
' +
+ '
' + esc(title) + '
' +
+ '
';
+ document.body.appendChild(overlay);
+ stageTrackerPopSheetDraw(overlay, html);
+ hiveWireDialog(overlay, () => {
+ if (!chip) return;
+ chip.setAttribute('aria-expanded', 'false');
+ if (chip.focus) chip.focus();
+ }, undefined, null, null, close => close());
+ return overlay;
+ }
function hamMergedToggle(open) {
const pop = document.getElementById('activity-monitor-merged-pop');
const chip = stageTrackerMergedChip();
if (!pop) return false;
+ if (stageTrackerPopSheetPhone()) {
+ const sheet = stageTrackerPopSheet('merged');
+ const want = typeof open === 'boolean' ? open : !sheet;
+ pop.hidden = true;
+ if (want && !sheet) {
+ if (chip) chip.setAttribute('aria-expanded', 'true');
+ stageTrackerPopSheetOpen('merged', 'Recent merges', stageTrackerMergedPopHtml(stageTrackerMergedText(_stageTrackerMerged, Date.now(), 0), Date.now()), chip);
+ } else if (!want && sheet && sheet.hiveDialogClose) sheet.hiveDialogClose();
+ return want;
+ }
const want = typeof open === 'boolean' ? open : !!pop.hidden;
pop.hidden = !want;
if (chip) chip.setAttribute('aria-expanded', want ? 'true' : 'false');
diff --git a/src/pkg/dashboard/static-src/js/tracker-queue.js b/src/pkg/dashboard/static-src/js/tracker-queue.js
index c184d667a0..4e53371654 100644
--- a/src/pkg/dashboard/static-src/js/tracker-queue.js
+++ b/src/pkg/dashboard/static-src/js/tracker-queue.js
@@ -125,14 +125,26 @@
}
function stageTrackerQueuePopDraw(nowMs) {
const pop = document.getElementById('activity-monitor-queue-pop');
- if (!pop || pop.hidden) return;
+ const sheet = stageTrackerPopSheet('queue');
+ if (!pop || (pop.hidden && !sheet)) return;
const html = stageTrackerQueuePopHtml(_stageTrackerQueueItems, nowMs || Date.now(), _stageTrackerPreparationQueues);
+ if (sheet) { stageTrackerPopSheetDraw(sheet, html); return; }
if (pop.innerHTML !== html) pop.innerHTML = html;
}
function hamQueueToggle(open) {
const pop = document.getElementById('activity-monitor-queue-pop');
const chip = stageTrackerQueueChip();
if (!pop) return false;
+ if (stageTrackerPopSheetPhone()) {
+ const sheet = stageTrackerPopSheet('queue');
+ const want = typeof open === 'boolean' ? open : !sheet;
+ pop.hidden = true;
+ if (want && !sheet) {
+ if (chip) chip.setAttribute('aria-expanded', 'true');
+ stageTrackerPopSheetOpen('queue', 'Merge queue', stageTrackerQueuePopHtml(_stageTrackerQueueItems, Date.now(), _stageTrackerPreparationQueues), chip);
+ } else if (!want && sheet && sheet.hiveDialogClose) sheet.hiveDialogClose();
+ return want;
+ }
const want = typeof open === 'boolean' ? open : !!pop.hidden;
pop.hidden = !want;
if (chip) chip.setAttribute('aria-expanded', want ? 'true' : 'false');
diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html
index 3d5bea1c5c..f4e638c770 100644
--- a/src/pkg/dashboard/static/index.html
+++ b/src/pkg/dashboard/static/index.html
@@ -2063,6 +2063,18 @@
.ham-merged-list .ham-merged-meta { color: var(--text-faint); white-space: nowrap; font-size: var(--fs-xs); }
.ham-merged-pop .ham-empty { padding: var(--sp-2) 0; }
.ham-merged-pop-foot { margin-top: var(--sp-3); color: var(--text-faint); font-size: var(--fs-xs); }
+ .ham-merged-list .ham-merged-repo { display: none; }
+ @media (max-width: 640px), ((pointer: coarse) and (max-width: 820px)) {
+ .ham-pop-sheet .ham-merged-pop-head > span:first-child { display: none; }
+ .ham-pop-sheet .ham-merged-pop-head { margin-bottom: var(--sp-3); }
+ .ham-pop-sheet .ham-merged-list li { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "title title title" "num repo meta"; align-items: center; row-gap: var(--sp-1); min-height: var(--tap-target); padding: var(--sp-2) var(--sp-0); border-bottom: var(--line-width) solid var(--line); }
+ .ham-pop-sheet .ham-merged-list .ham-merged-title { grid-area: title; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
+ .ham-pop-sheet .ham-merged-list .ham-merged-num { grid-area: num; }
+ .ham-pop-sheet .ham-merged-list .ham-merged-meta { grid-area: meta; font-size: var(--fs-sm); }
+ .ham-pop-sheet .ham-merged-list .ham-merged-repo { grid-area: repo; display: inline-block; justify-self: start; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: var(--sp-0) var(--sp-2); border: var(--line-width) solid var(--line); border-radius: var(--r-lg); color: var(--text-faint); font-size: var(--fs-xs); }
+ .ham-pop-sheet .ham-merged-list a { display: inline-flex; align-items: center; min-height: var(--tap-target); }
+ .ham-pop-sheet .ham-merged-pop-foot { padding-bottom: var(--safe-area-bottom); }
+ }
/* Merge queue chip + popover (hivecommons/hive issue 15395): the train in merge order. */
.ham-queue-chip .ham-queue-n { margin-left: var(--sp-1); font-variant-numeric: tabular-nums; }
.ham-queue-train { margin: var(--sp-3) 0 var(--sp-2); font-weight: var(--fw-semibold); }
@@ -25788,7 +25800,7 @@
All labels
// Numbers and counts go through String(): esc() drops non-strings.
const n = esc(String(e.number || ''));
const num = e.url ? `
#${n}` : `#${n}`;
- return `
${num}${esc(e.title || e.repo)}${meta}`;
+ return `
${num}${esc(e.title || e.repo)}${esc(String(e.repo || ''))}${meta}`;
}).join('');
const head = `
Recent merges${esc(String(txt.today))} today · ${esc(String(txt.week))} this week · ${esc(String(txt.total30d))} in 30 days
`;
const body = rows ? `
${rows}
` : `
No merges recorded yet.
`;
@@ -26026,14 +26038,58 @@
All labels
// Stateful: redraw the popover when it is open.
function stageTrackerMergedPopDraw(txt, nowMs) {
const pop = document.getElementById('activity-monitor-merged-pop');
- if (!pop || pop.hidden) return;
+ const sheet = stageTrackerPopSheet('merged');
+ if (!pop || (pop.hidden && !sheet)) return;
const html = stageTrackerMergedPopHtml(txt || stageTrackerMergedText(_stageTrackerMerged, nowMs || Date.now(), 0), nowMs || Date.now());
+ if (sheet) { stageTrackerPopSheetDraw(sheet, html); return; }
if (pop.innerHTML !== html) pop.innerHTML = html;
}
+ // Phones get the Merged and queue lists as a .hive-dialog.modal-sheet
+ // (hiveWireDialog: Esc, ✕, backdrop) instead of the anchored popover;
+ // the same tier as the CSS .modal-sheet rules.
+ const STAGE_TRACKER_POP_SHEET_QUERY = '(max-width: 640px), ((pointer: coarse) and (max-width: 820px))';
+ function stageTrackerPopSheetPhone() {
+ return typeof window !== 'undefined' && typeof window.matchMedia === 'function' && !!window.matchMedia(STAGE_TRACKER_POP_SHEET_QUERY).matches;
+ }
+ function stageTrackerPopSheet(kind) {
+ return document.querySelector('.hive-dialog-overlay[data-ham-pop-sheet="' + kind + '"]');
+ }
+ function stageTrackerPopSheetDraw(overlay, html) {
+ const body = overlay.querySelector('.ham-pop-sheet-body');
+ if (body && body.innerHTML !== html) body.innerHTML = html;
+ }
+ function stageTrackerPopSheetOpen(kind, title, html, chip) {
+ const overlay = document.createElement('div');
+ overlay.className = 'hive-dialog-overlay';
+ overlay.setAttribute('data-ham-pop-sheet', kind);
+ hiveRememberModalOpen(overlay);
+ const id = 'ham-pop-sheet-' + kind;
+ overlay.innerHTML = '
' +
+ '
' + esc(title) + '
' +
+ '
';
+ document.body.appendChild(overlay);
+ stageTrackerPopSheetDraw(overlay, html);
+ hiveWireDialog(overlay, () => {
+ if (!chip) return;
+ chip.setAttribute('aria-expanded', 'false');
+ if (chip.focus) chip.focus();
+ }, undefined, null, null, close => close());
+ return overlay;
+ }
function hamMergedToggle(open) {
const pop = document.getElementById('activity-monitor-merged-pop');
const chip = stageTrackerMergedChip();
if (!pop) return false;
+ if (stageTrackerPopSheetPhone()) {
+ const sheet = stageTrackerPopSheet('merged');
+ const want = typeof open === 'boolean' ? open : !sheet;
+ pop.hidden = true;
+ if (want && !sheet) {
+ if (chip) chip.setAttribute('aria-expanded', 'true');
+ stageTrackerPopSheetOpen('merged', 'Recent merges', stageTrackerMergedPopHtml(stageTrackerMergedText(_stageTrackerMerged, Date.now(), 0), Date.now()), chip);
+ } else if (!want && sheet && sheet.hiveDialogClose) sheet.hiveDialogClose();
+ return want;
+ }
const want = typeof open === 'boolean' ? open : !!pop.hidden;
pop.hidden = !want;
if (chip) chip.setAttribute('aria-expanded', want ? 'true' : 'false');
@@ -26694,14 +26750,26 @@
All labels
}
function stageTrackerQueuePopDraw(nowMs) {
const pop = document.getElementById('activity-monitor-queue-pop');
- if (!pop || pop.hidden) return;
+ const sheet = stageTrackerPopSheet('queue');
+ if (!pop || (pop.hidden && !sheet)) return;
const html = stageTrackerQueuePopHtml(_stageTrackerQueueItems, nowMs || Date.now(), _stageTrackerPreparationQueues);
+ if (sheet) { stageTrackerPopSheetDraw(sheet, html); return; }
if (pop.innerHTML !== html) pop.innerHTML = html;
}
function hamQueueToggle(open) {
const pop = document.getElementById('activity-monitor-queue-pop');
const chip = stageTrackerQueueChip();
if (!pop) return false;
+ if (stageTrackerPopSheetPhone()) {
+ const sheet = stageTrackerPopSheet('queue');
+ const want = typeof open === 'boolean' ? open : !sheet;
+ pop.hidden = true;
+ if (want && !sheet) {
+ if (chip) chip.setAttribute('aria-expanded', 'true');
+ stageTrackerPopSheetOpen('queue', 'Merge queue', stageTrackerQueuePopHtml(_stageTrackerQueueItems, Date.now(), _stageTrackerPreparationQueues), chip);
+ } else if (!want && sheet && sheet.hiveDialogClose) sheet.hiveDialogClose();
+ return want;
+ }
const want = typeof open === 'boolean' ? open : !!pop.hidden;
pop.hidden = !want;
if (chip) chip.setAttribute('aria-expanded', want ? 'true' : 'false');
From 7aa1fa905edea3d4b40fe2b7e9c847e4aa997464 Mon Sep 17 00:00:00 2001
From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Date: Sat, 7 Nov 2026 21:51:33 -0500
Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=90=9B=20test(dashboard):=20celebrate?=
=?UTF-8?q?=20node=20bundle=20carries=20the=20pop-sheet=20helpers?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
stageTrackerMergedPopDraw now consults stageTrackerPopSheet, so every node
test built on stageTrackerCelebrateJS threw ReferenceError before reaching
its assertions.
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
---
src/pkg/dashboard/stage_tracker_cues_test.go | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/pkg/dashboard/stage_tracker_cues_test.go b/src/pkg/dashboard/stage_tracker_cues_test.go
index b0fd6c99b2..bc5b0931fd 100644
--- a/src/pkg/dashboard/stage_tracker_cues_test.go
+++ b/src/pkg/dashboard/stage_tracker_cues_test.go
@@ -351,6 +351,11 @@ func stageTrackerCelebrateJS(t *testing.T, html string) string {
jsFunc(t, html, "stageTrackerMergedLastSave"),
jsFunc(t, html, "stageTrackerMergedInFlight"),
jsFunc(t, html, "stageTrackerMergedCountDraw"),
+ jsConstLine(t, html, "STAGE_TRACKER_POP_SHEET_QUERY"),
+ jsFunc(t, html, "stageTrackerPopSheetPhone"),
+ jsFunc(t, html, "stageTrackerPopSheet"),
+ jsFunc(t, html, "stageTrackerPopSheetDraw"),
+ jsFunc(t, html, "stageTrackerPopSheetOpen"),
jsFunc(t, html, "stageTrackerMergedPopDraw"),
jsFunc(t, html, "hamMergedToggle"),
jsFunc(t, html, "stageTrackerCelebrateTick"),
From 2f8f880f305a18d26a6d4f99442b4936468889f3 Mon Sep 17 00:00:00 2001
From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Date: Sat, 7 Nov 2026 22:23:10 -0500
Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=90=9B=20dashboard:=20pop-sheet=20loo?=
=?UTF-8?q?kup=20tolerates=20DOM=20stubs=20without=20querySelector?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
stageTrackerPopSheet called document.querySelector unconditionally, which
broke the Go-driven node harness (stage_tracker_cues_test.go) whose document
stub has no querySelector, failing TestStageTrackerOdometerNode and the
merged-chip tests. Also rebased onto v5 to pick up the phone-chrome probe
fix (#17189) for mobile-shots.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
---
src/pkg/dashboard/static-src/js/tracker-merged.js | 2 ++
src/pkg/dashboard/static/index.html | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/pkg/dashboard/static-src/js/tracker-merged.js b/src/pkg/dashboard/static-src/js/tracker-merged.js
index 1c63126a3d..45894bf5b9 100644
--- a/src/pkg/dashboard/static-src/js/tracker-merged.js
+++ b/src/pkg/dashboard/static-src/js/tracker-merged.js
@@ -776,6 +776,8 @@
return typeof window !== 'undefined' && typeof window.matchMedia === 'function' && !!window.matchMedia(STAGE_TRACKER_POP_SHEET_QUERY).matches;
}
function stageTrackerPopSheet(kind) {
+ // Node test harnesses stub document without querySelector.
+ if (typeof document === 'undefined' || typeof document.querySelector !== 'function') return null;
return document.querySelector('.hive-dialog-overlay[data-ham-pop-sheet="' + kind + '"]');
}
function stageTrackerPopSheetDraw(overlay, html) {
diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html
index f4e638c770..62d3703236 100644
--- a/src/pkg/dashboard/static/index.html
+++ b/src/pkg/dashboard/static/index.html
@@ -26052,6 +26052,8 @@
All labels
return typeof window !== 'undefined' && typeof window.matchMedia === 'function' && !!window.matchMedia(STAGE_TRACKER_POP_SHEET_QUERY).matches;
}
function stageTrackerPopSheet(kind) {
+ // Node test harnesses stub document without querySelector.
+ if (typeof document === 'undefined' || typeof document.querySelector !== 'function') return null;
return document.querySelector('.hive-dialog-overlay[data-ham-pop-sheet="' + kind + '"]');
}
function stageTrackerPopSheetDraw(overlay, html) {
From 75f53a8d3d3aa5199bc2488e13ea9ca6d82d03c2 Mon Sep 17 00:00:00 2001
From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Date: Sat, 7 Nov 2026 22:26:19 -0500
Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=90=9B=20dashboard:=20pop-sheet=20dra?=
=?UTF-8?q?w=20ticks=20consult=20state,=20not=20the=20DOM?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
stageTrackerMergedPopDraw/stageTrackerQueuePopDraw ran a document-wide
querySelector on every draw tick, even with the popover hidden on desktop,
and the Node harness (stage_tracker_cues_test.go) stubs document without
querySelector, failing TestStageTrackerCelebrateNode, OdometerAfterBeeNode,
FlightTargetNode and MergeSessionNode. Open sheets are now registered in
_stageTrackerPopSheets by stageTrackerPopSheetOpen and dropped by the
hiveWireDialog resolve callback; stageTrackerPopSheet reads that map, and
both draw functions early-return when the popover is hidden and no sheet
is open. The querySelector tolerance shim is no longer needed.
#17177 (stageTrackerOpenSheet) is closed unmerged, so there is nothing to
rebase onto.
Hive-Fix-Attempt: 1/6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
---
src/pkg/dashboard/stage_tracker_cues_test.go | 1 +
.../dashboard/static-src/js/tracker-merged.js | 13 +++++++++----
src/pkg/dashboard/static-src/js/tracker-queue.js | 3 ++-
src/pkg/dashboard/static/index.html | 16 +++++++++++-----
4 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/src/pkg/dashboard/stage_tracker_cues_test.go b/src/pkg/dashboard/stage_tracker_cues_test.go
index bc5b0931fd..05d73d0309 100644
--- a/src/pkg/dashboard/stage_tracker_cues_test.go
+++ b/src/pkg/dashboard/stage_tracker_cues_test.go
@@ -352,6 +352,7 @@ func stageTrackerCelebrateJS(t *testing.T, html string) string {
jsFunc(t, html, "stageTrackerMergedInFlight"),
jsFunc(t, html, "stageTrackerMergedCountDraw"),
jsConstLine(t, html, "STAGE_TRACKER_POP_SHEET_QUERY"),
+ jsConstLine(t, html, "_stageTrackerPopSheets"),
jsFunc(t, html, "stageTrackerPopSheetPhone"),
jsFunc(t, html, "stageTrackerPopSheet"),
jsFunc(t, html, "stageTrackerPopSheetDraw"),
diff --git a/src/pkg/dashboard/static-src/js/tracker-merged.js b/src/pkg/dashboard/static-src/js/tracker-merged.js
index 45894bf5b9..21d9ef6ead 100644
--- a/src/pkg/dashboard/static-src/js/tracker-merged.js
+++ b/src/pkg/dashboard/static-src/js/tracker-merged.js
@@ -762,8 +762,9 @@
// Stateful: redraw the popover when it is open.
function stageTrackerMergedPopDraw(txt, nowMs) {
const pop = document.getElementById('activity-monitor-merged-pop');
+ if (!pop) return;
const sheet = stageTrackerPopSheet('merged');
- if (!pop || (pop.hidden && !sheet)) return;
+ if (pop.hidden && !sheet) return;
const html = stageTrackerMergedPopHtml(txt || stageTrackerMergedText(_stageTrackerMerged, nowMs || Date.now(), 0), nowMs || Date.now());
if (sheet) { stageTrackerPopSheetDraw(sheet, html); return; }
if (pop.innerHTML !== html) pop.innerHTML = html;
@@ -772,13 +773,15 @@
// (hiveWireDialog: Esc, ✕, backdrop) instead of the anchored popover;
// the same tier as the CSS .modal-sheet rules.
const STAGE_TRACKER_POP_SHEET_QUERY = '(max-width: 640px), ((pointer: coarse) and (max-width: 820px))';
+ // Open sheets by kind. Draw ticks consult this map, not the DOM: no
+ // document-wide query per tick, and Node harnesses whose document
+ // stub lacks querySelector keep working.
+ const _stageTrackerPopSheets = {};
function stageTrackerPopSheetPhone() {
return typeof window !== 'undefined' && typeof window.matchMedia === 'function' && !!window.matchMedia(STAGE_TRACKER_POP_SHEET_QUERY).matches;
}
function stageTrackerPopSheet(kind) {
- // Node test harnesses stub document without querySelector.
- if (typeof document === 'undefined' || typeof document.querySelector !== 'function') return null;
- return document.querySelector('.hive-dialog-overlay[data-ham-pop-sheet="' + kind + '"]');
+ return _stageTrackerPopSheets[kind] || null;
}
function stageTrackerPopSheetDraw(overlay, html) {
const body = overlay.querySelector('.ham-pop-sheet-body');
@@ -794,8 +797,10 @@
'
' + esc(title) + '
' +
'
';
document.body.appendChild(overlay);
+ _stageTrackerPopSheets[kind] = overlay;
stageTrackerPopSheetDraw(overlay, html);
hiveWireDialog(overlay, () => {
+ if (_stageTrackerPopSheets[kind] === overlay) delete _stageTrackerPopSheets[kind];
if (!chip) return;
chip.setAttribute('aria-expanded', 'false');
if (chip.focus) chip.focus();
diff --git a/src/pkg/dashboard/static-src/js/tracker-queue.js b/src/pkg/dashboard/static-src/js/tracker-queue.js
index 4e53371654..8f3544437c 100644
--- a/src/pkg/dashboard/static-src/js/tracker-queue.js
+++ b/src/pkg/dashboard/static-src/js/tracker-queue.js
@@ -125,8 +125,9 @@
}
function stageTrackerQueuePopDraw(nowMs) {
const pop = document.getElementById('activity-monitor-queue-pop');
+ if (!pop) return;
const sheet = stageTrackerPopSheet('queue');
- if (!pop || (pop.hidden && !sheet)) return;
+ if (pop.hidden && !sheet) return;
const html = stageTrackerQueuePopHtml(_stageTrackerQueueItems, nowMs || Date.now(), _stageTrackerPreparationQueues);
if (sheet) { stageTrackerPopSheetDraw(sheet, html); return; }
if (pop.innerHTML !== html) pop.innerHTML = html;
diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html
index 62d3703236..895fbb2af7 100644
--- a/src/pkg/dashboard/static/index.html
+++ b/src/pkg/dashboard/static/index.html
@@ -26038,8 +26038,9 @@