Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- **Activity Monitor URL views and display mode.** Every Activity Monitor filter can now be described in `am.*` URL parameters (`am.kind`, `am.repo`, `am.q`, `am.labels`, `am.group`, …), so a link reproduces the same view in a fresh browser profile; a tab opened with `am.*` keeps its filter to itself and never overwrites the saved one. A new 📺 header button (or `?display=1`) turns the monitor into an attended wall view with no row actions, left with Esc or `d`; it never requests full screen or a wake lock, grants nothing, and `?kiosk=1` is unchanged ([#15924](https://github.com/hivecommons/hive/issues/15924), [#15925](https://github.com/hivecommons/hive/issues/15925)).
9 changes: 7 additions & 2 deletions src/docs/dashboard-sections/activity-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,20 @@ The monospace **engine enforce · N anomalies** strip describes the [central sta

### Monitor controls and detailed reference

#### Pop out and full screen (⧉ / ⛶ on the card header)
#### Pop out, full screen and display (⧉ / ⛶ / 📺 on the card header)

Two buttons sit beside the ⚙ gear on the card header for working with the monitor on its own ([#15829](https://github.com/hivecommons/hive/issues/15829)):
Three buttons sit beside the ⚙ gear on the card header for working with the monitor on its own ([#15829](https://github.com/hivecommons/hive/issues/15829)):

- **⧉ Pop out** opens the dashboard in a new browser window named `hive-activity-monitor` (1600×900 by default; drag it to another monitor). The window loads `?popout=1#section-activity-monitor-section`: no sidebar, topbar, notices, chat or other sections — just the tracker filling the viewport, with live updates, toasts, sounds, the Merged bee and the ⚙ settings all working. It uses the same saved sign-in as the main window, so there is no second login; its title is `Hive · Activity Monitor · <hive id>`; and reloading it keeps the layout because the flag lives in the URL. The small **⤶ Return to dashboard** pill brings the main window forward and closes the pop-out (a tab you opened by hand on that URL navigates back to the full dashboard instead). If the browser blocks the popup, a toast says so — allow pop-ups for the dashboard's origin and try again.
- **⛶ Full screen** puts the page into the browser's full-screen mode with the same tracker-only layout; the button reads **⛶ Exit full screen** while active, and **Esc** leaves as usual. With focus inside the monitor (or anywhere in a pop-out) the **f** key toggles it too; it is ignored while typing in a field or with a modifier held.
- **📺 Display** reloads the page with `?display=1` added (any other query, such as `am.*` or `theme`, is kept): the same tracker-only layout as a wall view for an attended screen ([#15925](https://github.com/hivecommons/hive/issues/15925)). The cursor stays and sound keeps your setting, but the row ⋯ and select tools, the right-click menu, the selection bar and the decision actions are hidden — a wall offers no actions. It is presentation only: it grants nothing, and the server still authorizes every request with your own sign-in. **Esc** (outside browser full screen) or **d** leaves; **d** with focus in the monitor also enters. Esc closes an open popover or dialog first (the merged and queue popovers, the settings and labels dialogs, any confirmation) and leaves only on a bare page, so a session-only `am.*` edit is never dropped by dismissing a popover. Display mode never requests full screen or a wake lock and never writes the theme or layout to local storage. With `?kiosk=1` present, kiosk wins and 📺 is hidden.

Neither mode changes any saved preference. Kiosk mode (`?kiosk=1`, [Streaming the activity monitor](../streaming-the-activity-monitor.md)) is the unattended cousin of pop-out: same layout, no cursor, no controls.

#### URL views (`am.*`)

`am.*` query parameters describe a filter, so a link reproduces the same view in a fresh browser profile ([#15924](https://github.com/hivecommons/hive/issues/15924)): `am.kind` (`pr`/`issue`), `am.repo`, `am.q`, `am.labels` (comma-separated), `am.needsHuman=1`, `am.onHold=1`, `am.attention=1`, `am.age`, `am.author`, `am.acted`, `am.sort`, `am.dir` (`asc`) and `am.group` (`repo`). For example `?am.kind=pr&am.repo=hivecommons/hive&am.group=repo`. Unknown values fall back to the default. When any `am.*` parameter is present it wins over the saved filter, and changes in that tab stay in the tab — nothing is written to local storage, so two screens on one profile cannot overwrite each other. Without `am.*` the saved filter works as before. Waiting on you stays on `?filter=waiting-on-you`. A link describes a view; it does not grant access. Details: [Streaming the activity monitor](../streaming-the-activity-monitor.md#display-mode-and-url-views).

#### Filter chips (Needs human / On hold / labels)

The label row under the toolbar starts with two synthetic chips, then one chip per label the listed items carry. **🙋 Needs human** means a person's decision or action is the *only* thing that advances the row: an issue at `015` triage-needed, `045` or `085` needs-decision, a PR at `090` ready-for-human-merge, a PR at `071`/`072` whose author is a human, or any row wearing a `needs human` / `needs human decision` / `unauthorized` pill.
Expand Down
37 changes: 37 additions & 0 deletions src/docs/streaming-the-activity-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,43 @@ dashboard section, and renders dark regardless of any stored theme
(append `&theme=light` for a light stream). Do not point the streamer at a hive tracking private
repositories without reviewing what the tracker would show.

## Display mode and URL views

For an attended screen (a wall monitor or TV someone can walk up to), use
**display mode** instead of kiosk: press **📺** on the Activity Monitor header,
or open `/?display=1`. It uses the same tracker-only layout but keeps the
cursor and your sound setting, hides every row action, and is left with
**Esc** or **d**. It never requests full screen or a wake lock. `?kiosk=1`
is unchanged and wins when both flags are present.

Any Activity Monitor filter can be described in the URL with `am.*`
parameters, so a display link reproduces the view in a fresh browser profile:

| Parameter | Values |
|---|---|
| `am.kind` | `pr`, `issue` (default all) |
| `am.repo` | `owner/name` |
| `am.q` | free text |
| `am.labels` | comma-separated label names |
| `am.needsHuman`, `am.onHold`, `am.attention` | `1` |
| `am.age` | `1h`, `1d`, `1w`, `stale` |
| `am.author` | `human`, `clanker`, `hive` |
| `am.acted` | `awaiting`, `acted`, `stuck` |
| `am.sort` | `furthest`, `waiting`, `newest`, `number` |
| `am.dir` | `asc` (default `desc`) |
| `am.group` | `repo` (default `none`) |

Example: `/?display=1&am.kind=pr&am.repo=hivecommons/hive&am.group=repo#section-activity-monitor-section`.
Unknown values fall back to the default. When any `am.*` parameter is present
it wins over the browser's saved filter, and that tab never writes its filter
or grouping back to local storage. Waiting on you is per user and stays on
`?filter=waiting-on-you`.

A link describes a view; it does not grant access. The viewer still signs in
with their own access, and display mode grants no extra privileges. Do not
put a display that tracks private repositories where people without access
can see it without reviewing what the tracker would show.

## Quick manual test with OBS (no cluster)

1. In OBS add a **Browser** source, 1920×1080, URL
Expand Down
34 changes: 34 additions & 0 deletions src/pkg/dashboard/kiosk_mode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,40 @@ func TestKioskModeWiring(t *testing.T) {
}
}

// TestDisplayModeWiring guards the attended `?display=1` wall view (#15925):
// boot.js reads the flag before first paint and sets body.display-mode, kiosk
// wins when both flags are present so the headless streamer's output never
// changes, the 📺 header tool is a .ham-header-tool that kiosk hides, and
// entering display mode never requests full screen or a wake lock.
func TestDisplayModeWiring(t *testing.T) {
html := indexHTML(t)
for _, want := range []string{
`display=u.searchParams.get('display')==='1';`,
`window.HIVE_DISPLAY=display&&!kiosk;`,
`window.hiveDisplayMode=function(){ return !!window.HIVE_DISPLAY; };`,
"if(window.HIVE_DISPLAY){\n document.body.classList.add('display-mode');",
`class="config-info section-settings-gear ham-header-tool ham-display-btn" id="activity-monitor-display"`,
`body.kiosk-mode .ham-header-tool, body.kiosk-mode .ham-popout-return { display: none !important; }`,
} {
if !strings.Contains(html, want) {
t.Errorf("index.html missing display-mode wiring %q", want)
}
}
// Kiosk keeps its own branch: display mode never adds popout-mode or
// touches the kiosk class.
if !strings.Contains(html, "if(kiosk){\n document.body.classList.add('kiosk-mode');\n }else if(window.HIVE_POPOUT){") {
t.Error("boot.js kiosk/popout branch changed")
}
for _, fn := range []string{"toggleStageTrackerDisplay", "stageTrackerDisplayUrl", "stageTrackerDisplayHotkey"} {
if body := jsFunc(t, html, fn); strings.Contains(body, "requestFullscreen") || strings.Contains(body, "wakeLock") {
t.Errorf("%s must not request full screen or a wake lock:\n%s", fn, body)
}
}
if strings.Contains(html, `localStorage.setItem('hive-display`) {
t.Error("display mode must not persist state in localStorage")
}
}

// TestKioskSoundDefault guards the streamer's audio path: in kiosk mode the
// tracker sounds are on unless the URL says `&sound=off`, the context is
// resumed at init without waiting for a gesture (the streamer's Chromium
Expand Down
Loading
Loading