
The URL dashboard writes its own weekly recap now
For as long as Doorman Mike has been on the door, he has logged every URL anyone drops in the group chat: the link, a scraped title, a preview image if the page had one, and a short summary of what's behind it. KevTools has a page that lists all of them, and until this week the top of that page was a set of charts answering the question "which domains do we share the most?"
The answer, it turns out, is YouTube. It was YouTube last month and it will be YouTube next month. I had a table of top domains, a bar chart of top domains, a table of recent share counts, and a pie chart that wasn't even wired up to the page anymore. Four components, 477 lines, all confirming what everyone in the chat already knew.
So I deleted them and built two cards instead.
A summary of summaries#
The first card is a weekly digest: a short AI-written recap of what the group shared that week. One intro paragraph, then three to five bullets grouping the links into themes. Doorman Mike already writes a one-line summary of every URL as it comes in, so this is literally a summary of summaries, which sounds like a joke about middle management but works surprisingly well as an input format. The prompt caps it at 150 links per week and truncates each per-URL summary to 300 characters, and it tells the model to mention people by first name when it adds color. That last instruction is the difference between a report and a recap.
Generation runs on Cloudflare Workers AI through the native AI binding, so there's no new API key and no new secret to manage. The model is Llama 3.3 70B, the fp8-fast variant. Workers AI bills in "neurons," and every account gets 10,000 free ones a day; a busy week's digest costs somewhere between 500 and 1,500 to generate. Most days it costs zero, because most days there's nothing new to generate.
That "most days zero" is the part I actually care about. Each digest row stores a fingerprint of its inputs: how many links fell in the week, and the timestamp of the newest one. A cron job runs nightly just after midnight Chicago time, compares the live fingerprint to the stored one, and only calls the model when new links have shown up. No new links, no model call. It's the same boring shape as every other sync job in KevTools, which is exactly why I trust it.
One wrinkle: each run checks both the current week and the previous one. Weeks run Monday through Sunday, so a link shared Sunday evening lands after that week's last nightly run. By Monday morning the cron considers it "last week," and without the second check it would never make it into any digest. On quiet days the extra check is one cheap query.
Trusting the model exactly as far as I have to#
I told the model precisely what shape to produce: one paragraph, a blank line, then bullets starting with - . Plain text, no other markdown, no links, no "Here is the digest" throat-clearing. Constraining the output that hard means the card can render it with a dumb little line parser. Non-bullet blocks become paragraphs, runs of bullet lines become a list, and that's it. No markdown library, no dangerouslySetInnerHTML, nothing for a weird completion to break out of. The parser still tolerates an extra paragraph or two, because the model will occasionally produce one no matter what the prompt says.
If the output comes back empty or suspiciously short, it gets thrown away and the previous digest stays put. The last good digest always survives, and the next night's run retries. Each row also records which model wrote it, so future me can tell which era of digest he's reading.
Workers AI has no local simulator, so prompt tuning happened the honest way: an admin-only endpoint that force-regenerates the digest in production, and me hitting it over and over while editing the prompt. Not glamorous, but the loop was fast enough.
The slot machine of group chat memories#
The second card is simpler and might be my favorite. Doorman Mike has been scraping preview images off shared links for years, so the archive is full of them. On every page load the card pulls one at random from the entire history (ORDER BY random() LIMIT 1, no cleverness) and shows it with the original title, who shared it, and when, linking back to the source. One reload it's a news photo from 2019, the next it's a thumbnail from some video I have no memory of anyone posting.
Some of those image URLs have been dead for years, because the internet rots. The card catches the load error and swaps in a placeholder instead of letting the layout collapse, which matters when your data source is a decade of link previews of varying provenance.
Digests are kept forever, one row per week, so an archive builds up from launch week forward. I didn't backfill; history starts now. At some point I'll probably add a page for browsing past weeks, since the table already supports it. For now, the group gets a weekly recap nobody asked for, written by a robot, about the links they shared themselves. Doorman Mike would be proud.
Comments