An OPML's page lists its shows' items together, not the shows (#283)
GET /api/feeds/{id}/entries for an OPML or a Patreon creator now lists the
items of the shows in it the person subscribes to, as All Subscriptions does
every feed's. The shows are looked up first and queried by list: an OR with a
subquery, or an IN over one, made a single feed's page a sequential scan of
entries (clarkesworld 10 ms to 26 ms or a second, EXPLAIN on production), so a
single feed keeps its `feed_id = $1`.
The page draws the OPML with its own header and the item list, tabs, search
and sort of any feed, with the feed column showing which show each is from.
A show's scan or change refreshes its OPML's list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -447,9 +447,12 @@ test('an OPML subscription is a collapsible folder', async ({ page }) => {
|
||||
// Scoped to the sidebar: the name also appears as the page heading once selected.
|
||||
await expect(page.locator('#feedlist').getByText('Grouped Show')).toBeVisible();
|
||||
|
||||
// The subscription's own page lists what is inside it.
|
||||
// The subscription's own page lists the items of the shows inside it, together (#283).
|
||||
await page.locator('.feed', { hasText: 'Test Subscriptions' }).first().click();
|
||||
await expect(page.locator('.childrow')).toHaveCount(2);
|
||||
await page.locator('#content .tabs button[data-f="all"]').click();
|
||||
await expect(page.locator('.ep', { hasText: 'Aardvark Ep' })).toBeVisible();
|
||||
await expect(page.locator('.ep', { hasText: 'Grouped Ep' })).toBeVisible();
|
||||
await expect(page.locator('.childrow')).toHaveCount(0);
|
||||
});
|
||||
|
||||
test('inside an OPML, feeds with unread items are listed first', async ({ page }) => {
|
||||
@@ -482,8 +485,11 @@ test('inside an OPML, feeds with unread items are listed first', async ({ page }
|
||||
await page.reload();
|
||||
const want = ['Grouped Show', 'Aardvark Radio'];
|
||||
await expect(page.locator('#feedlist .feed.child b')).toHaveText(want, { timeout: 20_000 });
|
||||
// The OPML's Unread tab has the unread show's item and not the read one's (#283).
|
||||
await page.locator('.feed', { hasText: 'Test Subscriptions' }).first().click();
|
||||
await expect(page.locator('.childrow b')).toHaveText(want);
|
||||
await page.locator('#content .tabs button[data-f="unread"]').click();
|
||||
await expect(page.locator('.ep', { hasText: 'Grouped Ep' })).toBeVisible();
|
||||
await expect(page.locator('.ep', { hasText: 'Aardvark Ep' })).toHaveCount(0);
|
||||
});
|
||||
|
||||
test('a show inside an OPML can be kept, and only it', async ({ page }) => {
|
||||
@@ -511,7 +517,7 @@ test('a show inside an OPML can be kept, and only it', async ({ page }) => {
|
||||
|
||||
// The OPML itself has no Keep.
|
||||
await page.locator('.feed', { hasText: 'Test Subscriptions' }).first().click();
|
||||
await expect(page.locator('.childrow').first()).toBeVisible();
|
||||
await expect(page.locator('#content h2')).toHaveText('Test Subscriptions');
|
||||
await expect(page.locator('#content [data-a="keep"]')).toHaveCount(0);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user