Improve messaging and dashboard reliability

This commit is contained in:
jjbrunton committed 2026-08-08 21:09:20 +01:00
1 parent 345ec99348
commit 5a5a30a1d4
20 files changed
+406 -56

No files matched your search

+5 -3
View File
@@ -122,7 +122,7 @@ describe('createExpressSseHandler', () => {
]);
});
it('replays the full available window when Last-Event-ID is absent', () => {
it('starts at the live edge when Last-Event-ID is absent', () => {
const hub = createHub();
hub.publish('log.created', { level: 'info', message: 'one' });
hub.publish('log.created', { level: 'warn', message: 'two' });
@@ -134,10 +134,12 @@ describe('createExpressSseHandler', () => {
vi.fn(),
);
expect(response.frames).toEqual([': connected\n\n']);
hub.publish('log.created', { level: 'info', message: 'live' });
expect(response.frames.map((frame) => frame.split('\n')[0])).toEqual([
': connected',
'id: event-1',
'id: event-2',
'id: event-3',
]);
});