Stop the ads stacking on top of the feed, and give them something to show - #104
Merged
Merged
Conversation
…show Two problems, reported from /topics/rust.rss. **All three ads sat at the top.** Document order was right -- 10, 21, 32 -- and document order is the half that does not matter. Readers sort by date, and the ads were dated to the start of the current UTC day by crawlproof's default identity rotation, which is *newer than the river itself*: this is a directory of other people's blogs and the newest post is routinely a day or more old. So all three sorted above every real post, and because they shared one timestamp they arrived as a block of three adverts at the top of the feed. Precisely the thing nobody opens. The original reasoning was that dating an ad to the period start stops it jumping up the sort order on every rebuild. True, and beside the point: it parks the ad at the top permanently instead of intermittently. Each ad is now re-dated to one second behind the post it follows, so document order and reader order agree and the ads are spread through the river rather than stacked on it. A test sorts the finished document by date and asserts nothing moves. Re-dating is safe because identity is the guid, not the date -- a reader that already stored the item keeps the date it first saw. An undated neighbour leaves the ad's own date alone. Plenty of rows genuinely have no date, and inventing one for the neighbour would be worse. **They looked like spam.** These items sit between real blog posts that each have a headline, a picture and a few paragraphs; a bare sponsored line next to them does not read as restrained, it reads as broken. So the feeds now ask for style=card -- the advertiser's own artwork, headline, body and call to action -- and carry image_url through as well, because many readers render only a thumbnail in list view and the item with no picture is the one that looks like filler. Nothing here invents copy. The body stays whatever the advertiser wrote (76 characters on average); what changed is the layout around it. 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.
Two problems, both reported from
/topics/rust.rss.All three ads sat at the top
Document order was right — 10, 21, 32 — and document order is the half that does not matter.
Readers sort by date. The ads were dated to the start of the current UTC day by crawlproof's default identity rotation, which is newer than the river itself: this is a directory of other people's blogs and the newest post is routinely a day or more old. Measured on the live feed:
So all three sorted above every real post, and because they shared one timestamp they arrived as a block of three adverts at the top of the feed. Precisely the thing nobody opens.
The original reasoning was that dating an ad to the period start stops it jumping up the sort order on every rebuild. True, and beside the point: it parks the ad at the top permanently instead of intermittently.
Fix: each ad is re-dated to one second behind the post it follows, so document order and reader order agree. A test sorts the finished document by date and asserts nothing moves.
Re-dating is safe because identity is the guid, not the date — a reader that already stored the item keeps the date it first saw. An undated neighbour leaves the ad's own date alone: plenty of rows genuinely have no date, and inventing one for the neighbour would be worse.
They looked like spam
These items sit between real blog posts that each have a headline, a picture and a few paragraphs; a bare sponsored line next to them does not read as restrained, it reads as broken.
The feeds now request
style=card— the advertiser's own artwork, headline, body and call to action — and carryimage_urlthrough as well, because many readers render only a thumbnail in list view and the item with no picture is the one that looks like filler.Nothing here invents copy. The body stays whatever the advertiser wrote (76 characters on average); what changed is the layout around it.
Verification
All 11 workspaces pass (4 new tests),
next buildclean. Needs profullstack/crawlproof.com#201 for the card artwork.🤖 Generated with Claude Code