feat: exclude AIB / bots-only tournaments from consumer view feed#5002
feat: exclude AIB / bots-only tournaments from consumer view feed#5002aseckin wants to merge 6 commits into
Conversation
…nsumer feed AIB (bots-only) questions are typically cross-posted in a human-facing tournament (e.g. Metaculus Cup), which produces duplicate-looking search results in the consumer view (issue #2605). Filter them out of `filter_for_consumer_view` using `Project.bot_leaderboard_status == BOTS_ONLY` — the same semantic marker the comment feed already uses to hide AIB-only comments (comments/services/feed.py:104-107). Using the flag instead of a hard-coded project id automatically covers each new quarterly AIB tournament. Co-authored-by: aseckin <3686968+aseckin@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughBackend consumer-view filtering now receives search context, relaxes curation constraints during searches, and always excludes posts from bots-only projects. Frontend feed filter detection no longer treats text search as an explicit feed filter, changing when ChangesConsumer view filtering
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 Preview EnvironmentYour preview environment is ready!
Details
ℹ️ Preview Environment InfoIsolation:
Limitations:
Cleanup:
|
|
@claude search results in consumer view still display questions from the AIB tournament |
|
Claude finished @aseckin's task in 2m 9s —— View job Root cause found and fixed
The AIB exclusion in this PR is correct — the bug is that What was happeningIn
So the moment a consumer‑view user typed anything in search, the FixRemoved This preserves the existing "search across everything" behavior for other explicit filters and for Commit: Manual test plan
|
Text search was in EXPLICIT_FEED_FILTER_KEYS, so any search set hasExplicitFeedFilter=true and dropped for_consumer_view from the API call. That bypassed filter_for_consumer_view on the backend, letting AIB, resolved, and CP-hidden posts appear in search results for consumer-view users. Consumer view is a role-based constraint (user.interface_type === ConsumerView), not a browsing mode — searching shouldn't unset it. Co-authored-by: aseckin <3686968+aseckin@users.noreply.github.com>
|
@claude searching in consumer view should still return resolved questions |
|
Claude finished @aseckin's task in 1m 6s —— View job Done — resolved posts now included in consumer-view search
Change
Commit: Manual test plan
|
When a user is searching in consumer view they should still be able to find questions by title regardless of resolution state — otherwise a question they remember reading about disappears the moment it resolves. Co-authored-by: aseckin <3686968+aseckin@users.noreply.github.com>
Consumer view hid notebooks outside programs/research, CP-pending questions and resolved questions from search, not just from the feed. Those filters curate what we offer someone browsing; when the user is searching they are looking up something specific, so they only produce dead ends. In practice the notebook filter was mostly hiding Metaculus' own editorial content (Pathways, Journal, meta, platform) from search. Replace include_resolved with an is_search flag that relaxes all three. The bots-only exclusion is a dedupe rather than curation — those posts are cross-posted into a human-facing project — so it now always applies, keeping the #2605 fix intact under search. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Closes #2605.
Summary
AIB (bots-only) tournament questions are typically cross-posted into a human-facing tournament (e.g. Metaculus Cup), which produces duplicate-looking search results in consumer view. This PR excludes them from
filter_for_consumer_viewusing the existingProject.bot_leaderboard_status == BOTS_ONLYmarker — the same signal the comment feed already uses (seecomments/services/feed.py:104-107).Using the flag rather than a hard-coded project id means new quarterly AIB tournaments (aibq5, aibq6, …) are automatically covered.
Test plan
Generated with Claude Code
Summary by CodeRabbit