Skip to content

Use latest spot scoring time in tournament timeline#5015

Open
aseckin wants to merge 2 commits into
mainfrom
claude/issue-2492-only-display-the-latest-spot
Open

Use latest spot scoring time in tournament timeline#5015
aseckin wants to merge 2 commits into
mainfrom
claude/issue-2492-only-display-the-latest-spot

Conversation

@aseckin

@aseckin aseckin commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #2492.

Summary

  • Backend: _calculate_timeline_data now derives each question's contribution as question.spot_scoring_time or question.cp_reveal_time (mirroring Question.get_spot_scoring_time() and the model's documented fallback), and the returned field is renamed last_cp_reveal_timelast_spot_scoring_time.
  • Frontend: updated TournamentTimeline type and tournament_timeline.tsx to read the new field.

The value is still the max across the tournament's questions, so only the latest date is shown.

Test plan

  • uv run ruff format . and uv run ruff check .
  • cd front_end && bun run lint
  • Load a spot-scored tournament whose questions have explicit spot_scoring_time values and confirm the timeline chip sits on the latest one.

Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Corrected tournament timelines to use the latest spot-scoring timestamp when determining the final participation day.
    • Improved timeline accuracy by falling back to the CP reveal time when spot-scoring data is unavailable.

Compute the tournament timeline's "Last day for prize participation"
marker from each question's spot_scoring_time (falling back to
cp_reveal_time, matching the Question model default) and expose it as
last_spot_scoring_time. The value is still the max across the
tournament's questions, so only the latest date is shown.

Co-authored-by: aseckin <3686968+aseckin@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

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: e7b07e4d-a589-4001-8dde-46cf64c076d8

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:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-2492-only-display-the-latest-spot

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

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview Environment

Your preview environment is ready!

Resource Details
🌐 Preview URL https://metaculus-pr-5015-claude-issue-2492-only-display-preview.mtcl.cc
📦 Docker Image ghcr.io/metaculus/metaculus:claude-issue-2492-only-display-the-latest-spot-e0640b5
🗄️ PostgreSQL NeonDB branch preview/pr-5015-claude-issue-2492-only-display
Redis Fly Redis mtc-redis-pr-5015-claude-issue-2492-only-display

Details

  • Commit: 8894e7c01839f73c5811c1290247630cfaf813a1
  • Branch: claude/issue-2492-only-display-the-latest-spot
  • Fly App: metaculus-pr-5015-claude-issue-2492-only-display

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

@aseckin

aseckin commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

QA passed, pending code review

@aseckin aseckin requested a review from lsabor July 16, 2026 06:33
@aseckin aseckin marked this pull request as ready for review July 16, 2026 06:33
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.

Only display the latest spot score date in the Tournament timeline

1 participant