From dfa8fa9f3bd922f6ebad410bb2c84f748383f87e Mon Sep 17 00:00:00 2001
From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Date: Sat, 7 Nov 2026 23:07:07 -0500
Subject: [PATCH 1/7] =?UTF-8?q?=E2=9C=A8=20dashboard:=20attention-first=20?=
=?UTF-8?q?Activity=20monitor=20ordering=20and=20count=20line=20on=20phone?=
=?UTF-8?q?s?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Phones sort attention rows ahead of the stage column and show a sticky
count line that toggles the existing Waiting on you filter. Desktop
ordering and the toolbar are unchanged.
Closes #17162
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
---
...-activity-monitor-phone-attention-first.md | 1 +
src/docs/dashboard.md | 2 +
...tage_tracker_phone_attention_first_test.go | 101 ++++++++++++++++++
src/pkg/dashboard/static-src/css/tracker.css | 13 +++
.../dashboard/static-src/html/tracker.html | 1 +
.../static-src/js/tracker-filter-render.js | 10 +-
.../dashboard/static-src/js/tracker-filter.js | 15 ++-
.../static-src/js/tracker-words-stage.js | 2 +-
src/pkg/dashboard/static/index.html | 41 ++++++-
src/pkg/webassets/trackerview/tracker-view.js | 3 +-
10 files changed, 182 insertions(+), 7 deletions(-)
create mode 100644 changelog.d/added-activity-monitor-phone-attention-first.md
create mode 100644 src/pkg/dashboard/stage_tracker_phone_attention_first_test.go
diff --git a/changelog.d/added-activity-monitor-phone-attention-first.md b/changelog.d/added-activity-monitor-phone-attention-first.md
new file mode 100644
index 0000000000..cca50e20bf
--- /dev/null
+++ b/changelog.d/added-activity-monitor-phone-attention-first.md
@@ -0,0 +1 @@
+- The Activity monitor lists rows that need you first on phones, with a sticky "waiting on you" count line that toggles the Waiting on you filter.
diff --git a/src/docs/dashboard.md b/src/docs/dashboard.md
index 6cc58c1362..d55358eac5 100644
--- a/src/docs/dashboard.md
+++ b/src/docs/dashboard.md
@@ -612,6 +612,8 @@ The **Review** section opens with a separately collapsible **Pipeline** tile tha
The **Hive activity monitor** section (sidebar, Dashboard group; expanded by default) is the "where is my pizza" view of the hive: one entry per open issue and PR from `GET /api/stage-tracker`, each a title line over a thin tracker strip. Issues and PRs share one set of columns — `Open → Actionable → Claimed → PR in progress → CI / Review → Merge gate → ✓` — with the step names printed once in a column header. Covering PRs nest under their issue: an issue with no PR yet draws the whole strip like any other row (its lit step is Open/Actionable/Claimed with the steps ahead faint); once exactly one PR covers it the issue and PR collapse into a single entry: the issue's `#N title` on the left, `[author icon] #PR title` in the *PR in progress* column of the same title line, and one continuous strip beneath — Open/Actionable/Claimed passed, then the PR's stage drives the lit chevron through `CI / Review → Merge gate → ✓` (chips, tooltip and `since` come from the PR). With two or more covering PRs the issue's own strip stops at Claimed — all passed, nothing lit — and directly beneath, one indented sub-row per open covering PR (furthest along first) carries `[author icon] #N title` at the *PR in progress* column and that PR's own strip from there on with its own lit chevron, modifier chip, tooltip and `since`. A PR linked to an open issue in the list has no top-level row of its own (`nested_under`); PRs with no linked issue keep a full-width row. The *Pull requests* filter flattens the list (every PR a top-level row); *Issues* and *All* show the nested view. Only the current step is coloured (amber, named in words; the ✓ chevron turns green once merged). Whether it moves depends on its *motion bucket* (`stageTrackerMotion()` in `index.html`): **static** — a steady fill — for Open, Open · on hold (any hold label, whatever else is on the item), Actionable (010), Claimed (020), a PR in progress / Covered by PR (030/040) by a human author, Merged, and any stage the dashboard does not recognise; **active** — a gentle pulse — when the hive is acting (030/040 with a hive or clanker author, 050 review pending, 060 reviewed, 070 fixing, 074 adopted by hive, 080 merge gate, 095 pre-merge soak, 100 merge queue); **needs-human** — a slower amber→red breathe — when a person must move (015 triage needed, 045/085 needs decision, 071 needs author, 072 returned to contributor, 090 ready for a human merge, or any `stalled` / `blocked` / `needs-human` / `needs-decision` / `needs-triage` modifier). Under `prefers-reduced-motion` nothing animates and a needs-human step keeps a steady red tint instead; passed and upcoming steps are low-contrast shapes with a small grey glyph each. Side stages ride the step they branch from — 070/071/072/074 light *CI / Review* as "Fixing" / "Needs author" / "Returned to contributor" / "Adopted by hive", 085/090 light *Merge gate* as "Needs human decision" / "Ready for human merge". The lit chevron ends with a small icon of whose move it is, in the chevron's ink (person = human, robot = clanker, hexagon = hive): the claimant on *Claimed*, the PR author on *PR in progress* and *Returned to contributor*, hive on *CI / Review* / *Adopted by hive* / *Queued for merge*, a human on *Triage needed* / *Needs human decision* / *Ready for human merge*; *Open* and *Actionable* carry none; 015 (an actionable issue no maintainer has triaged yet) and 045 light *Actionable* as "Triage needed" / "Needs human decision"; 040 shares *PR in progress* with 030, 060/080/100 light *Merge gate* as "Queued for merge" (the chevron tooltip distinguishes "not yet admitted — reason" from "admitted, merging") (the chevron tooltip names the exact stage). Every PR stage has a word: 050/060 "CI / Review", 070 "Fixing" (the author's move — a `needs-rebase` chip beside it says *what* is being fixed; the stage labeller always puts a needs-rebase PR at 070/071/072, never 050/060), 071 "Needs author" (a human-authored PR the author must act on), 072 "Returned to contributor" (a clanker PR handed back to its hive), 074 "Adopted by hive", 080/100 "Queued for merge", 085 "Needs human decision", 090 "Ready for human merge". A PR with no linked issue is named exactly once: its title line reads `[kind icon] [author icon] #N title` on the left (no entry in the *PR in progress* column) over one continuous strip with Open/Actionable/Claimed passed and its own stage lit; the `[author icon] #N title` entry under the *PR in progress* header appears only for covering PRs (single-PR entries and nested sub-rows). The author icon is coloured by `author/*` kind (hive blue, clanker purple, human teal). A PR is never an issue in this list: when the same number arrives through both the issues feed and the pulls feed, the PR record wins and the issue-feed copy is dropped server-side (pairing is keyed by repo, kind and number, so a PR can never be its own parent), and the *Issues* filter never shows one. A `since` column on the title line gives time on the current step (red when stalled), with at most one muted health-modifier chip to its left; the reason sentence, actor, nudges, flags and the last stage hops live in the hover tooltip. Titles never wrap: an issue title is cut with an ellipsis before it would reach the *PR in progress* column (leaving a clear gap, so the PR entry always starts at the column's left edge) and a PR title before the chips and `since`; the full title is on the title element's own hover tooltip, separate from the strip's reason tooltip. Rows are sorted furthest-along first by default (a covered issue ranks by its furthest-along PR, not its own 040), then longest-waiting first; the *Sort* select also offers longest waiting, newest and number, with an arrow button that reverses the direction. The list is complete: every open issue and PR of the watched repos is an entry — including claimed, in-progress, needs-human / needs-decision / needs-triage-filtered and reporter-held issues, draft PRs and PRs carrying an exempt label — and an item with no stage yet sits at *Open*. The toolbar filters the cached payload in the browser: *All / Pull requests / Issues*, *Repo*, a search box (`#number`, number or title substring, also matching a covering PR), *Since* (any / over 1 hour / over 1 day / over 1 week on the current step, or *past the stage dwell* = stalled or longer than the step's configured dwell), *Author* (human / clanker / hive) and a *Needs attention* toggle; a row of label chips built from the labels present (`stage/*`, `needs-*`, `author/*`, `role/*`, then any other label shared by two or more items) narrows further — chips of one family OR together, families AND together. *Clear filters* appears whenever something is narrowed. Filter, sort and page size persist in the browser (`localStorage`); the page does not. Pages hold 25 / 50 / 100 rows (default 50) with Prev / Next above and below the list and a "showing X–Y of N (M filtered out)" line; the section header reads "N items (I issues / P PRs) · M need attention" for the whole list (N, I, P come from `open_issues` / `open_prs` in the payload — the same `openItems` set behind the Overview tile, so N equals the tile's total open issues + PRs — with "· X match filters" appended while a filter is on) while the sidebar badge shows the same N (total open items, same render pass — never a separately computed number) with the needs-attention count (modifiers present, or on 071/072/085/090, counted over every item) in its hover tooltip and as the warn-coloured header suffix. The meta line also says "updated Ns ago · cache|fresh": the payload is built server-side at most once per `dashboard.stage_tracker.cache_ttl_s` (default = `governor.eval_interval_s`) from the spoke's existing GitHub snapshot and served with an `ETag`, so the 30-second poll costs a 304 and never a GitHub call (it turns amber once the payload is older than two TTLs). A GitHub webhook naming a listed PR or issue re-reads just that item (one `GET`, debounced by `dashboard.stage_tracker.webhook_refresh_debounce_ms`, default `2000`; off with `dashboard.stage_tracker.webhook_refresh: false`) and patches its row within seconds, ahead of the next eval cycle; see [Webhook-driven PR cache invalidation](operator-reference.md#webhook-driven-pr-cache-invalidation) and, for how that patch relates to the cadence tick and the reconcile that overwrites it (and what `/api/status.webhooks.mode` means when it reads `polling`), [webhooks.md](webhooks.md). Section details: [dashboard-sections.md](dashboard-sections.md#hive-activity-monitor); stage semantics: [labels-and-control-signals.md](labels-and-control-signals/stage-labels.md#stage-labels-stagennn--the-pipeline-state-machine).
+**Phones.** At phone widths (`max-width: 640px`, or a coarse pointer up to 820px) rows are ordered attention-first: every row that needs a person sits above the rest, ahead of the stage column, and a sticky line above the list ("⚠ N waiting on you · M need attention") toggles the Waiting on you filter. The `attentionFirst` preference is stored with the other tracker filter fields and defaults on; desktop ordering and the toolbar are unchanged.
+
**Sounds (opt-in).** The speaker chip at the right end of the toolbar (🔇 off / 🔊 on; default off, remembered per browser under the `localStorage` key `hive.tracker.sound`) enables two short sounds, both synthesised in the browser with the Web Audio API (no audio file, no network request). The **merge zap** — just under half a second of bug-zapper arc: a ~4 ms high-voltage "snap", then a sputtering electric sizzle (bright noise and a 240 Hz square chopped by a 120 Hz mains pulse train, dropping out and re-striking at random) that holds ~80 ms and dies away, high-passed at 700 Hz — plays when a pull request the tab was already showing merges while the page is open. The trigger compares tracker payloads: a PR counts as merged when its stage reaches the ✓ cap or when its key appears in the payload's `recently_merged` list (the hive's `pr_merged` audit entries of the last 30 minutes — sweep, queue, relay and human merges the PR poller observed alike — which is how a PR that simply dropped out of the open list is told apart from one closed unmerged). Entries that name the repo by its configured short name are qualified to the `owner/name` the rows carry, and a PR that drops off the list a poll before its audit entry lands is still remembered as open until `recently_merged` settles it, so the two never have to arrive in the same payload. It never fires on the first load, for rows that were already merged, for issues, or for a PR it has already zapped; several merges in one refresh play at most two zaps. The **new-item buzz** — a quieter 0.18 s sawtooth near 120 Hz with a ~30 Hz tremolo through a lowpass — plays when an issue or pull request appears on the list that the previous payload did not have; it never fires on the first populated payload, buzzes once per item, and plays at most two buzzes per refresh. Nothing plays while the tab is hidden. Turning the chip on plays one zap then one buzz so you can hear both. The audio context is created on a user gesture and resumed if the browser suspended it; if the autoplay policy still holds it suspended when a sound is due, that sound is skipped and the next click or key press re-arms it. Detection runs over the union of every configured repo's rows, keyed `owner/name/kind#number`, so the sounds fire for each repo the hive governs. Either sound can be replaced from the card's ⚙ settings modal with a user-supplied file (WAV or anything `decodeAudioData` accepts, capped at 4 MB) stored in the browser's IndexedDB (`hive-tracker-sounds`); a stored file that fails to decode falls back to the built-in voice. The modal also carries the **Play sounds** master toggle and a 0–100 **Volume** slider (`localStorage` key `hive.tracker.sound.volume`) that scales the master gain of both built-in and uploaded sounds. Closed issues are not an event the tracker payload carries, so nothing plays for them.
The endpoint returns `stages` (the stage table with `short`, `branch_from`, configured dwell and `falls_to` — the lower same-kind stages a move to which is a regression per the stage engine, so the event line says "fell back to" only for those; 015 → 010 triage accepted, 085 → 080 decision made and 072 → 070 author resuming read "moved to"), `items` (one per open issue/PR represented by the status snapshot, including actionable and held items plus display-only non-actionable issues, drafts, and exempt PRs: `labels`, `created_at`, `updated_at`, `bucket`, `bucket_reason`, stage, `stage_since`, humanised `reason`/`caption`, `actor`, `modifiers`, `author_kind` + `author_kind_source` (`label`, `inferred`, or `registry` — the author has a contributor-hub profile on this hive, so their clanker pushed it; the row icon, tooltip and claimant all read this one value), `lane`, `tier`, `linked_pr`, `linked_prs` (number, title, url, author, author kind, stage, `stage_since`, `caption` and `modifiers` of each open covering PR — enough to draw the nested sub-row without a second lookup), `nested_under` (on a PR: the issue it is listed under), nudge info and the last eight `history` hops from the stage store) and `author_kind_labels`. It answers `{"status":"initializing"}` until the first scan.
diff --git a/src/pkg/dashboard/stage_tracker_phone_attention_first_test.go b/src/pkg/dashboard/stage_tracker_phone_attention_first_test.go
new file mode 100644
index 0000000000..5f3676f67d
--- /dev/null
+++ b/src/pkg/dashboard/stage_tracker_phone_attention_first_test.go
@@ -0,0 +1,101 @@
+package dashboard
+
+import (
+ "os/exec"
+ "strings"
+ "testing"
+)
+
+// TestStageTrackerPhoneAttentionFirstJS drives the phone ordering and the
+// count line under node: with opts.phone the attention tier leads the whole
+// list (ahead of the stage column), without it the order is the desktop one,
+// and the stored preference defaults on and survives normalisation.
+func TestStageTrackerPhoneAttentionFirstJS(t *testing.T) {
+ node, err := exec.LookPath("node")
+ if err != nil {
+ t.Skip("node not on PATH — phone attention-first order was NOT executed by this run")
+ }
+ html := indexHTML(t)
+ script := strings.Join([]string{
+ "const window = {};",
+ jsConstLine(t, html, "STAGE_TRACKER_PAGE_SIZES"),
+ jsConstLine(t, html, "STAGE_TRACKER_DEFAULT_PAGE_SIZE"),
+ jsConstLine(t, html, "STAGE_TRACKER_AGE_MS"),
+ jsConstLine(t, html, "STAGE_TRACKER_ATTENTION_STAGES"),
+ jsConstLine(t, html, "STAGE_TRACKER_SORTS"),
+ jsConstLine(t, html, "STAGE_TRACKER_TERMINAL"),
+ jsConstLine(t, html, "STAGE_TRACKER_PATH"),
+ jsConstLine(t, html, "STAGE_TRACKER_PR_COLUMN"),
+ jsConstLine(t, html, "STAGE_TRACKER_MERGE_COLUMN"),
+ jsConstLine(t, html, "STAGE_TRACKER_NEEDS_DECISION"),
+ jsConstLine(t, html, "STAGE_TRACKER_ISSUE_NEEDS_DECISION"),
+ jsConstLine(t, html, "STAGE_TRACKER_ISSUE_DECISION_COLUMN"),
+ jsConstLine(t, html, "STAGE_TRACKER_TRIAGE_NEEDED"),
+ jsConstLine(t, html, "STAGE_TRACKER_POSSIBLY_EXISTS"),
+ jsConstLine(t, html, "STAGE_TRACKER_PRE_MERGE_SOAK"),
+ jsConstLine(t, html, "STAGE_TRACKER_HUMAN_MODS"),
+ stageTrackerTierJS(t, html),
+ jsFunc(t, html, "stageTrackerDefaultFilter"),
+ jsFunc(t, html, "stageTrackerAnchor"),
+ jsFunc(t, html, "stageTrackerLinkedDrawnHere"),
+ jsFunc(t, html, "stageTrackerLinkedSuperseder"),
+ jsFunc(t, html, "stageTrackerLinkedSupersededGone"),
+ jsFunc(t, html, "stageTrackerLinkedSupersededTip"),
+ jsFunc(t, html, "stageTrackerLinkedSorted"),
+ jsConstLine(t, html, "STAGE_TRACKER_COVERED_BY_PR"),
+ jsFunc(t, html, "stageTrackerLeadStage"),
+ jsFunc(t, html, "stageTrackerLead"),
+ jsFunc(t, html, "stageTrackerSortKey"),
+ jsFunc(t, html, "stageTrackerRegressionHandled"),
+ jsFunc(t, html, "stageTrackerNeedsAttention"),
+ jsFunc(t, html, "stageTrackerWaitSince"),
+ jsConstBlock(t, html, "STAGE_TRACKER_ICONS"),
+ stageTrackerActedJS(t, html),
+ jsFunc(t, html, "stageTrackerNormalizeFilter"),
+ jsFunc(t, html, "stageTrackerSort"),
+ jsFunc(t, html, "stageTrackerPhone"),
+ jsFunc(t, html, "stageTrackerAttentionLineHtml"),
+ }, "\n") + `
+const assert = require('assert');
+const now = Date.parse('2026-01-01T12:00:00Z');
+const H = 3600000;
+const ago = (ms) => new Date(now - ms).toISOString();
+const stages = [{ number: 50, label: 'Review pending' }, { number: 80, label: 'Merge gate' }, { number: 85, label: 'Needs decision' }, { number: 110, label: 'Merged' }];
+const row = (number, over) => Object.assign({ kind: 'pr', repo: 'a/b', number, stage: 50, modifiers: [], created_at: ago(number * H), stage_since: ago(number * H) }, over);
+const items = [
+ row(1, { stage: 80 }),
+ row(2, { stage: 80, modifiers: ['stalled'] }),
+ row(3, {}),
+ row(4, { modifiers: ['stalled'] }),
+ row(5, { modifiers: ['hold'] }),
+];
+const nums = (rows) => rows.map(it => it.number);
+const F = (over) => Object.assign(stageTrackerDefaultFilter(), over);
+
+assert.strictEqual(stageTrackerDefaultFilter().attentionFirst, true);
+assert.strictEqual(stageTrackerNormalizeFilter({ attentionFirst: false }).attentionFirst, false);
+assert.strictEqual(stageTrackerNormalizeFilter({ attentionFirst: 'x' }).attentionFirst, true);
+
+// Desktop: column first, tier within it.
+assert.deepStrictEqual(nums(stageTrackerSort(items, stages, F({}))), [2, 1, 4, 3, 5]);
+assert.deepStrictEqual(nums(stageTrackerSort(items, stages, F({}), { phone: false })), [2, 1, 4, 3, 5]);
+// Phone: every attention row precedes every other row; hold still sinks.
+assert.deepStrictEqual(nums(stageTrackerSort(items, stages, F({}), { phone: true })), [2, 4, 1, 3, 5]);
+assert.deepStrictEqual(nums(stageTrackerSort(items, stages, F({ sort: 'waiting' }), { phone: true })), [4, 2, 3, 1, 5]);
+// The preference off keeps the desktop order on a phone; newest is untouched.
+assert.deepStrictEqual(nums(stageTrackerSort(items, stages, F({ attentionFirst: false }), { phone: true })), [2, 1, 4, 3, 5]);
+assert.deepStrictEqual(nums(stageTrackerSort(items, stages, F({ sort: 'number' }), { phone: true })), [5, 4, 3, 2, 1]);
+
+const line = stageTrackerAttentionLineHtml(5, 2, false);
+assert.ok(line.includes('5 waiting on you · 2 need attention'), line);
+assert.ok(line.includes('data-action="hamFilter"') && line.includes('data-arg0="waitingOnYou"') && line.includes('data-arg1="toggle"'), line);
+assert.ok(line.includes('aria-pressed="false"') && stageTrackerAttentionLineHtml(5, 2, true).includes('aria-pressed="true"'));
+assert.strictEqual(stageTrackerAttentionLineHtml(0, 0, false), '');
+assert.strictEqual(stageTrackerPhone(), false, 'no matchMedia means desktop');
+console.log('ok');
+`
+ cmd := exec.Command(node, "-e", script)
+ if out, err := cmd.CombinedOutput(); err != nil || !strings.Contains(string(out), "ok") {
+ t.Fatalf("node phone attention-first fixture failed: %v\n%s", err, out)
+ }
+}
diff --git a/src/pkg/dashboard/static-src/css/tracker.css b/src/pkg/dashboard/static-src/css/tracker.css
index 6992cbddf4..3c87758dc3 100644
--- a/src/pkg/dashboard/static-src/css/tracker.css
+++ b/src/pkg/dashboard/static-src/css/tracker.css
@@ -1077,6 +1077,19 @@
.sts-sample { padding: var(--sp-3) var(--sp-2) 0; }
.sts-sample .ham-row { padding: var(--sp-2); }
.sts-sample .ham-cols { padding-top: 0; }
+
+ /* Phone count line (hivecommons/hive#17162): one tap target that toggles
+ the Waiting on you filter; absent at desktop widths. */
+ .ham-attn-wrap { display: none; }
+ @media (max-width: 640px), ((pointer: coarse) and (max-width: 820px)) {
+ .ham-attn-wrap { display: block; position: sticky; top: calc(var(--navbar-sticky-height) + var(--ham-sticky-bar-h)); z-index: calc(var(--z-sticky) + 1); background: var(--panel); }
+ .ham-attn-wrap:empty { display: none; }
+ /* The column header sticks below the count line, not under it. */
+ .ham-attn-wrap:not(:empty) ~ #activity-monitor-panel .ham-cols { top: calc(var(--navbar-sticky-height) + var(--ham-sticky-bar-h) + var(--tap-target) + 1px); }
+ .ham-attn-line { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: var(--tap-target); padding: 0 var(--sp-3); border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--status-attention); font-size: var(--fs-touch); font-weight: 600; text-align: left; }
+ .ham-attn-line[aria-pressed="true"] { background: color-mix(in srgb, var(--status-attention) 12%, transparent); }
+ }
+
/* Phone ergonomics (#17163, part of #17158): in the .modal-sheet tier
(the query responsive.css uses for full-screen dialogs) every control
in the activity monitor meets the coarse-pointer floor. --tap-target is
diff --git a/src/pkg/dashboard/static-src/html/tracker.html b/src/pkg/dashboard/static-src/html/tracker.html
index 545f19411d..a2f379011a 100644
--- a/src/pkg/dashboard/static-src/html/tracker.html
+++ b/src/pkg/dashboard/static-src/html/tracker.html
@@ -59,6 +59,7 @@
Hive activity moni
+
Loading the tracker…
diff --git a/src/pkg/dashboard/static-src/js/tracker-filter-render.js b/src/pkg/dashboard/static-src/js/tracker-filter-render.js
index b7b9459b31..b7067de2a5 100644
--- a/src/pkg/dashboard/static-src/js/tracker-filter-render.js
+++ b/src/pkg/dashboard/static-src/js/tracker-filter-render.js
@@ -1,3 +1,9 @@
+ // The phone-only count line above the list: one button that is the Waiting
+// on you chip (same hamFilter action). '' when nothing is parked on anyone.
+ function stageTrackerAttentionLineHtml(waiting, attention, on) {
+ if (!waiting && !attention) return '';
+ return ``;
+ }
function stageTrackerPagerHtml(page) {
if (page.pages <= 1) return '';
return ``;
@@ -89,7 +95,7 @@
// Repo chips ride the setting against how many repos the payload spans.
if (stageTrackerRepoChipOn(stageTrackerRepoChipSetting(), repos.length)) ctx.repoChips = { primary: stageTrackerPrimaryRepo(), active: f.repo };
const visible = stageTrackerVisible(d.items, f, ctx);
- const sorted = stageTrackerTrainContiguous(stageTrackerSort(visible, stages, f));
+ const sorted = stageTrackerTrainContiguous(stageTrackerSort(visible, stages, f, { phone: stageTrackerPhone() }));
const ordered = typeof stageTrackerPreparationOrderRows === 'function' ? stageTrackerPreparationOrderRows(d, sorted, stages) : sorted;
// A TV display (display=1&density=tv) shows the rows that fit the
// screen, ungrouped, with "+N more" in place of the pager.
@@ -129,6 +135,8 @@
setSectionSummary('activity-monitor-section', counts.header.replace(/(\d+) needs? attention/, m => `${m}`));
navCountBind(STAGE_TRACKER_COUNT_BADGE_IDS, counts.badge, counts.badgeTitle, !!data || countRefresh);
stageTrackerRenderWaiting(d, nowMs, !!data || countRefresh);
+ const attnLine = document.getElementById('activity-monitor-attn-line');
+ if (attnLine) setIfChanged(attnLine, stageTrackerAttentionLineHtml(d.items.filter(it => it && it.waiting_on_you && !it.nested_under).length, attentionAll, f.waitingOnYou));
const labelsEl = document.getElementById('activity-monitor-labels');
if (labelsEl) setIfChanged(labelsEl, stageTrackerLabelsHtml(stageTrackerLabelFacets(d.items, f)));
stageTrackerRenderLabelDialog();
diff --git a/src/pkg/dashboard/static-src/js/tracker-filter.js b/src/pkg/dashboard/static-src/js/tracker-filter.js
index 93e90dcced..4afbbbf66f 100644
--- a/src/pkg/dashboard/static-src/js/tracker-filter.js
+++ b/src/pkg/dashboard/static-src/js/tracker-filter.js
@@ -125,6 +125,12 @@
return STAGE_TRACKER_NEEDS_HUMAN_AUTHOR_STAGES.indexOf(n) >= 0 && (item.author_kind || '') === 'human';
}
+ // The phone tier of the Activity monitor (the css/responsive.css
+ // `.modal-sheet` media query).
+ function stageTrackerPhone() {
+ return !!(window.matchMedia && window.matchMedia('(max-width: 640px), ((pointer: coarse) and (max-width: 820px))').matches);
+ }
+
// Chip order: every stage/NNN-* label first by NNN, then everything
// else alphabetically, case-insensitive.
function stageTrackerLabelCompare(a, b) {
@@ -148,6 +154,7 @@
f.needsHuman = !!f.needsHuman;
f.onHold = !!f.onHold;
f.waitingOnYou = !!f.waitingOnYou;
+ f.attentionFirst = f.attentionFirst !== false;
if (!(f.age in STAGE_TRACKER_AGE_MS) && f.age !== 'stale') f.age = 'any';
if (['human', 'clanker', 'hive'].indexOf(f.author) < 0) f.author = 'any';
f.attention = !!f.attention;
@@ -279,8 +286,12 @@
// and 'waiting' rows tier attention-first within a column
// (stageTrackerAttentionTier); dir 'asc' reverses the strip / age /
// repo / number keys but never the tier.
- function stageTrackerSort(rows, stages, f) {
+ // On a phone (opts.phone) with f.attentionFirst the tier becomes the
+ // top-level group, ahead of the column, so rows parked on a person lead
+ // the list; desktop ordering never reads it.
+ function stageTrackerSort(rows, stages, f, opts) {
f = stageTrackerNormalizeFilter(f);
+ const tierFirst = !!(opts && opts.phone) && f.attentionFirst && (f.sort === 'furthest' || f.sort === 'waiting');
const byRepoNumber = (x, y) => ((x.repo || '').localeCompare(y.repo || '')) || ((x.number || 0) - (y.number || 0));
const sign = f.dir === 'asc' ? -1 : 1;
const byTier = (x, y) => stageTrackerAttentionTier(x) - stageTrackerAttentionTier(y);
@@ -294,6 +305,8 @@
cmp = (x, y) => { const a = keyOf(x), b = keyOf(y); return sign * (b.anchor - a.anchor) || byTier(x, y) || sign * ((a.since - b.since) || byRepoNumber(x, y)); };
}
}
+ const ordered = cmp;
+ if (tierFirst) cmp = (x, y) => byTier(x, y) || ordered(x, y);
return (rows || []).slice().sort(cmp);
}
diff --git a/src/pkg/dashboard/static-src/js/tracker-words-stage.js b/src/pkg/dashboard/static-src/js/tracker-words-stage.js
index 8315b8eeba..ced33df708 100644
--- a/src/pkg/dashboard/static-src/js/tracker-words-stage.js
+++ b/src/pkg/dashboard/static-src/js/tracker-words-stage.js
@@ -100,7 +100,7 @@
var _stageTrackerGroup = STAGE_TRACKER_GROUP_DEFAULT;
var _stageTrackerCollapsed = {};
function stageTrackerDefaultFilter() {
- return { kind: 'all', repo: '', q: '', labels: [], needsHuman: false, onHold: false, waitingOnYou: false, age: 'any', author: 'any', attention: false, acted: 'any', sort: 'furthest', dir: 'desc', size: STAGE_TRACKER_DEFAULT_PAGE_SIZE, page: 1 };
+ return { kind: 'all', repo: '', q: '', labels: [], needsHuman: false, onHold: false, waitingOnYou: false, attentionFirst: true, age: 'any', author: 'any', attention: false, acted: 'any', sort: 'furthest', dir: 'desc', size: STAGE_TRACKER_DEFAULT_PAGE_SIZE, page: 1 };
}
var _stageTrackerFilter = stageTrackerDefaultFilter();
// Type-to-filter text of the "all labels" dialog (not persisted).
diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html
index cd3792e025..05b1eb5004 100644
--- a/src/pkg/dashboard/static/index.html
+++ b/src/pkg/dashboard/static/index.html
@@ -2420,6 +2420,19 @@
.sts-sample { padding: var(--sp-3) var(--sp-2) 0; }
.sts-sample .ham-row { padding: var(--sp-2); }
.sts-sample .ham-cols { padding-top: 0; }
+
+ /* Phone count line (hivecommons/hive#17162): one tap target that toggles
+ the Waiting on you filter; absent at desktop widths. */
+ .ham-attn-wrap { display: none; }
+ @media (max-width: 640px), ((pointer: coarse) and (max-width: 820px)) {
+ .ham-attn-wrap { display: block; position: sticky; top: calc(var(--navbar-sticky-height) + var(--ham-sticky-bar-h)); z-index: calc(var(--z-sticky) + 1); background: var(--panel); }
+ .ham-attn-wrap:empty { display: none; }
+ /* The column header sticks below the count line, not under it. */
+ .ham-attn-wrap:not(:empty) ~ #activity-monitor-panel .ham-cols { top: calc(var(--navbar-sticky-height) + var(--ham-sticky-bar-h) + var(--tap-target) + 1px); }
+ .ham-attn-line { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: var(--tap-target); padding: 0 var(--sp-3); border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--status-attention); font-size: var(--fs-touch); font-weight: 600; text-align: left; }
+ .ham-attn-line[aria-pressed="true"] { background: color-mix(in srgb, var(--status-attention) 12%, transparent); }
+ }
+
/* Phone ergonomics (#17163, part of #17158): in the .modal-sheet tier
(the query responsive.css uses for full-screen dialogs) every control
in the activity monitor meets the coarse-pointer floor. --tap-target is
@@ -8623,6 +8636,7 @@
// and 'waiting' rows tier attention-first within a column
// (stageTrackerAttentionTier); dir 'asc' reverses the strip / age /
// repo / number keys but never the tier.
- function stageTrackerSort(rows, stages, f) {
+ // On a phone (opts.phone) with f.attentionFirst the tier becomes the
+ // top-level group, ahead of the column, so rows parked on a person lead
+ // the list; desktop ordering never reads it.
+ function stageTrackerSort(rows, stages, f, opts) {
f = stageTrackerNormalizeFilter(f);
+ const tierFirst = !!(opts && opts.phone) && f.attentionFirst && (f.sort === 'furthest' || f.sort === 'waiting');
const byRepoNumber = (x, y) => ((x.repo || '').localeCompare(y.repo || '')) || ((x.number || 0) - (y.number || 0));
const sign = f.dir === 'asc' ? -1 : 1;
const byTier = (x, y) => stageTrackerAttentionTier(x) - stageTrackerAttentionTier(y);
@@ -21329,6 +21354,8 @@
`;
}
+ // The phone-only count line above the list: one button that is the Waiting
+// on you chip (same hamFilter action). '' when nothing is parked on anyone.
+ function stageTrackerAttentionLineHtml(waiting, attention, on) {
+ if (!waiting && !attention) return '';
+ return ``;
+ }
function stageTrackerPagerHtml(page) {
if (page.pages <= 1) return '';
return ``;
@@ -22395,7 +22428,7 @@
All labels
// Repo chips ride the setting against how many repos the payload spans.
if (stageTrackerRepoChipOn(stageTrackerRepoChipSetting(), repos.length)) ctx.repoChips = { primary: stageTrackerPrimaryRepo(), active: f.repo };
const visible = stageTrackerVisible(d.items, f, ctx);
- const sorted = stageTrackerTrainContiguous(stageTrackerSort(visible, stages, f));
+ const sorted = stageTrackerTrainContiguous(stageTrackerSort(visible, stages, f, { phone: stageTrackerPhone() }));
const ordered = typeof stageTrackerPreparationOrderRows === 'function' ? stageTrackerPreparationOrderRows(d, sorted, stages) : sorted;
// A TV display (display=1&density=tv) shows the rows that fit the
// screen, ungrouped, with "+N more" in place of the pager.
@@ -22435,6 +22468,8 @@
All labels
setSectionSummary('activity-monitor-section', counts.header.replace(/(\d+) needs? attention/, m => `${m}`));
navCountBind(STAGE_TRACKER_COUNT_BADGE_IDS, counts.badge, counts.badgeTitle, !!data || countRefresh);
stageTrackerRenderWaiting(d, nowMs, !!data || countRefresh);
+ const attnLine = document.getElementById('activity-monitor-attn-line');
+ if (attnLine) setIfChanged(attnLine, stageTrackerAttentionLineHtml(d.items.filter(it => it && it.waiting_on_you && !it.nested_under).length, attentionAll, f.waitingOnYou));
const labelsEl = document.getElementById('activity-monitor-labels');
if (labelsEl) setIfChanged(labelsEl, stageTrackerLabelsHtml(stageTrackerLabelFacets(d.items, f)));
stageTrackerRenderLabelDialog();
diff --git a/src/pkg/webassets/trackerview/tracker-view.js b/src/pkg/webassets/trackerview/tracker-view.js
index c730be6941..1136f58d6c 100644
--- a/src/pkg/webassets/trackerview/tracker-view.js
+++ b/src/pkg/webassets/trackerview/tracker-view.js
@@ -10,7 +10,7 @@
// STAGE_TRACKER_AGE_MS, STAGE_TRACKER_ACTED_FILTERS, STAGE_TRACKER_SORTS,
// STAGE_TRACKER_GROUPS and STAGE_TRACKER_GROUP_DEFAULT.
function stageTrackerDefaultFilter() {
- return { kind: 'all', repo: '', q: '', labels: [], needsHuman: false, onHold: false, waitingOnYou: false, age: 'any', author: 'any', attention: false, acted: 'any', sort: 'furthest', dir: 'desc', size: STAGE_TRACKER_DEFAULT_PAGE_SIZE, page: 1 };
+ return { kind: 'all', repo: '', q: '', labels: [], needsHuman: false, onHold: false, waitingOnYou: false, attentionFirst: true, age: 'any', author: 'any', attention: false, acted: 'any', sort: 'furthest', dir: 'desc', size: STAGE_TRACKER_DEFAULT_PAGE_SIZE, page: 1 };
}
function stageTrackerNormalizeFilter(raw) {
const d = stageTrackerDefaultFilter();
@@ -22,6 +22,7 @@
f.needsHuman = !!f.needsHuman;
f.onHold = !!f.onHold;
f.waitingOnYou = !!f.waitingOnYou;
+ f.attentionFirst = f.attentionFirst !== false;
if (!(f.age in STAGE_TRACKER_AGE_MS) && f.age !== 'stale') f.age = 'any';
if (['human', 'clanker', 'hive'].indexOf(f.author) < 0) f.author = 'any';
f.attention = !!f.attention;
From 761f142655592ee39d99e991566a03675ce88276 Mon Sep 17 00:00:00 2001
From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Date: Sun, 8 Nov 2026 00:25:57 -0500
Subject: [PATCH 2/7] =?UTF-8?q?=F0=9F=90=9B=20dashboard:=20gate=20phone=20?=
=?UTF-8?q?attention-first=20order=20and=20count=20line=20at=20390=C3=9784?=
=?UTF-8?q?4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Review follow-up for #17179 (#17162):
- dashboard-mobile-shots.mjs: new tracker-phone-attention-first probe,
required at 390x844@3 like the pill probe — every attention-tier row
precedes every non-attention row (hold/draft rows still sink last) and
the sticky count line is inside the viewport at rest and while
scrolling, is the Waiting on you toggle and meets --tap-target.
- dashboard-activity-density.mjs: on the phone tier the fixture takes the
production order (stageTrackerSort with the stored filter) and draws the
count line the renderer draws; desktop keeps the fixture's own order so
the 1280 capture is unchanged. Restores the line on cleanup.
- dashboard.md: the Phones paragraph names the two sorts that are
attention-first, says attentionFirst has no toolbar control yet, and
that the count line appears only while something is waiting or needs
attention.
Hive-Fix-Attempt: 1/6
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
---
src/docs/dashboard.md | 2 +-
.../testdata/tracker-phone-attention-first.js | 72 +++++++++++++++++++
src/scripts/dashboard-mobile-shots.mjs | 8 ++-
.../fixtures/dashboard-activity-density.mjs | 17 ++++-
4 files changed, 96 insertions(+), 3 deletions(-)
create mode 100644 src/pkg/dashboard/webstatic/testdata/tracker-phone-attention-first.js
diff --git a/src/docs/dashboard.md b/src/docs/dashboard.md
index d55358eac5..cc4846caf0 100644
--- a/src/docs/dashboard.md
+++ b/src/docs/dashboard.md
@@ -612,7 +612,7 @@ The **Review** section opens with a separately collapsible **Pipeline** tile tha
The **Hive activity monitor** section (sidebar, Dashboard group; expanded by default) is the "where is my pizza" view of the hive: one entry per open issue and PR from `GET /api/stage-tracker`, each a title line over a thin tracker strip. Issues and PRs share one set of columns — `Open → Actionable → Claimed → PR in progress → CI / Review → Merge gate → ✓` — with the step names printed once in a column header. Covering PRs nest under their issue: an issue with no PR yet draws the whole strip like any other row (its lit step is Open/Actionable/Claimed with the steps ahead faint); once exactly one PR covers it the issue and PR collapse into a single entry: the issue's `#N title` on the left, `[author icon] #PR title` in the *PR in progress* column of the same title line, and one continuous strip beneath — Open/Actionable/Claimed passed, then the PR's stage drives the lit chevron through `CI / Review → Merge gate → ✓` (chips, tooltip and `since` come from the PR). With two or more covering PRs the issue's own strip stops at Claimed — all passed, nothing lit — and directly beneath, one indented sub-row per open covering PR (furthest along first) carries `[author icon] #N title` at the *PR in progress* column and that PR's own strip from there on with its own lit chevron, modifier chip, tooltip and `since`. A PR linked to an open issue in the list has no top-level row of its own (`nested_under`); PRs with no linked issue keep a full-width row. The *Pull requests* filter flattens the list (every PR a top-level row); *Issues* and *All* show the nested view. Only the current step is coloured (amber, named in words; the ✓ chevron turns green once merged). Whether it moves depends on its *motion bucket* (`stageTrackerMotion()` in `index.html`): **static** — a steady fill — for Open, Open · on hold (any hold label, whatever else is on the item), Actionable (010), Claimed (020), a PR in progress / Covered by PR (030/040) by a human author, Merged, and any stage the dashboard does not recognise; **active** — a gentle pulse — when the hive is acting (030/040 with a hive or clanker author, 050 review pending, 060 reviewed, 070 fixing, 074 adopted by hive, 080 merge gate, 095 pre-merge soak, 100 merge queue); **needs-human** — a slower amber→red breathe — when a person must move (015 triage needed, 045/085 needs decision, 071 needs author, 072 returned to contributor, 090 ready for a human merge, or any `stalled` / `blocked` / `needs-human` / `needs-decision` / `needs-triage` modifier). Under `prefers-reduced-motion` nothing animates and a needs-human step keeps a steady red tint instead; passed and upcoming steps are low-contrast shapes with a small grey glyph each. Side stages ride the step they branch from — 070/071/072/074 light *CI / Review* as "Fixing" / "Needs author" / "Returned to contributor" / "Adopted by hive", 085/090 light *Merge gate* as "Needs human decision" / "Ready for human merge". The lit chevron ends with a small icon of whose move it is, in the chevron's ink (person = human, robot = clanker, hexagon = hive): the claimant on *Claimed*, the PR author on *PR in progress* and *Returned to contributor*, hive on *CI / Review* / *Adopted by hive* / *Queued for merge*, a human on *Triage needed* / *Needs human decision* / *Ready for human merge*; *Open* and *Actionable* carry none; 015 (an actionable issue no maintainer has triaged yet) and 045 light *Actionable* as "Triage needed" / "Needs human decision"; 040 shares *PR in progress* with 030, 060/080/100 light *Merge gate* as "Queued for merge" (the chevron tooltip distinguishes "not yet admitted — reason" from "admitted, merging") (the chevron tooltip names the exact stage). Every PR stage has a word: 050/060 "CI / Review", 070 "Fixing" (the author's move — a `needs-rebase` chip beside it says *what* is being fixed; the stage labeller always puts a needs-rebase PR at 070/071/072, never 050/060), 071 "Needs author" (a human-authored PR the author must act on), 072 "Returned to contributor" (a clanker PR handed back to its hive), 074 "Adopted by hive", 080/100 "Queued for merge", 085 "Needs human decision", 090 "Ready for human merge". A PR with no linked issue is named exactly once: its title line reads `[kind icon] [author icon] #N title` on the left (no entry in the *PR in progress* column) over one continuous strip with Open/Actionable/Claimed passed and its own stage lit; the `[author icon] #N title` entry under the *PR in progress* header appears only for covering PRs (single-PR entries and nested sub-rows). The author icon is coloured by `author/*` kind (hive blue, clanker purple, human teal). A PR is never an issue in this list: when the same number arrives through both the issues feed and the pulls feed, the PR record wins and the issue-feed copy is dropped server-side (pairing is keyed by repo, kind and number, so a PR can never be its own parent), and the *Issues* filter never shows one. A `since` column on the title line gives time on the current step (red when stalled), with at most one muted health-modifier chip to its left; the reason sentence, actor, nudges, flags and the last stage hops live in the hover tooltip. Titles never wrap: an issue title is cut with an ellipsis before it would reach the *PR in progress* column (leaving a clear gap, so the PR entry always starts at the column's left edge) and a PR title before the chips and `since`; the full title is on the title element's own hover tooltip, separate from the strip's reason tooltip. Rows are sorted furthest-along first by default (a covered issue ranks by its furthest-along PR, not its own 040), then longest-waiting first; the *Sort* select also offers longest waiting, newest and number, with an arrow button that reverses the direction. The list is complete: every open issue and PR of the watched repos is an entry — including claimed, in-progress, needs-human / needs-decision / needs-triage-filtered and reporter-held issues, draft PRs and PRs carrying an exempt label — and an item with no stage yet sits at *Open*. The toolbar filters the cached payload in the browser: *All / Pull requests / Issues*, *Repo*, a search box (`#number`, number or title substring, also matching a covering PR), *Since* (any / over 1 hour / over 1 day / over 1 week on the current step, or *past the stage dwell* = stalled or longer than the step's configured dwell), *Author* (human / clanker / hive) and a *Needs attention* toggle; a row of label chips built from the labels present (`stage/*`, `needs-*`, `author/*`, `role/*`, then any other label shared by two or more items) narrows further — chips of one family OR together, families AND together. *Clear filters* appears whenever something is narrowed. Filter, sort and page size persist in the browser (`localStorage`); the page does not. Pages hold 25 / 50 / 100 rows (default 50) with Prev / Next above and below the list and a "showing X–Y of N (M filtered out)" line; the section header reads "N items (I issues / P PRs) · M need attention" for the whole list (N, I, P come from `open_issues` / `open_prs` in the payload — the same `openItems` set behind the Overview tile, so N equals the tile's total open issues + PRs — with "· X match filters" appended while a filter is on) while the sidebar badge shows the same N (total open items, same render pass — never a separately computed number) with the needs-attention count (modifiers present, or on 071/072/085/090, counted over every item) in its hover tooltip and as the warn-coloured header suffix. The meta line also says "updated Ns ago · cache|fresh": the payload is built server-side at most once per `dashboard.stage_tracker.cache_ttl_s` (default = `governor.eval_interval_s`) from the spoke's existing GitHub snapshot and served with an `ETag`, so the 30-second poll costs a 304 and never a GitHub call (it turns amber once the payload is older than two TTLs). A GitHub webhook naming a listed PR or issue re-reads just that item (one `GET`, debounced by `dashboard.stage_tracker.webhook_refresh_debounce_ms`, default `2000`; off with `dashboard.stage_tracker.webhook_refresh: false`) and patches its row within seconds, ahead of the next eval cycle; see [Webhook-driven PR cache invalidation](operator-reference.md#webhook-driven-pr-cache-invalidation) and, for how that patch relates to the cadence tick and the reconcile that overwrites it (and what `/api/status.webhooks.mode` means when it reads `polling`), [webhooks.md](webhooks.md). Section details: [dashboard-sections.md](dashboard-sections.md#hive-activity-monitor); stage semantics: [labels-and-control-signals.md](labels-and-control-signals/stage-labels.md#stage-labels-stagennn--the-pipeline-state-machine).
-**Phones.** At phone widths (`max-width: 640px`, or a coarse pointer up to 820px) rows are ordered attention-first: every row that needs a person sits above the rest, ahead of the stage column, and a sticky line above the list ("⚠ N waiting on you · M need attention") toggles the Waiting on you filter. The `attentionFirst` preference is stored with the other tracker filter fields and defaults on; desktop ordering and the toolbar are unchanged.
+**Phones.** At phone widths (`max-width: 640px`, or a coarse pointer up to 820px) the *Furthest along* and *Longest waiting* sorts order rows attention-first: every row that needs a person sits above the rest, ahead of the stage column (held and draft rows keep sinking to the bottom); *Newest* and *Number* are unchanged. A sticky line above the list ("⚠ N waiting on you · M need attention") toggles the Waiting on you filter; it is drawn only while at least one row is waiting on you or needs attention. The `attentionFirst` field is stored with the other tracker filter fields and defaults on; it has no toolbar control yet, so the ordering cannot be switched off from the page. Desktop ordering and the toolbar are unchanged. The gate is `webstatic/testdata/tracker-phone-attention-first.js`, run by `dashboard-mobile-shots.mjs` against the activity-density fixture at 390×844 (attention rows lead, count line inside the viewport at rest).
**Sounds (opt-in).** The speaker chip at the right end of the toolbar (🔇 off / 🔊 on; default off, remembered per browser under the `localStorage` key `hive.tracker.sound`) enables two short sounds, both synthesised in the browser with the Web Audio API (no audio file, no network request). The **merge zap** — just under half a second of bug-zapper arc: a ~4 ms high-voltage "snap", then a sputtering electric sizzle (bright noise and a 240 Hz square chopped by a 120 Hz mains pulse train, dropping out and re-striking at random) that holds ~80 ms and dies away, high-passed at 700 Hz — plays when a pull request the tab was already showing merges while the page is open. The trigger compares tracker payloads: a PR counts as merged when its stage reaches the ✓ cap or when its key appears in the payload's `recently_merged` list (the hive's `pr_merged` audit entries of the last 30 minutes — sweep, queue, relay and human merges the PR poller observed alike — which is how a PR that simply dropped out of the open list is told apart from one closed unmerged). Entries that name the repo by its configured short name are qualified to the `owner/name` the rows carry, and a PR that drops off the list a poll before its audit entry lands is still remembered as open until `recently_merged` settles it, so the two never have to arrive in the same payload. It never fires on the first load, for rows that were already merged, for issues, or for a PR it has already zapped; several merges in one refresh play at most two zaps. The **new-item buzz** — a quieter 0.18 s sawtooth near 120 Hz with a ~30 Hz tremolo through a lowpass — plays when an issue or pull request appears on the list that the previous payload did not have; it never fires on the first populated payload, buzzes once per item, and plays at most two buzzes per refresh. Nothing plays while the tab is hidden. Turning the chip on plays one zap then one buzz so you can hear both. The audio context is created on a user gesture and resumed if the browser suspended it; if the autoplay policy still holds it suspended when a sound is due, that sound is skipped and the next click or key press re-arms it. Detection runs over the union of every configured repo's rows, keyed `owner/name/kind#number`, so the sounds fire for each repo the hive governs. Either sound can be replaced from the card's ⚙ settings modal with a user-supplied file (WAV or anything `decodeAudioData` accepts, capped at 4 MB) stored in the browser's IndexedDB (`hive-tracker-sounds`); a stored file that fails to decode falls back to the built-in voice. The modal also carries the **Play sounds** master toggle and a 0–100 **Volume** slider (`localStorage` key `hive.tracker.sound.volume`) that scales the master gain of both built-in and uploaded sounds. Closed issues are not an event the tracker payload carries, so nothing plays for them.
diff --git a/src/pkg/dashboard/webstatic/testdata/tracker-phone-attention-first.js b/src/pkg/dashboard/webstatic/testdata/tracker-phone-attention-first.js
new file mode 100644
index 0000000000..0c9e1d2998
--- /dev/null
+++ b/src/pkg/dashboard/webstatic/testdata/tracker-phone-attention-first.js
@@ -0,0 +1,72 @@
+// Dedicated preview only: evaluate ()({ dedicatedPreview: true }).
+// Phone tier (hivecommons/hive#17162): with the activity-density fixture
+// drawn, every top-level row that needs a person (stageTrackerNeedsAttention
+// and not sunk — hold / draft rows keep sinking last, as on desktop) precedes
+// every row that does not, and the sticky "⚠ N waiting on you · M need
+// attention" line is inside the viewport at rest with the list scrolled to
+// its top, is the Waiting on you toggle (hamFilter waitingOnYou), and meets
+// the tap target. Desktop returns a skip marker. Restores the scroll position.
+(async ({ dedicatedPreview = false } = {}) => {
+ if (!dedicatedPreview) throw new Error('Use a dedicated published-preview tab, not the user’s live dashboard');
+ const tolerance = 1;
+ const failures = [];
+ const assert = (ok, message) => { if (!ok) failures.push(message); };
+ const frame = () => new Promise(requestAnimationFrame);
+ const visible = el => !!(el && el.getClientRects().length && getComputedStyle(el).display !== 'none');
+ const phone = matchMedia('(max-width: 640px), ((pointer: coarse) and (max-width: 820px))').matches;
+ if (!phone) return { viewport: innerWidth, phone: false, skipped: 'strip tier: column-first ordering, no count line', failures };
+ const panel = document.getElementById('activity-monitor-panel');
+ const section = document.getElementById('activity-monitor-section');
+ if (!panel || !section) throw new Error('#activity-monitor-panel / #activity-monitor-section missing');
+ const items = Array.isArray(_stageTrackerRows) ? _stageTrackerRows : [];
+ const byKey = new Map(items.map(it => [stageTrackerItemKey(it), it]));
+ // Top-level rows in DOM order (nested sub-rows ride their issue).
+ const rows = [...panel.querySelectorAll('.ham-row[data-ham-key]')].filter(visible)
+ .map(row => ({ key: row.dataset.hamKey, item: byKey.get(row.dataset.hamKey) })).filter(r => r.item);
+ assert(rows.length >= 2, 'fixture rows are drawn: ' + rows.length);
+ const leads = it => stageTrackerAttentionTier(it) === STAGE_TRACKER_TIER_ATTENTION;
+ const order = rows.map(r => (leads(r.item) ? 'A' : stageTrackerNeedsAttention(r.item) ? 'S' : '-'));
+ const attentionRows = order.filter(o => o === 'A').length;
+ assert(attentionRows > 0, 'fixture carries rows that need attention');
+ const lastAttention = order.lastIndexOf('A');
+ const firstOther = order.indexOf('-');
+ assert(firstOther < 0 || lastAttention < firstOther, 'every needs-attention row precedes every non-attention row: ' + order.join(''));
+ // Held / draft rows are needs-attention by modifier but nobody should act
+ // on them; they sink last, after the plain rows, as on desktop.
+ const lastPlain = order.lastIndexOf('-');
+ const firstSunk = order.indexOf('S');
+ assert(firstSunk < 0 || lastPlain < 0 || lastPlain < firstSunk, 'held / draft rows sink below the plain rows: ' + order.join(''));
+
+ // Count line: present, sticky, inside the viewport at rest.
+ const wrap = document.getElementById('activity-monitor-attn-line');
+ const line = wrap && wrap.querySelector('.ham-attn-line');
+ assert(visible(line), 'the count line is drawn above the list');
+ const scroller = document.scrollingElement || document.documentElement;
+ const savedScroll = scroller.scrollTop;
+ try {
+ section.scrollIntoView({ block: 'start', behavior: 'instant' });
+ await frame();
+ if (line) {
+ const box = line.getBoundingClientRect();
+ assert(box.top >= -tolerance && box.bottom <= innerHeight + tolerance, 'count line inside the viewport at rest: top ' + Math.round(box.top) + ' bottom ' + Math.round(box.bottom) + ' of ' + innerHeight);
+ assert(getComputedStyle(wrap).position === 'sticky', 'count line wrap is sticky');
+ const tapTarget = parseFloat(getComputedStyle(section).getPropertyValue('--tap-target')) || 44;
+ assert(box.height >= tapTarget - tolerance, 'count line is at least the tap target tall: ' + Math.round(box.height));
+ assert(line.dataset.action === 'hamFilter' && line.dataset.arg0 === 'waitingOnYou', 'count line is the Waiting on you toggle');
+ assert(/\d+ waiting on you · \d+ needs? attention/.test(line.textContent), 'count line reads "N waiting on you · M need attention": ' + line.textContent.trim());
+ const attentionAll = items.filter(stageTrackerNeedsAttention).length;
+ assert(line.textContent.indexOf('· ' + attentionAll + ' need') >= 0, 'count line counts every needs-attention item (' + attentionAll + '): ' + line.textContent.trim());
+ // Scrolled into the list the line stays on screen (sticky).
+ scroller.scrollTop += Math.min(600, scroller.scrollHeight - innerHeight);
+ await frame();
+ const stuck = line.getBoundingClientRect();
+ assert(stuck.top >= -tolerance && stuck.bottom <= innerHeight + tolerance, 'count line stays inside the viewport while scrolling the list: top ' + Math.round(stuck.top));
+ }
+ } finally {
+ scroller.scrollTop = savedScroll;
+ await frame();
+ }
+ const result = { viewport: innerWidth, phone: true, rows: rows.length, attentionRows, order: order.join(''), countLine: line ? line.textContent.trim() : null, failures };
+ if (failures.length) throw new Error(JSON.stringify(result));
+ return result;
+})
diff --git a/src/scripts/dashboard-mobile-shots.mjs b/src/scripts/dashboard-mobile-shots.mjs
index 7abff7b18f..ad37a37373 100644
--- a/src/scripts/dashboard-mobile-shots.mjs
+++ b/src/scripts/dashboard-mobile-shots.mjs
@@ -267,7 +267,7 @@ async function main() {
const activityFailures = [];
const fixtureRoot = path.join(process.cwd(), 'src/pkg/dashboard/webstatic/testdata');
const density = JSON.parse(fs.readFileSync(path.join(fixtureRoot, 'tracker-activity-density.json'), 'utf8'));
- const probes = ['tracker-header-geometry', 'tracker-decision-interaction', 'tracker-phone-chrome', 'tracker-phone-pill', 'tracker-phone-ergonomics'].map(name => ({
+ const probes = ['tracker-header-geometry', 'tracker-decision-interaction', 'tracker-phone-chrome', 'tracker-phone-pill', 'tracker-phone-ergonomics', 'tracker-phone-attention-first'].map(name => ({
name, source: fs.readFileSync(path.join(fixtureRoot, name + '.js'), 'utf8'),
}));
// Phone tier (hivecommons/hive#17160): the chevron strip is hidden behind
@@ -520,6 +520,12 @@ async function main() {
if (probe.name === 'tracker-phone-pill' && vp.name === PILL_REQUIRED_VIEWPORT && !(result.ok && result.result && result.result.phone === true && result.result.pills > 0)) {
activityFailures.push(vp.name + ' ' + theme + ' progress pill must replace the strip at 390x844');
}
+ // Likewise the attention-first order and the count line
+ // (hivecommons/hive#17162): at 390×844 the probe must have found
+ // attention rows to lead with, never pass by skipping.
+ if (probe.name === 'tracker-phone-attention-first' && vp.name === PILL_REQUIRED_VIEWPORT && !(result.ok && result.result && result.result.phone === true && result.result.attentionRows > 0)) {
+ activityFailures.push(vp.name + ' ' + theme + ' attention rows must lead the list under the count line at 390x844');
+ }
}
let native;
if (phone) native = { skipped: 'phone tier: decision trigger lives in the pill sheet', failures: [] };
diff --git a/src/scripts/fixtures/dashboard-activity-density.mjs b/src/scripts/fixtures/dashboard-activity-density.mjs
index f9a9076d7a..927d8e985a 100644
--- a/src/scripts/fixtures/dashboard-activity-density.mjs
+++ b/src/scripts/fixtures/dashboard-activity-density.mjs
@@ -4,7 +4,9 @@ export function activityDensityFixture(input) {
const panel = document.getElementById('activity-monitor-panel');
if (!panel) throw new Error('Actual Activity Monitor panel is missing');
const nowMs = Date.now(), observed = new Date(nowMs).toISOString();
+ const attnLine = document.getElementById('activity-monitor-attn-line');
const saved = { data: _stageTracker, rows: _stageTrackerRows,
+ attnLine: attnLine ? attnLine.innerHTML : null,
role: window._hiveRole, user: window._hiveUser,
preparation: [_stageTrackerPreparationShown, _stageTrackerPreparationRendered,
_stageTrackerPreparationInline, _stageTrackerPreparationNow] };
@@ -123,6 +125,7 @@ export function activityDensityFixture(input) {
stageTrackerCloseDecisionPop(false);
if (typeof hideConfigTooltip === 'function') hideConfigTooltip();
host.remove();
+ if (attnLine) attnLine.innerHTML = saved.attnLine;
_stageTracker = saved.data;
_stageTrackerRows = saved.rows;
window._hiveRole = saved.role;
@@ -150,8 +153,20 @@ export function activityDensityFixture(input) {
const ctx = { nowMs, items, events: {}, noteTuck: false, sharedPRs: {}, workers: {} };
try {
host.appendChild(stageTrackerRowNode('fixture-columns', stageTrackerHeaderHtml(stages)));
- const ordered = stageTrackerPreparationOrderRows(_stageTracker, items, stages);
+ // Phone tier (hivecommons/hive#17162): take the production order —
+ // stageTrackerSort with the stored filter, attention tier first — and
+ // draw the sticky count line the renderer draws, so the 390×844 probe
+ // asserts the real contract. Desktop keeps the fixture's own order so
+ // the 1280 capture and the strip-tier probes are unchanged.
+ const phone = typeof stageTrackerPhone === 'function' && stageTrackerPhone();
+ const listed = phone ? stageTrackerTrainContiguous(stageTrackerSort(items, stages, _stageTrackerFilter, { phone: true })) : items;
+ const ordered = stageTrackerPreparationOrderRows(_stageTracker, listed, stages);
_stageTrackerRows = ordered;
+ if (phone && attnLine) {
+ const f = stageTrackerNormalizeFilter(_stageTrackerFilter);
+ attnLine.innerHTML = stageTrackerAttentionLineHtml(items.filter(it => it && it.waiting_on_you && !it.nested_under).length,
+ items.filter(stageTrackerNeedsAttention).length, f.waitingOnYou);
+ }
stageTrackerPreparationVisualSync(_stageTracker, ordered, ordered, stages, nowMs);
const rows = ordered.map(item => ({ key: stageTrackerItemKey(item), html: stageTrackerRowHtml(item, stages, ctx) }));
for (const row of stageTrackerPreparationInlineRows(rows, ordered, stages)) host.appendChild(stageTrackerRowNode(row.key, row.html));
From 400538ae3cff38d59971e408fa51d82fee0ca84a Mon Sep 17 00:00:00 2001
From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Date: Sun, 8 Nov 2026 00:42:21 -0500
Subject: [PATCH 3/7] =?UTF-8?q?=F0=9F=90=9B=20dashboard:=20attention-first?=
=?UTF-8?q?=20probe=20asserts=20the=20count=20line=20at=20rest,=20not=20wh?=
=?UTF-8?q?ile=20scrolling?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The first Dashboard Mobile Shots run of the probe passed every acceptance
check at 390×844 (order A------------SS, count line drawn and inside the
viewport at rest, tap height, toggle wiring, counts) and failed only the
extra scroll-and-stay assertion: in the harness no sticky in the
activity monitor (the compact bar included) pins while the page scrolls,
which is the page's scroll-container contract, not this line's. Keep the
issue's criterion (inside the viewport at rest) plus the declared
position: sticky, and leave scrolling behaviour out.
Hive-Fix-Attempt: 1/6
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
---
.../testdata/tracker-phone-attention-first.js | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/pkg/dashboard/webstatic/testdata/tracker-phone-attention-first.js b/src/pkg/dashboard/webstatic/testdata/tracker-phone-attention-first.js
index 0c9e1d2998..6cbd1607fa 100644
--- a/src/pkg/dashboard/webstatic/testdata/tracker-phone-attention-first.js
+++ b/src/pkg/dashboard/webstatic/testdata/tracker-phone-attention-first.js
@@ -3,9 +3,12 @@
// drawn, every top-level row that needs a person (stageTrackerNeedsAttention
// and not sunk — hold / draft rows keep sinking last, as on desktop) precedes
// every row that does not, and the sticky "⚠ N waiting on you · M need
-// attention" line is inside the viewport at rest with the list scrolled to
-// its top, is the Waiting on you toggle (hamFilter waitingOnYou), and meets
-// the tap target. Desktop returns a skip marker. Restores the scroll position.
+// attention" line is inside the viewport at rest with the section scrolled
+// to its top, is declared sticky like the compact bar above it, is the
+// Waiting on you toggle (hamFilter waitingOnYou), and meets the tap target.
+// Whether sticky engages while scrolling is the page's scroll-container
+// contract, shared with .ham-sticky / .ham-cols, and not asserted here.
+// Desktop returns a skip marker. Restores the scroll position.
(async ({ dedicatedPreview = false } = {}) => {
if (!dedicatedPreview) throw new Error('Use a dedicated published-preview tab, not the user’s live dashboard');
const tolerance = 1;
@@ -56,11 +59,6 @@
assert(/\d+ waiting on you · \d+ needs? attention/.test(line.textContent), 'count line reads "N waiting on you · M need attention": ' + line.textContent.trim());
const attentionAll = items.filter(stageTrackerNeedsAttention).length;
assert(line.textContent.indexOf('· ' + attentionAll + ' need') >= 0, 'count line counts every needs-attention item (' + attentionAll + '): ' + line.textContent.trim());
- // Scrolled into the list the line stays on screen (sticky).
- scroller.scrollTop += Math.min(600, scroller.scrollHeight - innerHeight);
- await frame();
- const stuck = line.getBoundingClientRect();
- assert(stuck.top >= -tolerance && stuck.bottom <= innerHeight + tolerance, 'count line stays inside the viewport while scrolling the list: top ' + Math.round(stuck.top));
}
} finally {
scroller.scrollTop = savedScroll;
From af3ea81d51a7c1b33cf96ebd24eadf9d5e9918ad Mon Sep 17 00:00:00 2001
From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Date: Sun, 8 Nov 2026 01:05:01 -0500
Subject: [PATCH 4/7] =?UTF-8?q?=F0=9F=8C=B1=20ci:=20re-pin=20TRUSTED=5FSCR?=
=?UTF-8?q?IPTS=5FTREE=20for=20the=20mobile-shots=20probe=20and=20fixture?=
=?UTF-8?q?=20edits?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
src/scripts/dashboard-mobile-shots.mjs and fixtures/dashboard-activity-density.mjs
changed in this PR; pin to git rev-parse HEAD:src/scripts of the merged tree.
Hive-Fix-Attempt: 1/6
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
---
.github/scripts/integration-governance.cjs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/scripts/integration-governance.cjs b/.github/scripts/integration-governance.cjs
index 26387f3494..8df815804f 100644
--- a/.github/scripts/integration-governance.cjs
+++ b/.github/scripts/integration-governance.cjs
@@ -9,7 +9,7 @@ const MAX_COMMITS = 1000;
const MAX_AUTHOR_BATCH = 50;
// This literal is inside the enrolled .github closure. A caller-supplied
// preparedBy.sourceSHA must never choose a new executable verifier tree.
-const TRUSTED_SCRIPTS_TREE = '75a61a7ab6d25706d9ff889dfa082639336c9bfb';
+const TRUSTED_SCRIPTS_TREE = 'bcab743437f9a825dcb57c8170b85e9f89d3ba95';
const SOURCE = 'https://github.com/kubernetes-sigs/kubebuilder-release-tools/tree/012269a88fa4c034a0acf1ba84c26b195c0dbab4';
const sha = value => crypto.createHash('sha256').update(value).digest('hex');
const git = (args, cwd = process.cwd()) =>
From c137106760a2f5b56c03cead80cc194e04aa2d28 Mon Sep 17 00:00:00 2001
From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Date: Sun, 8 Nov 2026 01:24:49 -0500
Subject: [PATCH 5/7] =?UTF-8?q?=F0=9F=93=9D=20dashboard:=20note=20phone=20?=
=?UTF-8?q?attention-first=20ordering=20and=20count=20line=20in=20activity?=
=?UTF-8?q?-monitor.md?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The section doc still described column-first ordering on every device and
omitted the sticky count line that the phone tier now draws; align it with
the Phones paragraph in dashboard.md.
Hive-Fix-Attempt: 2/6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
---
src/docs/dashboard-sections/activity-monitor.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md
index 4d36e78800..9aadd1b533 100644
--- a/src/docs/dashboard-sections/activity-monitor.md
+++ b/src/docs/dashboard-sections/activity-monitor.md
@@ -123,11 +123,11 @@ Filters run on the cached browser payload and persist across reloads, except the
**+N more** opens *All labels*, with every label and count, type-to-filter, toggles and **Clear**. Selected labels are promoted into the visible row. **Clear filters** appears whenever the view is narrowed.
-**On a phone** (the `.modal-sheet` tier: ≤640px wide, or a coarse pointer up to 820px) the toolbar and label chips are not drawn above the list. The sticky bar carries a compact filter row instead — *All / PRs / Issues*, *⚠ Needs attention*, *👤 Waiting on you* (with its count) and **⋯ Filters** — beside the Merged pill, so the first row starts within about 100px of the section header. **⋯ Filters** opens a full-screen sheet holding the complete toolbar (Repo, search, Since, Author, Decisions, Sort, Group, Per page, sound) and the label chips; its badge counts the filters set in the sheet. Filters apply as you change them and stay applied when the sheet closes (**Done**, ✕, Esc or the backdrop). **On a landscape phone** (coarse pointer, ≤1024px wide and ≤500px tall) the same compact bar is used, the column header is hidden so the sticky stack is the bar alone, and merge banners are capped to one with a *+N more* pill. Desktop layout is unchanged.
+**On a phone** (the `.modal-sheet` tier: ≤640px wide, or a coarse pointer up to 820px) the toolbar and label chips are not drawn above the list. The sticky bar carries a compact filter row instead — *All / PRs / Issues*, *⚠ Needs attention*, *👤 Waiting on you* (with its count) and **⋯ Filters** — beside the Merged pill, so the first row starts within about 100px of the section header. **⋯ Filters** opens a full-screen sheet holding the complete toolbar (Repo, search, Since, Author, Decisions, Sort, Group, Per page, sound) and the label chips; its badge counts the filters set in the sheet. Filters apply as you change them and stay applied when the sheet closes (**Done**, ✕, Esc or the backdrop). Beneath the compact bar, a sticky count line ("⚠ N waiting on you · M need attention") toggles the *Waiting on you* filter; it is drawn only while at least one row is waiting on you or needs attention, so the sticky stack is bar → count line → rows. **On a landscape phone** (coarse pointer, ≤1024px wide and ≤500px tall) the same compact bar is used, the column header is hidden so the sticky stack is the bar alone, and merge banners are capped to one with a *+N more* pill. Desktop layout is unchanged.
-Default sort is furthest along first; covered issues rank by their furthest-along PR. Within each column, attention rows precede plain rows, then held/draft rows and PRs standing for closed issues. Within a tier, longest waiting comes first, then repository and number. The same ordering applies to nested PRs and the server payload, so chat `/prs` and the hub agree. `deferred_modifiers` never promote a row.
+Default sort is furthest along first; covered issues rank by their furthest-along PR. Within each column, attention rows precede plain rows, then held/draft rows and PRs standing for closed issues. Within a tier, longest waiting comes first, then repository and number. The same ordering applies to nested PRs and the server payload, so chat `/prs` and the hub agree on desktop. **Phones are the exception:** at phone widths the *Furthest along* and *Longest waiting* sorts make the attention tier the top-level group — every row that needs a person sits above the rest, ahead of the stage column, while held/draft rows still sink to the bottom — so the hub order on a phone differs from the payload; *Newest* and *Number* are unchanged. The `attentionFirst` filter field (default on) drives this and has no toolbar control yet. `deferred_modifiers` never promote a row.
-**Sort** also offers longest waiting (tier, then wait), newest and number (no tiers). The arrow reverses column/age/repo/number keys, never attention tiers: “Attention-first within each column; arrow flips age order.” Pages offer **25 / 50 / 100** rows (default 50) and **Prev / Next**, with counts above and below.
+**Sort** also offers longest waiting (tier, then wait), newest and number (no tiers). The arrow reverses column/age/repo/number keys, never attention tiers: “Attention-first within each column; arrow flips age order.” (the tooltip describes the desktop rule; on a phone the tier leads the column). Pages offer **25 / 50 / 100** rows (default 50) and **Prev / Next**, with counts above and below.
### Stage age, modifiers and motion
From 202830f5455f8781bfb8bb1286d9abcfc138d7f9 Mon Sep 17 00:00:00 2001
From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Date: Sun, 8 Nov 2026 01:47:38 -0500
Subject: [PATCH 6/7] =?UTF-8?q?=F0=9F=8C=B1=20dashboard:=20reuse=20the=20s?=
=?UTF-8?q?heet=20media=20query=20for=20stageTrackerPhone=20and=20the=20--?=
=?UTF-8?q?line-width=20token=20on=20the=20phone=20count=20line?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Review follow-ups for #17179: stageTrackerPhone() now delegates to
stageTrackerIsPhoneSheet() instead of repeating its media-query literal,
the .ham-attn-line border and the matching .ham-cols sticky offset both
derive from --line-width, and the misindented comment line in
tracker-filter-render.js is aligned with the file. The node fixture test
pulls in the helper the function now depends on; static/index.html is
regenerated.
Hive-Fix-Attempt: 3/6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
---
.../stage_tracker_phone_attention_first_test.go | 2 ++
src/pkg/dashboard/static-src/css/tracker.css | 4 ++--
.../static-src/js/tracker-filter-render.js | 2 +-
src/pkg/dashboard/static-src/js/tracker-filter.js | 7 ++++---
src/pkg/dashboard/static/index.html | 13 +++++++------
5 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/src/pkg/dashboard/stage_tracker_phone_attention_first_test.go b/src/pkg/dashboard/stage_tracker_phone_attention_first_test.go
index 5f3676f67d..e394819ab7 100644
--- a/src/pkg/dashboard/stage_tracker_phone_attention_first_test.go
+++ b/src/pkg/dashboard/stage_tracker_phone_attention_first_test.go
@@ -53,6 +53,8 @@ func TestStageTrackerPhoneAttentionFirstJS(t *testing.T) {
stageTrackerActedJS(t, html),
jsFunc(t, html, "stageTrackerNormalizeFilter"),
jsFunc(t, html, "stageTrackerSort"),
+ jsConstLine(t, html, "STAGE_TRACKER_SHEET_QUERY"),
+ jsFunc(t, html, "stageTrackerIsPhoneSheet"),
jsFunc(t, html, "stageTrackerPhone"),
jsFunc(t, html, "stageTrackerAttentionLineHtml"),
}, "\n") + `
diff --git a/src/pkg/dashboard/static-src/css/tracker.css b/src/pkg/dashboard/static-src/css/tracker.css
index 1da160b733..571f80b55c 100644
--- a/src/pkg/dashboard/static-src/css/tracker.css
+++ b/src/pkg/dashboard/static-src/css/tracker.css
@@ -1128,8 +1128,8 @@
.ham-attn-wrap { display: block; position: sticky; top: calc(var(--navbar-sticky-height) + var(--ham-sticky-bar-h)); z-index: calc(var(--z-sticky) + 1); background: var(--panel); }
.ham-attn-wrap:empty { display: none; }
/* The column header sticks below the count line, not under it. */
- .ham-attn-wrap:not(:empty) ~ #activity-monitor-panel .ham-cols { top: calc(var(--navbar-sticky-height) + var(--ham-sticky-bar-h) + var(--tap-target) + 1px); }
- .ham-attn-line { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: var(--tap-target); padding: 0 var(--sp-3); border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--status-attention); font-size: var(--fs-touch); font-weight: 600; text-align: left; }
+ .ham-attn-wrap:not(:empty) ~ #activity-monitor-panel .ham-cols { top: calc(var(--navbar-sticky-height) + var(--ham-sticky-bar-h) + var(--tap-target) + var(--line-width)); }
+ .ham-attn-line { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: var(--tap-target); padding: 0 var(--sp-3); border: 0; border-bottom: var(--line-width) solid var(--border); background: transparent; color: var(--status-attention); font-size: var(--fs-touch); font-weight: 600; text-align: left; }
.ham-attn-line[aria-pressed="true"] { background: color-mix(in srgb, var(--status-attention) 12%, transparent); }
}
diff --git a/src/pkg/dashboard/static-src/js/tracker-filter-render.js b/src/pkg/dashboard/static-src/js/tracker-filter-render.js
index b7067de2a5..5c96fea2d9 100644
--- a/src/pkg/dashboard/static-src/js/tracker-filter-render.js
+++ b/src/pkg/dashboard/static-src/js/tracker-filter-render.js
@@ -1,5 +1,5 @@
// The phone-only count line above the list: one button that is the Waiting
-// on you chip (same hamFilter action). '' when nothing is parked on anyone.
+ // on you chip (same hamFilter action). '' when nothing is parked on anyone.
function stageTrackerAttentionLineHtml(waiting, attention, on) {
if (!waiting && !attention) return '';
return ``;
diff --git a/src/pkg/dashboard/static-src/js/tracker-filter.js b/src/pkg/dashboard/static-src/js/tracker-filter.js
index 4afbbbf66f..c61fe07168 100644
--- a/src/pkg/dashboard/static-src/js/tracker-filter.js
+++ b/src/pkg/dashboard/static-src/js/tracker-filter.js
@@ -125,10 +125,11 @@
return STAGE_TRACKER_NEEDS_HUMAN_AUTHOR_STAGES.indexOf(n) >= 0 && (item.author_kind || '') === 'human';
}
- // The phone tier of the Activity monitor (the css/responsive.css
- // `.modal-sheet` media query).
+ // The phone tier of the Activity monitor: the same media query the
+ // sheet-vs-popover decision uses (STAGE_TRACKER_SHEET_QUERY in
+ // tracker-actions.js), so the two cannot drift.
function stageTrackerPhone() {
- return !!(window.matchMedia && window.matchMedia('(max-width: 640px), ((pointer: coarse) and (max-width: 820px))').matches);
+ return stageTrackerIsPhoneSheet();
}
// Chip order: every stage/NNN-* label first by NNN, then everything
diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html
index 76142c9317..f0f34f1279 100644
--- a/src/pkg/dashboard/static/index.html
+++ b/src/pkg/dashboard/static/index.html
@@ -2471,8 +2471,8 @@
.ham-attn-wrap { display: block; position: sticky; top: calc(var(--navbar-sticky-height) + var(--ham-sticky-bar-h)); z-index: calc(var(--z-sticky) + 1); background: var(--panel); }
.ham-attn-wrap:empty { display: none; }
/* The column header sticks below the count line, not under it. */
- .ham-attn-wrap:not(:empty) ~ #activity-monitor-panel .ham-cols { top: calc(var(--navbar-sticky-height) + var(--ham-sticky-bar-h) + var(--tap-target) + 1px); }
- .ham-attn-line { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: var(--tap-target); padding: 0 var(--sp-3); border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--status-attention); font-size: var(--fs-touch); font-weight: 600; text-align: left; }
+ .ham-attn-wrap:not(:empty) ~ #activity-monitor-panel .ham-cols { top: calc(var(--navbar-sticky-height) + var(--ham-sticky-bar-h) + var(--tap-target) + var(--line-width)); }
+ .ham-attn-line { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: var(--tap-target); padding: 0 var(--sp-3); border: 0; border-bottom: var(--line-width) solid var(--border); background: transparent; color: var(--status-attention); font-size: var(--fs-touch); font-weight: 600; text-align: left; }
.ham-attn-line[aria-pressed="true"] { background: color-mix(in srgb, var(--status-attention) 12%, transparent); }
}
@@ -21222,10 +21222,11 @@
Where to get help
return STAGE_TRACKER_NEEDS_HUMAN_AUTHOR_STAGES.indexOf(n) >= 0 && (item.author_kind || '') === 'human';
}
- // The phone tier of the Activity monitor (the css/responsive.css
- // `.modal-sheet` media query).
+ // The phone tier of the Activity monitor: the same media query the
+ // sheet-vs-popover decision uses (STAGE_TRACKER_SHEET_QUERY in
+ // tracker-actions.js), so the two cannot drift.
function stageTrackerPhone() {
- return !!(window.matchMedia && window.matchMedia('(max-width: 640px), ((pointer: coarse) and (max-width: 820px))').matches);
+ return stageTrackerIsPhoneSheet();
}
// Chip order: every stage/NNN-* label first by NNN, then everything
@@ -22380,7 +22381,7 @@
All labels
return `
${esc(text)}
`;
}
// The phone-only count line above the list: one button that is the Waiting
-// on you chip (same hamFilter action). '' when nothing is parked on anyone.
+ // on you chip (same hamFilter action). '' when nothing is parked on anyone.
function stageTrackerAttentionLineHtml(waiting, attention, on) {
if (!waiting && !attention) return '';
return ``;
From b00736fd8536de3aee326470ed7ff2f90e5ae5cd Mon Sep 17 00:00:00 2001
From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Date: Sun, 8 Nov 2026 01:57:33 -0500
Subject: [PATCH 7/7] =?UTF-8?q?=F0=9F=90=9B=20fix(dashboard):=20count=20li?=
=?UTF-8?q?ne=20uses=20stageTrackerWaitingOnYou;=20fix=20helper=20tests?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The phone count line (renderer and activity-density fixture) now takes its waiting count from stageTrackerWaitingOnYou(d).count, the same server waiting_on_human block the badge, pill and chips use. nav_count_delta.test.js loads stageTrackerIsPhoneSheet, which stageTrackerPhone now delegates to (fixes ReferenceError in tests 31-33, 35). Re-pins TRUSTED_SCRIPTS_TREE for the fixture edit; static/index.html regenerated; merges origin/v5.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
---
.github/scripts/integration-governance.cjs | 2 +-
src/pkg/dashboard/nav_count_delta.test.js | 1 +
src/pkg/dashboard/static-src/js/tracker-filter-render.js | 2 +-
src/pkg/dashboard/static/index.html | 2 +-
src/scripts/fixtures/dashboard-activity-density.mjs | 2 +-
5 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/.github/scripts/integration-governance.cjs b/.github/scripts/integration-governance.cjs
index 8df815804f..c25137ba4d 100644
--- a/.github/scripts/integration-governance.cjs
+++ b/.github/scripts/integration-governance.cjs
@@ -9,7 +9,7 @@ const MAX_COMMITS = 1000;
const MAX_AUTHOR_BATCH = 50;
// This literal is inside the enrolled .github closure. A caller-supplied
// preparedBy.sourceSHA must never choose a new executable verifier tree.
-const TRUSTED_SCRIPTS_TREE = 'bcab743437f9a825dcb57c8170b85e9f89d3ba95';
+const TRUSTED_SCRIPTS_TREE = '808dc52204d119b6840b3b90bc788fd25a89ed0b';
const SOURCE = 'https://github.com/kubernetes-sigs/kubebuilder-release-tools/tree/012269a88fa4c034a0acf1ba84c26b195c0dbab4';
const sha = value => crypto.createHash('sha256').update(value).digest('hex');
const git = (args, cwd = process.cwd()) =>
diff --git a/src/pkg/dashboard/nav_count_delta.test.js b/src/pkg/dashboard/nav_count_delta.test.js
index f086843d7f..8134895555 100644
--- a/src/pkg/dashboard/nav_count_delta.test.js
+++ b/src/pkg/dashboard/nav_count_delta.test.js
@@ -83,6 +83,7 @@ function load() {
['tracker-waiting', ['stageTrackerWaitingOnYou', 'stageTrackerWaitingTitle', 'stageTrackerWaitKindWords', 'stageTrackerRenderWaiting']],
['tracker-words-stage', ['stageTrackerDefaultFilter']],
['tracker-filter-render', ['renderStageTracker']],
+ ['tracker-actions', ['stageTrackerIsPhoneSheet']],
['tracker-merged', ['stageTrackerMergingHoldRelease']],
]) {
for (const name of names) vm.runInContext(fn(file, name), ctx);
diff --git a/src/pkg/dashboard/static-src/js/tracker-filter-render.js b/src/pkg/dashboard/static-src/js/tracker-filter-render.js
index 5c96fea2d9..e506479ba8 100644
--- a/src/pkg/dashboard/static-src/js/tracker-filter-render.js
+++ b/src/pkg/dashboard/static-src/js/tracker-filter-render.js
@@ -136,7 +136,7 @@
navCountBind(STAGE_TRACKER_COUNT_BADGE_IDS, counts.badge, counts.badgeTitle, !!data || countRefresh);
stageTrackerRenderWaiting(d, nowMs, !!data || countRefresh);
const attnLine = document.getElementById('activity-monitor-attn-line');
- if (attnLine) setIfChanged(attnLine, stageTrackerAttentionLineHtml(d.items.filter(it => it && it.waiting_on_you && !it.nested_under).length, attentionAll, f.waitingOnYou));
+ if (attnLine) setIfChanged(attnLine, stageTrackerAttentionLineHtml(stageTrackerWaitingOnYou(d).count || 0, attentionAll, f.waitingOnYou));
const labelsEl = document.getElementById('activity-monitor-labels');
if (labelsEl) setIfChanged(labelsEl, stageTrackerLabelsHtml(stageTrackerLabelFacets(d.items, f)));
stageTrackerRenderLabelDialog();
diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html
index f0f34f1279..fb54b50dfc 100644
--- a/src/pkg/dashboard/static/index.html
+++ b/src/pkg/dashboard/static/index.html
@@ -22518,7 +22518,7 @@