Queue a whole podcast from its own page, not just a topic - #137
Merged
Conversation
"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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A podcast's own page had a play control on every episode and no way to take the whole show.
QueueAll.jsxalready existed and was wired intoTopicPlayeralone;/api/queuespokeadd-topicandremove-topicand nothing else. So "queue all" was reachable from a topic and not from the feed that the episodes actually belong to.What changed
QueueAllnames 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/queuelearnsadd-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/alreadyQueuedmove intolib/queue.js, and the feed page's literal50becomesFEED_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-idearendersQueue all 10, postingadd-feedwith the feed's slug, noting the Listen lane./oregonwinepress-com) renders noqueue-allmarkup at all./topics/business/playstill postsadd-topicwithtopic=businessandQueue all 50— unchanged.add-feed(401sign-in-requiredwhen signed out) and still rejects an unknown action with 400bad-action.pnpm -r testgreen across all 12 workspaces (apps/web 258, +4 new covering the filter, the lane set and the already-queued count), andpnpm buildsucceeds.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=0is set onrssamplifier-poller, and that one flag gates both the topics block and the credits block incrawlFeed. It is the deliberate throughput tradeapps/poller/src/index.js:108describes, not a bug, so nothing here touches it.🤖 Generated with Claude Code