Skip to content

fix: scope Personal feed filter to personal projects only#4969

Open
aseckin wants to merge 3 commits into
mainfrom
claude/issue-1520-personal-filter-shouldnt-have-private
Open

fix: scope Personal feed filter to personal projects only#4969
aseckin wants to merge 3 commits into
mainfrom
claude/issue-1520-personal-filter-shouldnt-have-private

Conversation

@aseckin

@aseckin aseckin commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Closes #1520

Summary

The "Personal" toggle on the "My questions and posts" feed previously sent access=private, which on the backend matches every post whose default project has no default_permission — i.e. private tournaments and other private projects as well as personal projects. Users saw non-personal private questions under the "Personal" chip.

This introduces a dedicated personal access value that filters strictly by default_project.type == PERSONAL_PROJECT, and wires the frontend "Personal" filter to it. The existing access=private behavior is unchanged.

Changes

  • posts/serializers.py — add PERSONAL to PostFilterSerializer.Access.
  • posts/models.py — add Post.objects.filter_personal().
  • posts/services/feed.py — route access=personal to the new filter.
  • front_end/.../my_questions_and_posts.tsx — send access=personal.

Test plan

  • Backend tests pass (pytest).
  • Frontend typecheck/lint pass.
  • Manually verify: on the "My questions and posts" feed, toggling "Personal" shows only questions whose default project is a personal project, and not questions in private tournaments.

Generated with Claude Code

The "Personal" toggle in the "My questions and posts" feed previously
sent `access=private`, which matched every post whose default project
had no default_permission — including private tournaments and other
private projects, not just personal projects. Introduce a dedicated
`personal` access value backed by a `Post.filter_personal()` manager
method that filters by `default_project.type == PERSONAL_PROJECT`, and
switch the frontend filter to use it.

Closes #1520

Co-authored-by: Sylvain <SylvainChevalier@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 1, 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: 33c3b02a-c032-47b1-b76b-e730d2998e0e

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:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-1520-personal-filter-shouldnt-have-private

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.

Collapse filter_personal()'s return to a single line and replace the
three sequential access-filter if-branches with a dict dispatch so
get_posts_feed stays under the C901 complexity limit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aseckin aseckin requested a review from hlbmtc July 1, 2026 10:07
@aseckin

aseckin commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

QA passed, pending code review @hlbmtc

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview Environment

Your preview environment is ready!

Resource Details
🌐 Preview URL https://metaculus-pr-4969-claude-issue-1520-personal-fil-preview.mtcl.cc
📦 Docker Image ghcr.io/metaculus/metaculus:claude-issue-1520-personal-filter-shouldnt-have-private-c683d8e
🗄️ PostgreSQL NeonDB branch preview/pr-4969-claude-issue-1520-personal-fil
Redis Fly Redis mtc-redis-pr-4969-claude-issue-1520-personal-fil

Details

  • Commit: fcc1e24faa301430f342314d7f0db5c760801d60
  • Branch: claude/issue-1520-personal-filter-shouldnt-have-private
  • Fly App: metaculus-pr-4969-claude-issue-1520-personal-fil

ℹ️ 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

@aseckin aseckin marked this pull request as ready for review July 2, 2026 12:22
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.

Personal filter shouldn't have private questions

1 participant