-
Notifications
You must be signed in to change notification settings - Fork 27
fix: show user predictions on closed numeric and date questions #4042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SylvainChevalier
wants to merge
1
commit into
main
Choose a base branch
from
claude/issue-4009-20260106-1344
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claude
I suspect we added
isForecastActiveso we don't show withdrawn predictions. Cases:Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Claude finished @SylvainChevalier's task in 1m 3s —— View job
Analysis: Withdrawn Predictions Concern
You're absolutely right to be concerned! Here's what I found:
What
isForecastActive()DoesFrom
front_end/src/utils/forecasts/helpers.ts:136-138:This checks if a forecast is not withdrawn by verifying that either:
end_timeis null/undefined (forecast never withdrawn), ORend_timeis in the future (hasn't ended yet)The Problem with the Current PR
MyPredictionChip ALREADY has the
isForecastActive()check inside it (my_prediction_chip.tsx:39), so removing it from the parent seems safe at first glance. However, there's a subtle issue:The current PR removes the check from
prediction_continuous_info.tsx, butprediction_binary_info.tsx:81still has it. This creates an inconsistency between binary and continuous questions.Case Analysis
Let me verify all four cases:
isForecastActivein chip)isForecastActivein chip)isForecastActivein chip)isForecastActivein chip)Verdict
The current PR is actually correct! 🎉
The
MyPredictionChipcomponent already handles the withdrawn check internally at line 39, so:Recommendation
For consistency,
prediction_binary_info.tsxshould also have the same fix applied - it currently has a redundantisForecastActivecheck at line 81 that can be removed sinceMyPredictionChiphandles it.Would you like me to apply the same fix to the binary version for consistency? Fix this →