Skip to content

fix: hide forecast maker for bot users#4882

Merged
hlbmtc merged 1 commit into
mainfrom
claude/issue-4881-dont-show-my-prediction-overlay
Jun 17, 2026
Merged

fix: hide forecast maker for bot users#4882
hlbmtc merged 1 commit into
mainfrom
claude/issue-4881-dont-show-my-prediction-overlay

Conversation

@CodexVeritas

@CodexVeritas CodexVeritas commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Closes #4881

Summary

  • Short-circuits <ForecastMaker /> to render nothing when user.is_bot.
  • Bots predict via the API and cannot edit forecasts in the UI; the maker rendered a "my prediction" overlay using the default starting curve, which bot owners mistook for their bot's actual forecast.
  • Bots still see their submitted forecasts on the main timeline chart (DetailedQuestionCard).

Test plan

  • Log in as a bot user and visit a continuous question — confirm no "my prediction" chart/slider is shown below the question chart.
  • Log in as a bot user and visit a binary question — confirm no slider is shown.
  • Log in as a bot user and visit a multiple-choice/group/conditional question — confirm no forecast input is shown.
  • Log in as a non-bot user — confirm the forecast maker still renders normally.
  • Confirm bots can still see their own submitted forecasts on the timeline chart at the top of the question page.

Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Forecast-making interface is now hidden for bot accounts, preventing default starting curves from being mistaken for actual bot forecasts.

Bots predict via API and cannot edit forecasts in the UI. The maker
rendered a "my prediction" overlay using the default starting curve,
which bot owners mistook for their bot's actual forecast.

Closes #4881

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

coderabbitai Bot commented Jun 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

Run ID: 5e65838a-403c-4724-89b2-a95a5af18823

📥 Commits

Reviewing files that changed from the base of the PR and between 19992f6 and 6a09f2e.

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

📝 Walkthrough

Walkthrough

ForecastMaker now includes an early-return guard that hides the component entirely for bot users, preventing the default starting curve from being mistaken as an actual bot forecast. All rendering logic for non-bot users remains unchanged.

Changes

Bot forecast-maker hiding

Layer / File(s) Summary
Bot forecast-maker visibility guard
front_end/src/components/forecast_maker/index.tsx
Early-return check hides ForecastMaker when user?.is_bot is true, with explanatory comments about bot prediction constraints.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • Metaculus/metaculus#4317: Both PRs apply bot-specific UI restrictions to forecasting—main PR hides ForecastMaker for bot users, and retrieved PR #4317 updates forecast-related components like front_end/src/components/forecast_maker/index.tsx (using useAuth/canPredictQuestion(post, user)) to prevent bot prediction behavior.

Suggested reviewers

  • elisescu
  • ncarazon
  • cemreinanc

Poem

🤖 A bot once tried to forecast with glee,
But the UI said "nope, bot-free!"
The default curve hides away,
Preventing confusion that day,
Hopping through code, clear to see! 🐰

🚥 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 reflects the main change: hiding the forecast maker UI for bot users to prevent confusion with actual bot forecasts.
Linked Issues check ✅ Passed The PR successfully implements the core requirement from issue #4881 by short-circuiting ForecastMaker to return null for bot users, preventing the misleading default starting curve from appearing.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to the ForecastMaker component with a bot check; no unrelated modifications are present.

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

✨ Finishing Touches
📝 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-4881-dont-show-my-prediction-overlay

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.

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Cleanup: Preview Environment Removed

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-06-17T12:00:10Z

@hlbmtc hlbmtc merged commit 0a0ca68 into main Jun 17, 2026
22 checks passed
@hlbmtc hlbmtc deleted the claude/issue-4881-dont-show-my-prediction-overlay branch June 17, 2026 12:00
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.

Don't show "my prediction" overlay when a bot.

2 participants