Skip to content

fix(feed): only show LinkedIn posts that mention Dev Weekends - #85

Merged
junaiddshaukat merged 1 commit into
mainfrom
fix/feed-verify-posts
Nov 1, 2026
Merged

junaiddshaukat merged 1 commit into
mainfrom
fix/feed-verify-posts

Conversation

@junaiddshaukat

Copy link
Copy Markdown
Member

Why

Some posts on /feed never mention Dev Weekends, for example Arslan's Redis post. Search results were trusted when their snippet mentioned Dev Weekends, but snippets can quote text from around the post: the author's headline, comments, or other posts on the page.

What changes

  • New posts are checked before going live. For each new search result, we load the post's public LinkedIn embed (the same page /feed shows) and look for a Dev Weekends mention in the post's own text, leaving out the author's headline.
    • Mentions Dev Weekends: goes live.
    • No mention: saved as hidden with the reason, so it isn't fetched again on every search.
    • Deleted on LinkedIn: skipped.
    • LinkedIn wouldn't load it: goes to Pending review.
  • New admin button, "Check live posts". It runs the same check on posts that are already live from the starter list and search, and hides the ones that fail. The reason shows on each hidden post. Hiding can be undone (Approve). It uses no Olostep credits. Posts that admins added or approved are left alone.
  • Removed 3 starter posts that don't mention Dev Weekends.

Testing

  • Ran the new check on all 272 production posts. This only read the LinkedIn pages and changed nothing in the database. 254 mention Dev Weekends, 16 don't, and 2 were deleted. That matches the list I checked by hand.
  • On a local copy of the 272 posts, clicked "Check live posts" in a headless browser. It hid the expected 17 posts (one was marked admin-added and stayed live). A second run found nothing to do, a re-approved post stayed live, and the action returns 401 without the admin login.
  • Ran the collector against the local copy with fake Olostep results and real LinkedIn checks. The post with a mention went live, the two without went to hidden, the deleted one wasn't saved, and the one where LinkedIn returned 429 went to Pending review.
  • tsc and next lint pass.

After merging

Open Admin → Community Feed and click Check live posts. It takes about a minute and should hide 18 posts.

🤖 Generated with Claude Code

Search snippets can quote text from around a post (the author's headline,
comments, other posts), so some posts that never mention Dev Weekends
reached /feed.

- New posts from search are checked against their public LinkedIn embed.
  They go live only when the post's own text mentions Dev Weekends.
  Posts without a mention are kept hidden with the reason, deleted posts
  are skipped, and posts LinkedIn won't load wait in Pending review.
- "Check live posts" in the admin runs the same check on posts already
  live from the starter list and search, and hides the ones that fail.
  Admin-added and admin-approved posts are left alone.
- Remove 3 starter posts that don't mention Dev Weekends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@junaiddshaukat
junaiddshaukat merged commit f974090 into main Nov 1, 2026
2 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