Skip to content

Stop the ads stacking on top of the feed, and give them something to show - #104

Merged
ralyodio merged 1 commit into
mainfrom
feed-ads-polish
Aug 18, 2026
Merged

ralyodio merged 1 commit into
mainfrom
feed-ads-polish

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

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:

ads          Tue, 18 Aug 2026 00:00:00 GMT   x3, identical
newest post  Mon, 17 Aug 2026 00:00:00 GMT

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 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.

Verification

All 11 workspaces pass (4 new tests), next build clean. Needs profullstack/crawlproof.com#201 for the card artwork.

🤖 Generated with Claude Code

…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>
@ralyodio
ralyodio merged commit b6ae7d2 into main Aug 18, 2026
2 checks passed
@ralyodio
ralyodio deleted the feed-ads-polish branch August 18, 2026 15:32
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