Skip to content

fix: clamp percentage bar input - #104

Open
vycdev2 wants to merge 1 commit into
vycdev:developfrom
vycdev2:fix/clamp-percentage-bar-input
Open

fix: clamp percentage bar input#104
vycdev2 wants to merge 1 commit into
vycdev:developfrom
vycdev2:fix/clamp-percentage-bar-input

Conversation

@vycdev2

@vycdev2 vycdev2 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Clamp percentage-bar inputs to the supported 0–100 range before calculating filled and empty cells.
  • Add regression coverage for negative and over-100 inputs, which previously could make StringBuilder.Append throw.

Verification

  • dotnet build --no-restore — passed (1 pre-existing package vulnerability warning).
  • dotnet test Morpheus.Tests/Morpheus.Tests.csproj --no-restore --filter 'FullyQualifiedName~GetPercentageBar_ClampsOutOfRangeValues' --verbosity minimal — passed (2 tests).
  • dotnet test --no-restore --verbosity minimal — 299 passed, 2 failed because the environment runs in .NET globalization-invariant mode and cannot load the existing tr-TR culture regression tests.
  • git diff --check — passed.

Risk

  • Low: normal 0–100 output is unchanged; only out-of-range inputs are clamped.

This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.

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.

1 participant