feat: sync GridSmart agendas and use event-relative demo time

Support script and URL sources, automatic Sessionize polling, staff-linked service sessions, chronological agenda blocks, and inline Placeholders. Fix demo mode to use the active event date and document deployed behavior with regression coverage.
This commit is contained in:
Lago committed 2026-10-11 08:39:15 +02:00
1 parent 40f24cf5f7
commit c0fbf495dc
27 files changed
+1215 -60

No files matched your search

@@ -0,0 +1,32 @@
const { test } = require('node:test');
const assert = require('node:assert/strict');
const { createSessionizePoller } = require('../src/sessionize-poller');
test('polls events sequentially and isolates upstream failures', async () => {
const calls = [];
const failures = [];
const poll = createSessionizePoller({ listEvents: async () => [{ id: 'first' }, { id: 'second' }],
isBusy: () => false, syncEvent: async id => { calls.push(id); if (id === 'first') throw new Error('unavailable'); },
onError: (error, id) => failures.push(id) });
await poll();
assert.deepEqual(calls, ['first', 'second']);
assert.deepEqual(failures, ['first']);
});
test('does not overlap manual imports or another polling pass', async () => {
let finish;
let reads = 0;
let busy = true;
const pending = new Promise(resolve => { finish = resolve; });
const poll = createSessionizePoller({ listEvents: async () => { reads++; await pending; return []; },
isBusy: () => busy, syncEvent: async () => {}, onError: () => {} });
await poll();
assert.equal(reads, 0);
busy = false;
const first = poll();
await poll();
assert.equal(reads, 1);
finish();
await first;
await poll();
assert.equal(reads, 2);
});