Skip to content

Conversation

@SylvainChevalier
Copy link
Contributor

@SylvainChevalier SylvainChevalier commented Jan 13, 2026

Remove the restriction that prevented the 'include your current forecast' checkbox from appearing on multiple choice questions. The feature was already fully supported by the backend and rendering components but was artificially disabled in the form logic.

Fixes #4053

Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Expanded forecast availability in replies: Forecasts can now be included in replies for all question types when an active forecast exists. Previously, a specific question type was excluded from this functionality, limiting forecast visibility.

✏️ Tip: You can customize this high-level summary in your review settings.

Remove the restriction that prevented the 'include your current forecast'
checkbox from appearing on multiple choice questions. The feature was
already fully supported by the backend and rendering components but was
artificially disabled in the form logic.

Fixes #4053

Co-authored-by: Sylvain <[email protected]>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 23, 2026

📝 Walkthrough

Walkthrough

The changes remove restrictions that prevented forecast inclusion for MultipleChoice questions. Two components were updated: an early return condition was eliminated, and the forecast filtering logic was relaxed to allow forecasts across all question types when a post contains an active latest forecast.

Changes

Cohort / File(s) Summary
Forecast Inclusion for MultipleChoice
front_end/src/components/comment_feed/comment.tsx
Removed early return statement that blocked forecasts in replies for MultipleChoice questions
Forecast Validation Logic
front_end/src/components/comment_feed/index.tsx
Removed QuestionType import and relaxed shouldIncludeForecast filtering to allow forecasts for all question types when a latest active forecast exists, rather than excluding MultipleChoice

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A checkbox was lost, oh what a shame,
For multiple choice questions played a different game,
But now with these changes, both small and quite clear,
The forecast checkbox has finally appeared!
Restrictions removed, the logic runs free,
All question types forecast in harmony! ✨

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: enabling the forecast checkbox for multiple choice questions by removing the artificial restriction.
Linked Issues check ✅ Passed The code changes directly address issue #4053 by removing the restriction that prevented the forecast checkbox from appearing on multiple choice questions.
Out of Scope Changes check ✅ Passed All changes are directly scoped to removing the forecast checkbox restriction for multiple choice questions, with no unrelated modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1f702fe and b5de873.

📒 Files selected for processing (2)
  • front_end/src/components/comment_feed/comment.tsx
  • front_end/src/components/comment_feed/index.tsx
💤 Files with no reviewable changes (1)
  • front_end/src/components/comment_feed/comment.tsx
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: lsabor
Repo: Metaculus/metaculus PR: 4038
File: scoring/score_math.py:90-92
Timestamp: 2026-01-16T20:44:13.892Z
Learning: Multiple choice questions in the Metaculus codebase are constrained to always have at least two options; therefore, when scoring multiple choice forecasts, `options_at_time` (the count of non-None values in the PMF) will always be ≥ 2, and division by `np.log(options_at_time)` is safe.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Build Docker Image / Build Docker Image
  • GitHub Check: Backend Checks
  • GitHub Check: integration-tests
  • GitHub Check: Frontend Checks
🔇 Additional comments (1)
front_end/src/components/comment_feed/index.tsx (1)

81-85: Good expansion of eligibility for forecast linking.

The broader condition aligns with the stated objective and keeps the active-forecast guard intact.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026

🧹 Preview Environment Cleaned Up

The preview environment for this PR has been destroyed.

Resource Status
🌐 Preview App ✅ Deleted
🗄️ PostgreSQL Branch ✅ Deleted
⚡ Redis Database ✅ Deleted
🔧 GitHub Deployments ✅ Removed
📦 Docker Image ⚠️ Retained (auto-cleanup via GHCR policies)

Cleanup triggered by PR close at 2026-01-23T15:39:17Z

@cemreinanc
Copy link
Contributor

@SylvainChevalier
Copy link
Contributor Author

@cemreinanc not perfect but better than not having it for sure!

@cemreinanc
Copy link
Contributor

@cemreinanc not perfect but better than not having it for sure!

Sure! Then merging it as is now. @SylvainChevalier Open a new issue if @aseckin updates the design in the future

@cemreinanc cemreinanc merged commit 516ad22 into main Jan 23, 2026
13 of 14 checks passed
@cemreinanc cemreinanc deleted the claude/issue-4053-20260113-1620 branch January 23, 2026 15:39
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.

Include current forecast checkbox missing on multliple choice questions

3 participants