Repository navigation
✨ feat: explicit display-mode controls and URL-defined view rotation - #15969
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[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 |
|
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 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
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):
stageTrackerDisplayLinkUrlplaylist branch copiesam.viewvalues verbatim —src/pkg/dashboard/static-src/js/tracker-popout.js:303-306. The non-playlist branch (lines 308-310) re-serialises the filter throughstageTrackerViewUrl, so only knownam.*keys can appear. The playlist branch instead appends each rawam.viewstring from the current URL, so anything nested inside it — unknown keys, anam.view=am.kind%3Dpr%26token%3D…someone pasted, or views thatstageTrackerPlaylistView(tracker-filter-state.js:73-81) would reject — ends up in the copied link. The test atstage_tracker_display.test.js:460-465only checks a top-leveltoken=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.viewsviastageTrackerViewUrl('https://hive.invalid/', v.filter, v.group)and append only itsam.*query asam.view, rather than echoingsrc.searchParams.getAll('am.view').
— hive: agent=adjudicator-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 Style review (head
Advisory: the Esc/ Review findings from Intent alignment (head c2c30d8): the display controls match #15929's spec and decision constraints — overlay on Blocker — CI is red because of this diff
setInterval(function() { stageTrackerPlaylistTick(); }, STAGE_TRACKER_PLAYLIST_TICK_MS);adds a 12th bare This fails Fix: register the tick through the existing shared registry instead of a bare timer — Review findings from Read the new display-controls and playlist code in
Looks correct to me. I did not run the node test files ( |
… 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>
There was a problem hiding this comment.
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 directam.*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 theam.prefix, sostageTrackerUrlView()is non-null for a playlist URL andstageTrackerPlaylistApplyupdates that object rather than saving (tracker-popout.js,stageTrackerPlaylistApply). - No URL-derived text reaches a DOM sink. Both
innerHTMLwrites are static markup (STAGE_TRACKER_DISPLAY_CONTROLS_HTML, the playlist bar); view labels go throughtextContent;stageTrackerPlaylistViewrejects nestedam.viewand values with no knownam.*key beforestageTrackerFilterFromUrlnormalises them. - Copy-link doesn't echo the current URL.
stageTrackerDisplayLinkUrlrebuilds fromorigin + pathnameand re-serialises views from the parsed{filter, group}, so onlydisplay,am.*/am.view+intervalandthemesurvive — matching what the docs table promises. - Wall-clock index maths (
stageTrackerPlaylistIndex,…RemainingMs) handle negative/NaN inputs and clampintervalto 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
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Why
RFC #15860 (by @hanthor) asks for an Activity Monitor that works as an attended wall display. #15948 shipped the
?display=1shell and theam.*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 consumestageTrackerViewUrl()and live intracker-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 plusinterval=Ns|Nmrotate 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 decisionon #15860)requestFullscreen()andnavigator.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 existingtoggleStageTrackerFullscreen().visibilitychangeonly while the user still has it turned on, and it's released on exit.display=1,am.*(or the playlist'sam.view+interval) andtheme. It never includes a token, credentials or any other query param. If the clipboard is unavailable, the link is shown in a selectable field.hive.yamlpresets or any other persisted presets.?kiosk=1never 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 fornavigator.wakeLock,navigator.clipboard,document.fullscreenEnabledand adocument.createElementstub) and the newstage_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 ofsrc/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