Repository navigation
Keep the On Bluesky preview fresh - #63
Merged
Merged
Conversation
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>
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.
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