Skip to content

Keep the On Bluesky preview fresh - #63

Merged
hipstersmoothie merged 1 commit into
mainfrom
sesh/fresh-mention-preview
Nov 12, 2026
Merged

hipstersmoothie merged 1 commit into
mainfrom
sesh/fresh-mention-preview

Conversation

@hipstersmoothie

Copy link
Copy Markdown
Collaborator

The "On Bluesky" preview on listing pages comes from the page snapshot, which is only rebuilt when the listing, its reviews or its funding change. The mentions watcher just inserts rows, so the preview could lag the full mentions page by weeks (e.g. Mu showed posts from 2 weeks ago while /products/mu/mentions had today's).

Now each listing view runs one indexed max(post_created_at) for the listing; if a mention is newer than the snapshot, the snapshot is rebuilt in the background so the next view is current. Rebuilds are throttled to once a minute per listing and never run concurrently, and the current request isn't slowed down (the rebuild calls the Bluesky API).

Tested locally: inserting a new mention, then loading the page, rebuilt the snapshot and the next view showed the new post. Typecheck and lint pass.

🤖 Generated with Claude Code

The "On Bluesky" preview on listing pages comes from the page snapshot,
which is rebuilt when the listing, its reviews or its funding change.
The mentions watcher only inserts rows, so the preview could show posts
weeks older than the full mentions page.

On each listing view, one indexed max() checks for a mention newer than
the snapshot; if there is one, the snapshot is rebuilt in the background
(at most once a minute per listing, never concurrently) so the next view
is current without slowing this one down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hipstersmoothie
hipstersmoothie merged commit c7d7fc7 into main Nov 12, 2026
5 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