Skip to content

Add 200-outcome limit guidance to discrete question error messages and guidelines#4413

Closed
SylvainChevalier wants to merge 2 commits intomainfrom
claude/issue-4410-change-the-max-number-of
Closed

Add 200-outcome limit guidance to discrete question error messages and guidelines#4413
SylvainChevalier wants to merge 2 commits intomainfrom
claude/issue-4410-change-the-max-number-of

Conversation

@SylvainChevalier
Copy link
Contributor

Closes #4410

Summary

  • Updated step validation error message across all locales (en, es, cs, zh, zh-TW, pt) to inform users that questions with more than 200 possible outcomes should use the continuous question type
  • Added guidance about the 200-outcome limit for discrete questions to the question writing guidelines page

Test plan

  • Verify error message appears when creating a discrete question with step < 1/200 of the range
  • Check the question writing guidelines page shows the new guideline

Generated with Claude Code

…d guidelines

Update the step validation error message across all locales (en, es, cs, zh,
zh-TW, pt) to inform users that questions with more than 200 possible outcomes
should use the continuous question type. Also add this guidance to the question
writing guidelines page.

Closes #4410

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

@claude also change the check for number of bins during discrete question creation.

@claude
Copy link

claude bot commented Feb 23, 2026

Claude finished @SylvainChevalier's task in 6m 25s —— View job


Added backend validation check for discrete question bin limit

  • Gather context and find the bin validation check
  • Add backend validation check for discrete question bin limit in serializer
  • Commit and push changes

Added server-side validation in QuestionWriteSerializer.validate() (questions/serializers/common.py) to enforce the 200-outcome limit for discrete questions. Previously this limit was only enforced on the frontend in numeric_question_input.tsx. The backend now rejects discrete questions with inbound_outcome_count > 200 and returns a clear error message suggesting the use of a continuous question type instead.

View commit · ·

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 23, 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.

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
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/issue-4410-change-the-max-number-of

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

Enforce the 200-outcome limit server-side in QuestionWriteSerializer.validate()
to prevent bypassing the frontend validation via direct API calls.

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

github-actions bot commented Feb 23, 2026

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-02-25T13:50:57Z

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.

Change the max number of bins in discrete questions from 50 to 200

1 participant