Skip to content

fix: main-feed filter handling unlisted posts#4876

Draft
cemreinanc wants to merge 1 commit into
mainfrom
codex/fix-unlisted-main-feed
Draft

fix: main-feed filter handling unlisted posts#4876
cemreinanc wants to merge 1 commit into
mainfrom
codex/fix-unlisted-main-feed

Conversation

@cemreinanc

@cemreinanc cemreinanc commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Stop UI-generated feed links from using for_main_feed=false for category, topic, leaderboard, storefront, discovery, and fallback feed links.
  • Keep normal feed/text search constrained to main-feed-visible posts by default.
  • Preserve the for_main_feed=false bypass only for explicit ids= lookups, so direct ID searches can still find link-accessible posts.

Why
Unlisted projects should behave like real unlisted content: accessible by direct link, but not exposed through normal site browsing/search surfaces. Several UI paths were generating for_main_feed=false, which could surface posts from unlisted or non-main-feed projects.

Testing

  • bun run test -- --runTestsByPath 'src/app/(main)/questions/helpers/__tests__/filters.test.ts'
  • bunx eslint ... on touched frontend files

bun run lint:types still fails due to existing unrelated .next labor-hub generated type references and geo/topojson type issues.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0a82964e-093e-4762-9af6-fdfaccc09e9f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-unlisted-main-feed

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview Environment

Your preview environment is ready!

Resource Details
🌐 Preview URL https://metaculus-pr-4876-codex-fix-unlisted-main-feed-preview.mtcl.cc
📦 Docker Image ghcr.io/metaculus/metaculus:codex-fix-unlisted-main-feed-d8ebe0b
🗄️ PostgreSQL NeonDB branch preview/pr-4876-codex-fix-unlisted-main-feed
Redis Fly Redis mtc-redis-pr-4876-codex-fix-unlisted-main-feed

Details

  • Commit: d8ebe0b0ed69309054dda5a31fa40130a1e24e68
  • Branch: codex/fix-unlisted-main-feed
  • Fly App: metaculus-pr-4876-codex-fix-unlisted-main-feed

ℹ️ Preview Environment Info

Isolation:

  • PostgreSQL and Redis are fully isolated from production
  • Each PR gets its own database branch and Redis instance
  • Changes pushed to this PR will trigger a new deployment

Limitations:

  • Background workers and cron jobs are not deployed in preview environments
  • If you need to test background jobs, use Heroku staging environments

Cleanup:

  • This preview will be automatically destroyed when the PR is closed

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