Post feed status filter include subquestions#4036
Conversation
# Conflicts: # posts/jobs.py
📝 WalkthroughWalkthroughThis PR refactors the feed filtering logic to support subquestions in filter and sort operations by introducing explicit EXISTS-based subqueries and database indexes. It adds QuerySet helper methods for user forecasting checks, restructures status filtering logic in the feed service, and optimizes queries with four new partial indexes on the Question model. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used🧬 Code graph analysis (2)questions/models.py (2)
posts/services/feed.py (6)
🪛 Ruff (0.14.11)questions/models.py389-412: Mutable class attributes should be annotated with (RUF012) questions/migrations/0034_question_status_filter_indexes.py11-13: Mutable class attributes should be annotated with (RUF012) 15-48: Mutable class attributes should be annotated with (RUF012) posts/services/feed.py320-320: Avoid specifying long messages outside the exception class (TRY003) 🔇 Additional comments (8)
✏️ Tip: You can disable this entire section by setting Comment |
Adjusted feed filters to take into account group subquestions
closes #2317
Summary by CodeRabbit
Chores
✏️ Tip: You can customize this high-level summary in your review settings.