Skip to content

Show forecast distribution panel to bot users - #5132

Open
CodexVeritas wants to merge 2 commits into
mainfrom
claude/issue-5104-show-full-forecast-distribution-for
Open

Show forecast distribution panel to bot users#5132
CodexVeritas wants to merge 2 commits into
mainfrom
claude/issue-5104-show-full-forecast-distribution-for

Conversation

@CodexVeritas

@CodexVeritas CodexVeritas commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Resolves #5104. Bot accounts are no longer gated out of the forecast maker panel on questions. They now see the read-only numeric distribution panel with their latest forecast overlaid, while still being unable to submit via the UI.

Changes

  • Removed the bot early-return in front_end/src/components/forecast_maker/index.tsx.
  • Relied on existing canPredictQuestion / disabled paths to keep interactive UI (sliders, mode switcher, submit/withdraw buttons) hidden for bots.
  • No fake "input" curve is shown: ContinuousPredictionChart only draws the user curve when the bot actually has a previous forecast, and the sliders are seeded from that forecast so the drawn curve equals the bot's last submission.

Test plan

  • As a bot user, open a numeric question with no forecast: panel renders, no "my prediction" curve/row, no submit buttons.
  • As a bot user, open a numeric question with a previous forecast: panel renders, user curve/row matches the last submitted forecast, no sliders/submit.
  • As a non-bot user: unchanged behavior.

Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Forecast makers can now view their latest forecast even when prediction access is unavailable.
    • The forecast panel is displayed in read-only mode when prediction permissions are denied.

Remove the bot early-return in ForecastMaker so bots see the read-only
distribution panel with their latest forecast overlaid. Interactive
inputs (sliders, mode switcher, submit/withdraw buttons) already gate
on canPredict/disabled, which stays false for bots, so no fake input
forecast is shown.

Fixes #5104

Co-authored-by: Ben Wilson <43449430+CodexVeritas@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 219fd11a-ae04-4670-86f3-f475730ee623

📥 Commits

Reviewing files that changed from the base of the PR and between 357a2fa and 595f0eb.

📒 Files selected for processing (1)
  • front_end/src/components/forecast_maker/index.tsx

📝 Walkthrough

Walkthrough

The forecast maker no longer hides for bot users. It renders the panel and uses canPredictQuestion to restrict prediction access.

Changes

Bot forecast visibility

Layer / File(s) Summary
Read-only forecast rendering
front_end/src/components/forecast_maker/index.tsx
The component removes the bot-specific early return. Bots can view the latest forecast while canPredictQuestion controls prediction capability.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: cemreinanc, ncarazon

Poem

A rabbit viewed the forecast bright,
No hidden panel out of sight.
Bots may see their latest score,
Prediction controls stay at the door.
Hop, hop—read-only is right!

🚥 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 clearly describes the main change: showing the forecast distribution panel to bot users.
Linked Issues check ✅ Passed The change removes the bot exclusion and preserves read-only behavior, meeting issue #5104 requirements.
Out of Scope Changes check ✅ Passed The changes are limited to rendering the forecast panel for bot users and are within issue #5104 scope.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-5104-show-full-forecast-distribution-for

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.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview Environment

Your preview environment is ready!

Resource Details
🌐 Preview URL https://metaculus-pr-5132-issue-5104-show-full-forecast-preview.mtcl.cc
📦 Docker Image ghcr.io/metaculus/metaculus:issue-5104-show-full-forecast-distribution-for-60a7168
🗄️ PostgreSQL NeonDB branch preview/pr-5132-issue-5104-show-full-forecast
Redis Fly Redis mtc-redis-pr-5132-issue-5104-show-full-forecast

Details

  • Commit: 419bd4fc6ba78164e69d72acd5348885f0a04b6a
  • Branch: claude/issue-5104-show-full-forecast-distribution-for
  • Fly App: metaculus-pr-5132-issue-5104-show-full-forecast

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

Show full forecast distribution for bots

1 participant