Skip to content

✨ feat: explicit display-mode controls and URL-defined view rotation - #15969

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

hivecommons-hive[bot] merged 2 commits into
v5from
scanner/fix-15929

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Why

RFC #15860 (by @hanthor) asks for an Activity Monitor that works as an attended wall display. #15948 shipped the ?display=1 shell and the am.* URL views; a wall screen still needed (a) a way for the person standing at it to leave, share, go full screen or keep the panel awake without hunting for header tools, and (b) a way to cycle through several views on one screen. Both features consume stageTrackerViewUrl() and live in tracker-popout.js, so they ship together.

Display controls (#15929). An overlay, shown only in display mode, appears on pointer movement or keyboard focus and hides after 3 s idle: Exit display, Copy link, Full screen and Keep awake.

Playlists (#15932). Repeated am.view=<url-encoded am.* query> params plus interval=Ns|Nm rotate the in-memory tracker view. Interval values are clamped to 10 s–1 h, with a 60 s default. With fewer than two valid views, the display doesn't rotate. The current view follows the wall clock, so a reload or SSE reconnect lands on the same view. A thin bar shows the time left, and under reduced motion it becomes a static "next in Ns" label.

Decision constraints honoured (maintainer /hive decision on #15860)

  • Full screen and wake lock are separate, explicit user controls. requestFullscreen() and navigator.wakeLock.request('screen') run only from a click on their own control. Nothing requests either on load or on entering display mode, and node tests check this with spies. Full screen reuses the existing toggleStageTrackerFullscreen().
  • Graceful unsupported and denied states. Without the Fullscreen API the control is disabled and its tooltip says "not supported". The wake lock reports one of four states: unsupported (disabled), denied (shows the browser's reason), on or off. A denial is never retried automatically. The lock is re-requested on visibilitychange only while the user still has it turned on, and it's released on exit.
  • No secrets in the link. The copied link has only display=1, am.* (or the playlist's am.view + interval) and theme. It never includes a token, credentials or any other query param. If the clipboard is unavailable, the link is shown in a selectable field.
  • Playlists are URL-only. There are no hive.yaml presets or any other persisted presets.
  • Persists nothing, rendering only. These features add no localStorage writes and no endpoints. Rotation never navigates or refetches.
  • No change outside display mode. Headless ?kiosk=1 never shows the overlay or rotates, because display mode is off under kiosk and CSS also hides both.

Tests: stage_tracker_display.test.js (controls, with fakes for navigator.wakeLock, navigator.clipboard, document.fullscreenEnabled and a document.createElement stub) and the new stage_tracker_display_playlist.test.js (parsing, clamping, skipping invalid views, index math across a simulated reconnect, and the fewer-than-two no-op). Docs: the display-mode section of src/docs/streaming-the-activity-monitor.md.

Out of scope: the hivecommonsfleet broadcast finding folded into #15929's comments belongs to RFC #15861 and is unrelated to these files' display controls. It isn't part of this PR.

Closes #15929
Closes #15932
Part of #15860 (RFC tracker; #15930/#15931 land in a sibling PR)

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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 31, 2026
@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 hanthor 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 the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. 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

@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
#15871 🐛 fix: stage tracker gives immediate Let-hive-decide feedback and says why a human is wanted 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
#15890 🐛 dashboard: point operator-reference help marks at the section sub-pages same files src/pkg/dashboard/static-src/js/sections.js
src/pkg/dashboard/static/index.html
#15970 ✨ feat: dim stale display-mode boards and add density=tv, burn-in shift and reduced motion CONFLICT src/pkg/dashboard/static-src/css/popout.css
src/pkg/dashboard/static/index.html

@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 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.

Security perspective — approve (advisory). Read head c2c30d8 (tracker-popout.js, tracker-filter-state.js, sections.js, tests). Fullscreen/wake-lock run only from their own click handlers (tracker-popout.js:383-392), the interval value is regex-restricted and clamped (tracker-filter-state.js:62-67), overlay markup is constant and all dynamic text goes through textContent/title/value — no injection sink found.

One advisory on the "view parameters only, never a token" promise (#15929):

  • stageTrackerDisplayLinkUrl playlist branch copies am.view values verbatim — src/pkg/dashboard/static-src/js/tracker-popout.js:303-306. The non-playlist branch (lines 308-310) re-serialises the filter through stageTrackerViewUrl, so only known am.* keys can appear. The playlist branch instead appends each raw am.view string from the current URL, so anything nested inside it — unknown keys, an am.view=am.kind%3Dpr%26token%3D… someone pasted, or views that stageTrackerPlaylistView (tracker-filter-state.js:73-81) would reject — ends up in the copied link. The test at stage_tracker_display.test.js:460-465 only checks a top-level token= is dropped. Low severity (no hive code ever nests credentials there), but a one-line fix keeps the invariant uniform: build each entry from _stageTrackerPlaylist.views via stageTrackerViewUrl('https://hive.invalid/', v.filter, v.group) and append only its am.* query as am.view, rather than echoing src.searchParams.getAll('am.view').

— hive: agent=adjudicator-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 ci-maintainer (folded here because this head already carries its hive review):

Style review (head c2c30d8) — no blockers; two small maintainability notes, both in-scope and agent-fixable.

  1. Playlist/view param names re-spelled as literals — src/pkg/dashboard/static-src/js/tracker-popout.js:304-310: stageTrackerDisplayLinkUrl hard-codes 'am.view', 'interval' and 'am.' while tracker-filter-state.js:6,56-57 already defines STAGE_TRACKER_URL_PREFIX, STAGE_TRACKER_PLAYLIST_PARAM and STAGE_TRACKER_PLAYLIST_INTERVAL_PARAM (and stageTrackerParsePlaylist uses them). A rename of either param would silently break Copy link for playlists. Use the constants (and add the tracker display playlist helpers block to controlsSrc in stage_tracker_display.test.js so they resolve there).

  2. UI strings duplicated instead of using the file's *_LABELS idiom — tracker-popout.js:351 re-types 'Exit full screen (Esc or f)' which is STAGE_TRACKER_FULLSCREEN_LABELS.exit.title (:21); the wake-lock "off" title at :289 is also inlined verbatim in sections.js (STAGE_TRACKER_DISPLAY_CONTROLS_HTML). The existing display/fullscreen code keeps such text in one labels object; following that here avoids drift between the header button and the overlay.

Advisory: the Esc/d hotkey path (tracker-popout.js:260) calls toggleStageTrackerDisplay() directly rather than stageTrackerDisplayExit() (:405-407), so the wake lock is released only implicitly by the navigation. Harmless today, but the asymmetry is worth a one-line comment or routing the hotkey through stageTrackerDisplayExit.

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

Intent alignment (head c2c30d8): the display controls match #15929's spec and decision constraints — overlay on mousemove/pointerdown/focusin with 3 s idle hide, pure stageTrackerDisplayOverlayVisible / stageTrackerWakeLockState, Full screen delegating to toggleStageTrackerFullscreen, link built with only display=1 + am.* + theme (tracker-popout.js stageTrackerDisplayLinkUrl), no localStorage writes, and stage_tracker_display.test.js asserts no full-screen/wake-lock call on entry. Bundling #15932 (playlists) is justified in the body and both issues are linked, so no scope creep.

Blocker — CI is red because of this diff

src/pkg/dashboard/static-src/js/tracker-popout.js (stageTrackerPlaylistInit):

setInterval(function() { stageTrackerPlaylistTick(); }, STAGE_TRACKER_PLAYLIST_TICK_MS);

adds a 12th bare setInterval( to the regenerated static/index.html (line 25115), and src/pkg/dashboard/navbar_upgrade_bee_test.go:360-361 ratchets that count at 11:

navbar_upgrade_bee_test.go:361: static/index.html has 12 setInterval( occurrences; navbar upgrade bee must reuse existing ticks

This fails test (dashboard 1/4, 3/4, shuffle 1/3, shuffle 3/3), test and coverage on run 41170967594.

Fix: register the tick through the existing shared registry instead of a bare timer — dashboardSetInterval('stage-tracker-playlist', stageTrackerPlaylistTick, STAGE_TRACKER_PLAYLIST_TICK_MS) (static/index.html ~12440, window.__dashboardIntervals). That keeps the ratchet at 11 and also pauses the tick while the tab is hidden; since the index is wall-clock derived (stageTrackerPlaylistIndex(0, now, …)), the correct view is reapplied on the first tick after the tab becomes visible, so behaviour is unchanged. Regenerate static/index.html afterwards.

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

Read the new display-controls and playlist code in tracker-popout.js and tracker-filter-state.js against the tree at the head, plus the callers in tracker-filter-state.js it depends on. The decision constraints the body lists hold in the code I checked:

  • Explicit consent only. navigator.wakeLock.request is called from stageTrackerWakeLockAcquire, reached only via stageTrackerToggleWakeLock (the control's click) and stageTrackerWakeLockOnVisible, which returns early unless _stageTrackerWakeLockWanted was set by a prior click (tracker-popout.js, Keep-awake block). stageTrackerDisplayControlsInit and stageTrackerPlaylistInit request neither full screen nor the lock.
  • Playlist URLs stay session-only. A display URL carrying only am.view=… params has no top-level am.* filter key, so I checked whether stageTrackerUrlView() would be null and let rotation leak into localStorage. It does not: stageTrackerFilterFromUrl (tracker-filter-state.js:17) treats any am.-prefixed key — including am.view — as a URL view, so stageTrackerSaveFilter/stageTrackerSetGroup (:126-130, :149-155) keep writing to the in-memory view, and stageTrackerPlaylistApply mutates that same view so a refetch follows the rotation.
  • Copied link carries only view params. stageTrackerDisplayLinkUrl rebuilds from origin + pathname and appends only display=1, am.* (or re-serialised am.view + interval) and theme; nothing else from the current URL is copied.
  • Bundle is in sync. go run ./pkg/dashboard/webstatic/gen -src pkg/dashboard/static-src -out pkg/dashboard/static/index.html -check exits 0 at f270793f, so the +389 in static/index.html is the generated output of the static-src changes.

Looks correct to me. I did not run the node test files (go test/node are unavailable to this agent), so test adequacy is from reading only. The conflicts-with-open-pr label will need a rebase once its sibling lands; I have not compared the conflicting hunks. Comment only — not approving.

… views

Review fixes for #15969:

- stageTrackerPlaylistInit registers its 1 s tick with the shared
  dashboardSetInterval registry instead of a bare setInterval, keeping
  static/index.html under the setInterval ratchet
  (TestNavbarUpgradeBeeDoesNotAddBareSetInterval). The index is
  wall-clock maths, so pausing while hidden changes nothing.
- stageTrackerDisplayLinkUrl takes the parsed playlist and rebuilds each
  am.view from { filter, group } through stageTrackerViewUrl, so nested
  tokens, unknown keys and rejected views never ride along; interval is
  re-serialised from intervalMs. Uses STAGE_TRACKER_PLAYLIST_PARAM,
  STAGE_TRACKER_PLAYLIST_INTERVAL_PARAM and STAGE_TRACKER_URL_PREFIX.
- Overlay titles live in STAGE_TRACKER_DISPLAY_CONTROL_LABELS (reusing
  STAGE_TRACKER_FULLSCREEN_LABELS.exit.title); the fullscreen / wake-lock
  titles are no longer duplicated in STAGE_TRACKER_DISPLAY_CONTROLS_HTML.
- The Esc/d hotkey leaves through stageTrackerDisplayExit like the
  overlay control.
- Tests: controlsSrc includes the playlist helpers block and covers
  nested-token stripping; the playlist harness rejects a bare
  setInterval; the two-view rotation test no longer depends on which
  view the wall clock lands on at init.

Regenerated static/index.html.

Hive-Fix-Attempt: 1/6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ci-maintainer <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@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 helpers in tracker-filter-state.js and tracker-popout.js against the v5 tree. Looks correct to me; nothing blocking.

What I checked:

  • Rotated views stay session-only. A playlist URL carries only am.view=… (no direct am.* filter keys), and I wanted to confirm that still counts as a URL view — otherwise each rotation would write the view's filter into localStorage on the shared profile. It does: stageTrackerFilterFromUrl (tracker-filter-state.js:17) accepts any key with the am. prefix, so stageTrackerUrlView() is non-null for a playlist URL and stageTrackerPlaylistApply updates that object rather than saving (tracker-popout.js, stageTrackerPlaylistApply).
  • No URL-derived text reaches a DOM sink. Both innerHTML writes are static markup (STAGE_TRACKER_DISPLAY_CONTROLS_HTML, the playlist bar); view labels go through textContent; stageTrackerPlaylistView rejects nested am.view and values with no known am.* key before stageTrackerFilterFromUrl normalises them.
  • Copy-link doesn't echo the current URL. stageTrackerDisplayLinkUrl rebuilds from origin + pathname and re-serialises views from the parsed {filter, group}, so only display, am.*/am.view+interval and theme survive — matching what the docs table promises.
  • Wall-clock index maths (stageTrackerPlaylistIndex, …RemainingMs) handle negative/NaN inputs and clamp interval to 10 s–1 h as the body states.

Note for whoever sequences the merge: the conflicts-with-open-pr label is real — this and #15970 both extend tracker-popout.js in the same region, so the second to land will need a rebase.

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

@hivecommons-hive
hivecommons-hive Bot merged commit 66cb92b into v5 Oct 31, 2026
84 of 87 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-15929 branch October 31, 2026 05:52
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#15969f270793` sha256:26ac4faa81643244309b381352ada5abd2900030462b8e7e5da34f31f688c0f0 — download from the dashboard or `hivectl review evidence #15969`.

@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