Skip to content

Queue a whole podcast from its own page, not just a topic - #137

Merged
ralyodio merged 1 commit into
mainfrom
feed-queue-all
Aug 19, 2026
Merged

Queue a whole podcast from its own page, not just a topic#137
ralyodio merged 1 commit into
mainfrom
feed-queue-all

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

A podcast's own page had a play control on every episode and no way to take the whole show. QueueAll.jsx already existed and was wired into TopicPlayer alone; /api/queue spoke add-topic and remove-topic and nothing else. So "queue all" was reachable from a topic and not from the feed that the episodes actually belong to.

What changed

  • QueueAll names either a topic or a feed. Same form, same endpoint, same toggle — one branch decides which query the server re-runs. A second component would have drifted from this one.
  • /api/queue learns add-feed / remove-feed, alongside the topic pair and on the same terms: the form names the feed rather than carrying fifty guids, and the endpoint re-queries.
  • playableEntries / entryLanes / alreadyQueued move into lib/queue.js, and the feed page's literal 50 becomes FEED_QUEUE_LIMIT.

Why the shared helper

The button names the feed instead of carrying its episodes, so the page and the endpoint each work out what the press covers separately — and would disagree the moment either changed its mind about what counts. Both call the same function over the same query at the same limit, so the count on the button and the rows the press adds are the same set by construction.

Blog posts are excluded rather than queued to Read: the control says play, and quietly filling somebody's reading queue with fifty essays is not what they pressed. A feed with nothing playable draws no button at all, which is every blog in the directory.

Verified

Against production data, rendering the real pages:

  • /niche-pursuits-podcast-find-your-next-niche-business-idea renders Queue all 10, posting add-feed with the feed's slug, noting the Listen lane.
  • A blog page (/oregonwinepress-com) renders no queue-all markup at all.
  • /topics/business/play still posts add-topic with topic=business and Queue all 50 — unchanged.
  • The endpoint accepts add-feed (401 sign-in-required when signed out) and still rejects an unknown action with 400 bad-action.

pnpm -r test green across all 12 workspaces (apps/web 258, +4 new covering the filter, the lane set and the already-queued count), and pnpm build succeeds.

Not in this PR

While looking into the same page I confirmed why it shows no byline, which turned out to be unrelated: CRAWL_AUXILIARY_WRITES=0 is set on rssamplifier-poller, and that one flag gates both the topics block and the credits block in crawlFeed. It is the deliberate throughput trade apps/poller/src/index.js:108 describes, not a bug, so nothing here touches it.

🤖 Generated with Claude Code

"Queue all" existed and only a topic could reach it. QueueAll.jsx was wired
into TopicPlayer alone, and /api/queue spoke add-topic and remove-topic and
nothing else — so a show's own page offered a play control on every episode and
no way to take the show. Fifty episodes, fifty buttons, which is not a feature.

The component already did the right thing, so it names a feed as well as a
topic rather than being copied: same form, same endpoint, same toggle, and one
extra branch deciding which query the server re-runs when the form comes back.
A second component would have drifted.

What the button acts on is the one thing that had to be got right. It names the
feed rather than carrying its episodes — a form of fifty guids is four
kilobytes a stale tab can replay — so the page and the endpoint each work the
answer out separately, and would disagree the moment either changed its mind.
They call playableEntries over the same query at the same limit instead, which
is also why the page's literal 50 became FEED_QUEUE_LIMIT: the count on the
button and the rows the press adds are now the same set by construction.

Blog posts are left out rather than queued to Read. The control says play, and
quietly filling somebody's reading queue with fifty essays is not what they
pressed; a feed with nothing playable draws no button at all, which is every
blog in the directory.

Verified against production data: the podcast page renders "Queue all 10"
posting add-feed to the Listen lane, a blog page renders nothing, and the topic
player still posts add-topic exactly as before.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ralyodio
ralyodio merged commit ef9c8d2 into main Aug 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant