Skip to content

Fix MessageBox not setting SchemeName correctly (#4567)#4568

Merged
tig merged 4 commits intogui-cs:v2_developfrom
tig:fix/4567_messagebox_scheme
Jan 13, 2026
Merged

Fix MessageBox not setting SchemeName correctly (#4567)#4568
tig merged 4 commits intogui-cs:v2_developfrom
tig:fix/4567_messagebox_scheme

Conversation

@tig
Copy link
Copy Markdown
Member

@tig tig commented Jan 13, 2026

Summary

  • Fixes MessageBox not setting SchemeName property correctly
  • Added unit tests to verify Query uses "Dialog" scheme and ErrorQuery uses "Error" scheme

Changes

  • MessageBox.cs: Uncommented the SchemeName assignment that correctly sets the scheme based on whether it's an error dialog
  • MessageBoxTests.cs: Added two new unit tests:
    • Query_Sets_Dialog_SchemeName: Verifies MessageBox.Query uses the Dialog color scheme
    • ErrorQuery_Sets_Error_SchemeName: Verifies MessageBox.ErrorQuery uses the Error color scheme

Test plan

  • Added unit tests that fail before the fix and pass after
  • Verified all existing MessageBox tests still pass (5 tests total)
  • Tests verify the correct SchemeName is set for both Query and ErrorQuery

Related

Fixes #4567

🤖 Generated with Claude Code

tig and others added 3 commits January 13, 2026 11:48
Uncommented line in MessageBox.cs that sets the SchemeName property based on whether it's an error dialog or regular dialog. Added unit tests to verify Query sets "Dialog" scheme and ErrorQuery sets "Error" scheme.

Fixes gui-cs#4567

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.65%. Comparing base (23ee30b) to head (f347f88).
⚠️ Report is 1 commits behind head on v2_develop.

Additional details and impacted files
@@              Coverage Diff               @@
##           v2_develop    #4568      +/-   ##
==============================================
+ Coverage       77.62%   77.65%   +0.02%     
==============================================
  Files             427      427              
  Lines           45364    45362       -2     
  Branches         6400     6400              
==============================================
+ Hits            35216    35226      +10     
+ Misses           8319     8306      -13     
- Partials         1829     1830       +1     
Files with missing lines Coverage Δ
Terminal.Gui/Views/Dialog.cs 94.49% <100.00%> (-0.06%) ⬇️

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23ee30b...f347f88. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tig tig requested a review from Copilot January 13, 2026 19:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@tig tig merged commit fe383fb into gui-cs:v2_develop Jan 13, 2026
14 checks passed
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.

MessageBox.ErrorQuery does not use correct scheme

2 participants