Skip to content

Assign input after invalid input - #106

Merged
shimat merged 1 commit into
shimat:mainfrom
garethbudden:patch-1
Nov 14, 2026
Merged

shimat merged 1 commit into
shimat:mainfrom
garethbudden:patch-1

Conversation

@garethbudden

@garethbudden garethbudden commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

If a user enters a selection that is out side the range of available tests, previously the subsequent selection was not written to the input variable meaning the app was stuck. Simple fix

Summary by CodeRabbit

  • Bug Fixes
    • Corrected console test selection handling when an entered number is out of range. The newly entered value is now used on the next iteration, allowing the selection prompt to respond properly to updated input.

@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

ShowTestEntrance now stores the value returned by PrintErrorAndRead when the entered number is out of range.

Changes: Console input handling

Layer / File(s) Summary
Store input after an out-of-range entry
Samples/Console/ConsoleTestManager.cs
When the entered number is out of range, ShowTestEntrance assigns the value returned by PrintErrorAndRead to input.

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

Change: Bug fix

Merge Risk: Minimal · up to cfd73

This fixes the console sample getting stuck after an out-of-range test selection by using the newly entered value. The change is small and low risk to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Assign input after invalid input" matches the single change in the summary. In ShowTestEntrance, the out-of-range branch now assigns the result of PrintErrorAndRead to input, so the next lo…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Assign input after invalid input" matches the single change in the summary. In ShowTestEntrance, the out-of-range branch now assigns the result of PrintErrorAndRead to input, so the next loop iteration uses the new value. The PR objectives describe the same fix for the app getting stuck after an out-of-range selection.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 42a4615 and cfd73fb.

Files selected for processing: 1

  • Samples/Console/ConsoleTestManager.cs

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@shimat
shimat merged commit b695dc7 into shimat:main Nov 14, 2026
3 checks passed
@shimat

shimat commented Nov 14, 2026

Copy link
Copy Markdown
Owner

thanks!!

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.

2 participants