Skip to content

✨ feat: dim stale display-mode boards and add density=tv, burn-in shift and reduced motion - #15970

Merged
hivecommons-hive[bot] merged 4 commits into
v5from
scanner/fix-15930
Oct 31, 2026
Merged

hivecommons-hive[bot] merged 4 commits into
v5from
scanner/fix-15930

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Why

A wall screen running display mode (?display=1, #15948) kept showing its last payload as if it were live after the event stream or the spoke went quiet. Nobody walking past could tell a frozen board from a quiet hive. Wall screens also need a layout readable from across a room, protection against OLED burn-in, and respect for the viewer's reduced-motion setting. These are the "honest liveness" and wall-option pieces of Part A of RFC #15860 (by @hanthor).

Before adding more display-mode CSS, the first commit consolidates popout.css (#15956). Every shared chrome-less rule listed body.popout-mode, body.ham-fullscreen and body.display-mode. Now boot.js adds one shared body.ham-chromeless class alongside popout-mode/display-mode, and full screen adds it at runtime. Leaving full screen keeps it when the URL asked for a chrome-less view. The shared rules key on that single class. The existing class names are kept and keep their view-specific rules: the welcome/NPS suppression stays pop-out/display-only, as before.

Maintainer decision constraints honoured (/hive decision on #15860)

  • Display mode only. Everything is gated on body.display-mode / stageTrackerDisplayMode(). density and shift are parsed in boot.js only into display-mode flags and classes. A Go wiring test (TestDisplayOptionsWiring) asserts that the classes are added only inside the display branch. Kiosk wins over display as before, so headless ?kiosk=1 output and the ordinary Activity Monitor are unchanged. The "updated … ago" chip is untouched.
  • Rendering only. There are no new endpoints, credentials or privileges. The TV layout only hides affordances and adds nothing that mutates.
  • Hive-taken decisions: the reload backoff constants are fixed in code (5 failures, 30 s doubling, 10 min cap). density accepts only tv.

Notes

  • The pure helpers sit between // tracker display liveness helpers begin/end and // tracker display layout helpers begin/end markers, in a new static-src/js/tracker-display.js. The new node:test files lift them from static/index.html. The tests cover the SSE-silent, TTL-expired, fresh and never-connected cases, the backoff schedule, the row cap, "+N more" and reduced motion.
  • noteSSEFrame() now also records _sseEverFrameAtMs, which a reconnect does not reset. Without it, connect() zeroes the last-frame time, which would hide a dead stream.
  • The reload-attempt counter for the backoff lives in sessionStorage (per tab), so it survives the reload it schedules. Nothing is written to localStorage.
  • Only the issue-mandated ?display=1 docs section is updated.

@hanthor — this implements two children of your RFC #15860.

Closes #15930
Closes #15931
Closes #15956
Part of #15860 (RFC tracker; remaining children #15929, #15932 are separate PRs)

— hive: agent=scanner

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign danathar for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 31, 2026
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#15991 🐛 fix: skeleton preview, plan cache and human reasons for Let hive decide same files src/pkg/dashboard/static/index.html
#15985 📖 docs: document Matrix streaming and add inactive overlay same files src/docs/streaming-the-activity-monitor.md
#15890 🐛 dashboard: point operator-reference help marks at the section sub-pages same files src/pkg/dashboard/static/index.html
#15849 ✨ Show online ClankeR IDs on the Contributors count pill same files src/pkg/dashboard/static/index.html
#15984 ✨ feature: add opt-in Matrix Rain and Cascade display CONFLICT src/pkg/dashboard/static-src/js/boot.js
src/pkg/dashboard/static/index.html

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 31, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 31, 2026
@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 31, 2026
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 31, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the tree at ad2dfd1, including the callers the new file depends on. Looks correct to me. What I checked, beyond the diff:

  • Stale threshold can't false-trip on a quiet hive. stageTrackerDisplayStale marks the stream stale after 2 × STAGE_TRACKER_POLL_MS = 60 s of silence (agent-now.js:471); the server keepalive is 20 s (server.go:1525) and sse-bootstrap.js:38 routes keepalive events through noteSSEFrame, so a connected-but-idle board stays "Live". EventSource is unconditional in connect() (sse-bootstrap.js:29), so there is no polling-only path where the SSE branch would go stale forever.
  • Gating. boot.js:41 still computes HIVE_DISPLAY = display && !kiosk, and HIVE_DISPLAY_DENSITY/HIVE_DISPLAY_SHIFT derive from it, so ?kiosk=1&density=tv is unchanged — TestDisplayOptionsWiring pins exactly that.
  • No render loop. stageTrackerDisplayMeasureRows re-renders only when the measured pitch moved ≥1 px and the cap changed; the second render measures the same rows, so it settles after one pass. Resize is debounced at 150 ms.
  • Reload is bounded and self-clearing. 5 consecutive onerrors before the first reload, 30 s · 2ⁿ capped at 10 min with n in sessionStorage, and the first frame after a reload clears the counter and any pending timer. The roll-triggered reload is guarded once per page load and completedAt > loadedAt means the reload it causes can't retrigger it.
  • ham-chromeless consolidation. stageTrackerSetFullscreenLayout(false) keeps the class when popout-mode/display-mode is on the body, so Esc out of full screen on a pop-out no longer drops the chrome-less layout; the pop-out/display-only #welcome-overlay/.nps-card suppression stayed on the specific classes as the body says.

Body ↔ diff agree (Closes #15930/#15931/#15956, remainder of #15860 named). Two notes for the merger, neither a defect: version.js already reloads on a version-hash change, so a roll may produce two reloads in quick succession on a display (harmless, both guarded); and the conflicts-with-open-pr label is real — #15871 and #15969 also touch tracker-filter-render.js and static/index.html.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

hivecommons-hive Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

Review findings from reviewer (folded here because this head already carries its hive review):

Read tracker-display.js in full plus the wiring in boot.js, sse-bootstrap.js, tracker-filter-render.js, tracker-motion.js, tracker-popout.js and the callees it leans on. The logic holds up; I found nothing that misbehaves.

What I verified:

  • Every symbol the new module calls at tick time exists in the bundle and is only dereferenced after DOMContentLoaded or inside the render path: STAGE_TRACKER_POLL_MS (agent-now.js:471), dashboardSetInterval (history-sparklines.js:21), formatDashboardTime (refresh.js:300), stageTrackerReducedMotion (tracker-motion.js:451), versionReadUpgradeProgress (version.js:5), _stageTrackerPopoutHiveId (tracker-popout.js:23). Manifest order (boot.js 38 → tracker-popout.js 90 → tracker-display.js 91 → version.js/sse-bootstrap.js 118-119) is consistent with that.
  • Reload loop safety: stageTrackerDisplayRollReload only fires when roll.completedAt > _stageTrackerDisplayLoadedAtMs and _stageTrackerDisplayRollReloaded latches, so the post-reload page (new loadedAt) cannot re-trigger; versionReadUpgradeProgress normalises completedAt to a number (version.js:19) so the comparison is well-typed. The SSE backoff reads the attempt counter from sessionStorage before scheduling and clears it on the first frame, and noteSSEFrame resets _stageTrackerDisplayFails, so a recovered stream cancels a pending reload.
  • _sseEverFrameAtMs is set alongside _sseLastFrameAtMs (sse-bootstrap.js:9) and never zeroed by connect(), which is what the stale calculation needs.
  • The ham-chromeless consolidation keeps the three existing classes and their view-specific rules; stageTrackerSetFullscreenLayout re-derives ham-chromeless from popout-mode/display-mode on exit, so leaving full screen in a pop-out does not drop the layout.
  • Nothing runs outside stageTrackerDisplayMode(): the TV page path, the resize listener, the head/banner mount and the tick all early-return, so the Activity Monitor and ?kiosk=1 paths are unchanged, as the body claims.

One thing for whoever merges: the conflicts-with-open-pr label is real — #15984 (Matrix display) edits the same boot.js destructuring line, sse-bootstrap.js, manifest.txt and the generated index.html. The two are not duplicates (different features), but the second to land will need a regenerate (go generate ./pkg/dashboard/webstatic/) and a hand-merge of the boot.js var … line. Looks correct to me otherwise.

@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 31, 2026
@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 31, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: rebased onto v5 after #15969 and #15974 landed (popout.css additive conflict resolved, index.html regenerated); CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 31, 2026
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 31, 2026
@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 31, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: pushed a test-harness fix (the display-controls harness now loads stageTrackerSetFullscreenLayout, which the chrome-less refactor made toggleStageTrackerFullscreen depend on). CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: 7c003b5af

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 31, 2026
@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 31, 2026
@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 31, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness re-review at 7c003b5 (delta since ad2dfd1 = rebase onto v5 @ fd50502 + 2 commits). The PR's own patch is byte-identical to the previously approved one apart from context lines; static/index.html matches all 140 static-src/manifest.txt sources; node --test on the five display/popout suites passes (49/49). Go tests could not be run here (blocked in pod); relying on CI.

Blocker (mechanical): the PR is CONFLICTING against v5 again. v5 moved one commit past the rebase base: bd7c248 (#15871) inserted

_stageTrackerRows = page.rows.map(e => grouping ? e.item : e).filter(Boolean);

directly after if (page.page !== f.page) f.page = page.page; in src/pkg/dashboard/static-src/js/tracker-filter-render.js:95, the exact line this PR rewrites to if (!tv && page.page !== f.page) f.page = page.page; (head tracker-filter-render.js:100). Resolution is to keep both: this PR's guarded line followed by #15871's _stageTrackerRows assignment, then regenerate static/index.html. Semantically it composes cleanly — in TV mode grouping is forced false (tracker-filter-render.js:94) and stageTrackerDisplayCapPage (tracker-display.js:83-88) returns plain ordered items, so grouping ? e.item : e yields the right rows.

Nothing else new: stageTrackerSetFullscreenLayout (tracker-popout.js:99-103) is the only remaining writer of ham-fullscreen/ham-chromeless in static-src/js after the rebase (#15969 added none), and the formatDashboardTime(now, {...}, '') call (tracker-display.js:217-219) matches the helper's (value, options, fallback) signature (index.html:42906).

— hive: agent=adjudicator-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Hive filed review findings that do not block this PR as backlog items:

Cap: 10 backlog item(s) per PR per day.

hivecommons-hive Bot and others added 4 commits October 31, 2026 02:38
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
…uced motion

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
TestDashboardDatesUseSharedTimezoneHelpers bans direct toLocaleTimeString
calls in static/index.html so the display clock honours the dashboard
timezone preference; use the shared helper and regenerate index.html.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
…y-controls harness

toggleStageTrackerFullscreen now calls the shared layout helper; the
controls harness in stage_tracker_display.test.js evaluated the toggle
without it and failed with ReferenceError.

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: rebased onto v5 (rebase-resolve attempt 2/2) — tracker-filter-render.js conflicted with #15871; kept both the TV-density tv guard and the _stageTrackerRows assignment, regenerated static/index.html from static-src (byte-identical to the manifest concat); interval/style ratchets verified unchanged (setInterval count 11, style counts at baseline), earlier timezone failure already fixed by the formatDashboardTime commit; CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 31, 2026
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 31, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the new module against the concatenated tree, not just the diff. The wiring holds and the body's claims match the code.

Verified

  • Every global tracker-display.js reaches for exists in the same concatenated script scope: stageTrackerDisplayMode() (tracker-popout.js:177), STAGE_TRACKER_POLL_MS (agent-now.js:471), dashboardSetInterval (history-sparklines.js:21), _stageTracker (tracker-words-stage.js:35), _stageTrackerPopoutHiveId (tracker-popout.js:23), versionReadUpgradeProgress (version.js:5, returns {source, completedAt} as the roll-reload helper expects), formatDashboardTime (refresh.js:300). _sseEverFrameAtMs is declared with var in sse-bootstrap.js (index.html:49607) and only read inside the 1 s tick (index.html:25570), so the later position in the bundle is fine.
  • /api/stage-tracker really carries generated_at and cache_ttl_s (stage_tracker.go:39,44), and the > 2 × TTL stale rule is the same one the existing "updated … ago" chip already uses (tracker-filter-render.js:16), so display mode and the chip agree on what "stale" means.
  • noteSSEFrame() is called from onopen, keepalive, onmessage, stage-tracker and agent-status (sse-bootstrap.js:36-99), so a healthy-but-quiet hive stays "live" through keepalives rather than dimming.
  • stageTrackerDisplayRollReload compares completedAt to the new page's load time, so the reload it triggers cannot re-trigger itself.
  • TestDisplayOptionsWiring pins the classes to the display branch of boot.js, and stageTrackerSetFullscreenLayout keeps ham-chromeless on exit from full screen when popout-mode/display-mode is present, as the body says. The src/docs/streaming-the-activity-monitor.md update is present.

Looks correct to me; the maintainer-decision constraints from #15860 (display-only gating, rendering-only, no new URL knobs beyond density/shift) are honoured in the code, not just the prose.

Open question (not a defect) — stageTrackerDisplayStale flags ttl staleness at 2 × cache_ttl_s, but the panel refetches on a 30 s poll (STAGE_TRACKER_POLL_MS) plus SSE nudges. With the default TTL (governor eval interval, 300 s by config.go:6169) that is a non-issue, but an operator who sets dashboard.stage_tracker.cache_ttl_s below ~15 s would see the wall dim between polls on a perfectly healthy hive. The existing chip already goes amber in that case, so this PR doesn't introduce the inconsistency — just makes it full-screen. Worth a one-line note in the docs section, or a Math.max(2*ttl, 2*poll) floor, at the author's discretion.

Info — onopen counts as a frame, so the sessionStorage reload-attempt counter is cleared on every successful socket open even if no data follows; a server that accepts the connection and then drops it will cycle reload every ~45 s (5 × 3 s + 30 s) rather than backing off toward the 10 min cap. That seems like the right behaviour for a wall display (it recovers fast), but it means the doubling schedule only applies when the socket never opens.

Note for the human merging: the conflicts-with-open-pr label is on this PR; popout.css and index.html are shared with other open display/matrix PRs, so sequencing is a maintainer call.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#1597084d52b4` sha256:92905837ead16afa33df7ffaa954db0c23ffb9977e71b13dc579dd5c3b160855 — download from the dashboard or `hivectl review evidence #15970`.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR conflicts-with-open-pr Open PR has a merge conflict with another open PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. stage/050-review-pending Review swarm requested; awaiting a verdict for the current head

Projects

None yet

0 participants