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
1 change: 1 addition & 0 deletions changelog.d/fixed-15983.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- The display-mode πŸ”— Copy link control now keeps `density=tv` and `shift=1`, so a wall screen opened with `?display=1&density=tv&shift=1` no longer loses its TV layout and burn-in shift when the link is copied; the flags are rendering-only, so no token or cookie can ride along (#15983).
2 changes: 1 addition & 1 deletion src/docs/streaming-the-activity-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ and acts only when clicked:
| Control | What it does |
|---|---|
| **βœ• Exit display** | Leaves display mode, the same as **Esc**. |
| **πŸ”— Copy link** | Copies a link to this display: `display=1`, the current `am.*` view (or the playlist's `am.view` + `interval`) and `theme`, and nothing else β€” never a token or cookie. If the clipboard is unavailable or refused, the link is shown in a selectable field instead. |
| **πŸ”— Copy link** | Copies a link to this display: `display=1`, the current `am.*` view (or the playlist's `am.view` + `interval`), `theme`, and the `density=tv` / `shift=1` display options when set, and nothing else β€” never a token or cookie. If the clipboard is unavailable or refused, the link is shown in a selectable field instead. |
| **β›Ά Full screen** | The same full screen as the header's β›Ά button. Disabled with a "not supported" tooltip where the browser has no Fullscreen API. |
| **β˜€ Keep awake** | Asks the browser to keep the screen awake (Screen Wake Lock). Shows *on*, *off*, *denied* (with the browser's reason; it is not retried automatically) or is disabled where unsupported. While on, it is re-requested when the tab becomes visible again; it is released on exit and is not remembered after a reload. |

Expand Down
8 changes: 8 additions & 0 deletions src/pkg/dashboard/stage_tracker_display.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,14 @@ test('Copy display link falls back to a selectable field when the clipboard is m
// With no parsed playlist the current view is used, whatever am.view said.
assert.deepStrictEqual(new URL(pl.api.stageTrackerDisplayLinkUrl(plHref, pl.api.filter(), 'none', null)).searchParams.getAll('am.view'), []);
assert.strictEqual(pl.api.stageTrackerDisplayLinkUrl('nope', {}, 'none', null), '');
// density=tv and shift=1 are rendering-only flags and ride along; any other value does not.
const flags = new URL(pl.api.stageTrackerDisplayLinkUrl('https://hive.example/?display=1&density=tv&shift=1&token=x', pl.api.filter(), 'none', null));
assert.strictEqual(flags.searchParams.get('density'), 'tv');
assert.strictEqual(flags.searchParams.get('shift'), '1');
assert.strictEqual(flags.searchParams.get('token'), null);
const badFlags = new URL(pl.api.stageTrackerDisplayLinkUrl('https://hive.example/?display=1&density=foo&shift=0', pl.api.filter(), 'none', null));
assert.strictEqual(badFlags.searchParams.get('density'), null);
assert.strictEqual(badFlags.searchParams.get('shift'), null);
});

test('Exit display drops display=1 like Esc and releases a held wake lock', async () => {
Expand Down
5 changes: 4 additions & 1 deletion src/pkg/dashboard/static-src/js/tracker-popout.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@
}
// Pure: the link Copy display link puts on the clipboard. Only view
// parameters ride along β€” display=1, am.* (or, given a parsed playlist,
// one am.view per accepted view plus interval) and theme β€” so no token,
// one am.view per accepted view plus interval), theme and the rendering-only
// density=tv / shift=1 flags β€” so no token,
// cookie or other query param can leak. Playlist views are re-serialised
// from the parsed { filter, group }, never echoed from the current URL.
function stageTrackerDisplayLinkUrl(href, filter, group, playlist) {
Expand All @@ -349,6 +350,8 @@
}
const theme = src.searchParams.get('theme');
if (theme !== null) out.searchParams.set('theme', theme);
if (src.searchParams.get('density') === 'tv') out.searchParams.set('density', 'tv');
if (src.searchParams.get('shift') === '1') out.searchParams.set('shift', '1');
out.hash = STAGE_TRACKER_POPOUT_HASH;
return out.toString();
}
Expand Down
5 changes: 4 additions & 1 deletion src/pkg/dashboard/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25136,7 +25136,8 @@ <h2 class="config-title" id="activity-monitor-labels-title">All labels</h2>
}
// Pure: the link Copy display link puts on the clipboard. Only view
// parameters ride along β€” display=1, am.* (or, given a parsed playlist,
// one am.view per accepted view plus interval) and theme β€” so no token,
// one am.view per accepted view plus interval), theme and the rendering-only
// density=tv / shift=1 flags β€” so no token,
// cookie or other query param can leak. Playlist views are re-serialised
// from the parsed { filter, group }, never echoed from the current URL.
function stageTrackerDisplayLinkUrl(href, filter, group, playlist) {
Expand All @@ -25154,6 +25155,8 @@ <h2 class="config-title" id="activity-monitor-labels-title">All labels</h2>
}
const theme = src.searchParams.get('theme');
if (theme !== null) out.searchParams.set('theme', theme);
if (src.searchParams.get('density') === 'tv') out.searchParams.set('density', 'tv');
if (src.searchParams.get('shift') === '1') out.searchParams.set('shift', '1');
out.hash = STAGE_TRACKER_POPOUT_HASH;
return out.toString();
}
Expand Down
Loading