From 902c02879d7fd8196f9107a221531405f8eda46a Mon Sep 17 00:00:00 2001 From: Kyle James Walker Date: Tue, 1 Sep 2026 06:39:47 -0700 Subject: [PATCH] feat(web): link the agenda from the picker and the console The server has routed //agenda since the first release, and the README lists it. Nothing in the interface pointed at it. An operator had to know the path and type it. Backstage crew and speakers, the readers the page exists for, could not reach it at all. roomLinks now returns the agenda alongside the viewer and the console. The picker shows it as a third field and lists it against every live room. The console bar carries an open agenda link beside open viewer. The link carries no token. The route does not ask for one. Adding it would leak the operator token to a page anyone backstage may open. --- web/console.html | 1 + web/console.js | 1 + web/picker.html | 7 ++++++- web/picker.js | 6 +++++- web/picker.test.mjs | 5 +++++ web/shared.js | 1 + 6 files changed, 19 insertions(+), 2 deletions(-) diff --git a/web/console.html b/web/console.html index 1c2d372..9375104 100644 --- a/web/console.html +++ b/web/console.html @@ -11,6 +11,7 @@
diff --git a/web/console.js b/web/console.js index 3c955b3..56c5940 100644 --- a/web/console.js +++ b/web/console.js @@ -15,6 +15,7 @@ const room = roomFromPath(); document.title = `${room} — console`; el('roomName').textContent = room; el('viewerLink').href = `/${room}`; +el('agendaLink').href = `/${room}/agenda`; const QUICK_MINUTES = [5, 10, 15, 20, 30]; const TONES = ['neutral', 'warn', 'alert']; diff --git a/web/picker.html b/web/picker.html index 2385a38..4ad3dd2 100644 --- a/web/picker.html +++ b/web/picker.html @@ -45,8 +45,13 @@

Point the stage display here

Console +

- The viewer needs no token. Keep the console link to yourself. + The viewer and the agenda need no token. Keep the console link to + yourself.

diff --git a/web/picker.js b/web/picker.js index 6f88bda..9854c6d 100644 --- a/web/picker.js +++ b/web/picker.js @@ -10,6 +10,7 @@ function showLinks(room) { const links = urls(room); el('viewerUrl').value = links.viewer; el('consoleUrl').value = links.console; + el('agendaUrl').value = links.agenda; el('qr').src = `/api/qr?text=${encodeURIComponent(links.viewer)}`; el('linksPanel').hidden = false; } @@ -68,13 +69,16 @@ async function loadRooms() { const edit = document.createElement('a'); edit.href = urls(room).console; edit.textContent = 'console'; + const agenda = document.createElement('a'); + agenda.href = `/${room}/agenda`; + agenda.textContent = 'agenda'; const remove = document.createElement('button'); remove.type = 'button'; remove.className = 'removeRoom'; remove.textContent = 'delete'; remove.addEventListener('click', () => deleteRoom(room)); - item.append(name, view, edit, remove); + item.append(name, view, edit, agenda, remove); list.append(item); } } catch { diff --git a/web/picker.test.mjs b/web/picker.test.mjs index 102f0ab..6576a58 100644 --- a/web/picker.test.mjs +++ b/web/picker.test.mjs @@ -38,6 +38,11 @@ test('builds a console link that carries the token', () => { assert.equal(links.console, 'http://192.168.1.20:8080/keynote/edit?token=s3cret'); }); +test('builds an agenda link that carries no token', () => { + const links = roomLinks('http://192.168.1.20:8080', 'keynote', 's3cret'); + assert.equal(links.agenda, 'http://192.168.1.20:8080/keynote/agenda'); +}); + test('omits the query when there is no token', () => { const links = roomLinks('http://host', 'keynote', ''); assert.equal(links.console, 'http://host/keynote/edit'); diff --git a/web/shared.js b/web/shared.js index 470411f..cbe3cd5 100644 --- a/web/shared.js +++ b/web/shared.js @@ -309,6 +309,7 @@ export function roomLinks(origin, room, token) { return { viewer: `${origin}/${room}`, console: `${origin}/${room}/edit${suffix}`, + agenda: `${origin}/${room}/agenda`, }; }