Signal counts kept current on the page: after a read, and when Jev picks something out (#258)
The page fetched the Signals' unread counts only with the feed list, so reading an item, here or in its own feed, left its Signal's badge as it was, and so did Jev adding one. The Apple Signal said 2 unread over a page with none. The page now fetches them again after a read or unread lands, and on a new signal_hits event, which the judge sends once a pass for each person it found items for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2099,6 +2099,8 @@ test('a Signal holds the items Jev says fit its keywords, read where they are re
|
||||
await expect.poll(async () => (await (await page.request.get(`/api/entries/${encodeURIComponent(feed)}/sig-1`)).json()).read,
|
||||
{ timeout: 5_000 }).toBe(true);
|
||||
expect((await signals()).find(s => s.id === sg.id).unread).toBe(0);
|
||||
// And the sidebar says so without a reload: it kept saying 1 (#258).
|
||||
await expect(row.locator('.badge')).toHaveText('0');
|
||||
|
||||
expect((await page.request.get(`/api/signals/${sg.id + 1000}/entries`)).status(), 'no such Signal').toBe(404);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user