Repository navigation
✨ feat: dim stale display-mode boards and add density=tv, burn-in shift and reduced motion - #15970
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
hive/awaiting-ci: CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
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.
stageTrackerDisplayStalemarks the stream stale after2 × STAGE_TRACKER_POLL_MS= 60 s of silence (agent-now.js:471); the server keepalive is 20 s (server.go:1525) andsse-bootstrap.js:38routeskeepaliveevents throughnoteSSEFrame, so a connected-but-idle board stays "Live".EventSourceis unconditional inconnect()(sse-bootstrap.js:29), so there is no polling-only path where the SSE branch would go stale forever. - Gating.
boot.js:41still computesHIVE_DISPLAY = display && !kiosk, andHIVE_DISPLAY_DENSITY/HIVE_DISPLAY_SHIFTderive from it, so?kiosk=1&density=tvis unchanged —TestDisplayOptionsWiringpins exactly that. - No render loop.
stageTrackerDisplayMeasureRowsre-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 insessionStorage, and the first frame after a reload clears the counter and any pending timer. The roll-triggered reload is guarded once per page load andcompletedAt > loadedAtmeans the reload it causes can't retrigger it. ham-chromelessconsolidation.stageTrackerSetFullscreenLayout(false)keeps the class whenpopout-mode/display-modeis 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-cardsuppression 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
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Read What I verified:
One thing for whoever merges: the |
ad2dfd1 to
c12d97f
Compare
|
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: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
hive/awaiting-ci: pushed a test-harness fix (the display-controls harness now loads 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
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
|
Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. |
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>
7c003b5 to
84d52b4
Compare
|
hive/awaiting-ci: rebased onto v5 (rebase-resolve attempt 2/2) — tracker-filter-render.js conflicted with #15871; kept both the TV-density 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
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.jsreaches 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)._sseEverFrameAtMsis declared withvarinsse-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-trackerreally carriesgenerated_atandcache_ttl_s(stage_tracker.go:39,44), and the> 2 × TTLstale 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 fromonopen,keepalive,onmessage,stage-trackerandagent-status(sse-bootstrap.js:36-99), so a healthy-but-quiet hive stays "live" through keepalives rather than dimming.stageTrackerDisplayRollReloadcomparescompletedAtto the new page's load time, so the reload it triggers cannot re-trigger itself.TestDisplayOptionsWiringpins the classes to the display branch ofboot.js, andstageTrackerSetFullscreenLayoutkeepsham-chromelesson exit from full screen whenpopout-mode/display-modeis present, as the body says. Thesrc/docs/streaming-the-activity-monitor.mdupdate 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
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
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 listedbody.popout-mode,body.ham-fullscreenandbody.display-mode. Nowboot.jsadds one sharedbody.ham-chromelessclass alongsidepopout-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 decisionon #15860)body.display-mode/stageTrackerDisplayMode().densityandshiftare parsed inboot.jsonly 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=1output and the ordinary Activity Monitor are unchanged. The "updated … ago" chip is untouched.densityaccepts onlytv.Notes
// tracker display liveness helpers begin/endand// tracker display layout helpers begin/endmarkers, in a newstatic-src/js/tracker-display.js. The new node:test files lift them fromstatic/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.sessionStorage(per tab), so it survives the reload it schedules. Nothing is written tolocalStorage.?display=1docs 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