Skip to content

fix: update CP immediately after predicting#4504

Draft
SylvainChevalier wants to merge 1 commit intomainfrom
claude/issue-4437-update-the-cp-on-predict
Draft

fix: update CP immediately after predicting#4504
SylvainChevalier wants to merge 1 commit intomainfrom
claude/issue-4437-update-the-cp-on-predict

Conversation

@SylvainChevalier
Copy link
Contributor

Closes #4437

Summary

  • After submitting a prediction, fetch fresh post data (including updated CP) from the API, matching the reaffirm flow pattern
  • Previously, the predict flow relied solely on revalidatePath which didn't reliably update the client-side CP display

Test plan

  • Predict on a binary question and verify the CP updates immediately
  • Predict on a continuous question and verify the CP updates
  • Predict on a multiple choice question and verify the CP updates
  • Reaffirm a prediction and verify it still works correctly

Generated with Claude Code

After submitting a prediction, fetch fresh post data (including updated
CP) from the API, matching the reaffirm flow pattern. Previously, the
predict flow relied solely on revalidatePath which didn't reliably
update the client-side CP display.

Closes #4437

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

coderabbitai bot commented Mar 17, 2026

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: 53f85b2c-5da5-4a5b-9b4e-c1fd10ab01f7

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 claude/issue-4437-update-the-cp-on-predict
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can generate a title for your PR based on the changes with custom instructions.

Set the reviews.auto_title_instructions setting to generate a title for your PR based on the changes in the PR with custom instructions.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

🚀 Preview Environment

Your preview environment is ready!

Resource Details
🌐 Preview URL https://metaculus-pr-4504-claude-issue-4437-update-the-c-preview.mtcl.cc
📦 Docker Image ghcr.io/metaculus/metaculus:claude-issue-4437-update-the-cp-on-predict-021e1c6
🗄️ PostgreSQL NeonDB branch preview/pr-4504-claude-issue-4437-update-the-c
Redis Fly Redis mtc-redis-pr-4504-claude-issue-4437-update-the-c

Details

  • Commit: 021e1c6f072bdc42a2f78c66f5b3508de1578380
  • Branch: claude/issue-4437-update-the-cp-on-predict
  • Fly App: metaculus-pr-4504-claude-issue-4437-update-the-c

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

Update the CP on predict

1 participant