Skip to content

Remove View.Diagnostics from TableViewTest scenario#4781

Merged
tig merged 2 commits intov2_developfrom
copilot/remove-view-diagnostics-set
Mar 2, 2026
Merged

Remove View.Diagnostics from TableViewTest scenario#4781
tig merged 2 commits intov2_developfrom
copilot/remove-view-diagnostics-set

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 2, 2026

Proposed Changes/Todos

  • Remove View.Diagnostics = ViewDiagnosticFlags.DrawIndicator; from Examples/UICatalog/Scenarios/TableViewTest.cs

Context

View.Diagnostics is a process-wide static. Setting it in a scenario causes test pollution when parallelized tests execute, leading to non-deterministic failures.

Before:

optionsView = new View ()
{
    // ...
    Title = "Options",
};

View.Diagnostics = ViewDiagnosticFlags.DrawIndicator;  // ← Causes parallel test failures

var offsetLabel = new Label ()

After:

optionsView = new View ()
{
    // ...
    Title = "Options",
};

var offsetLabel = new Label ()

Pull Request checklist:

  • I've named my PR in the form of "Fixes #issue. Terse description."
  • My code follows the style guidelines of Terminal.Gui
  • My code follows the Terminal.Gui library design guidelines
  • I ran dotnet test before commit
  • I have made corresponding changes to the API documentation (using /// style comments)
  • My changes generate no new warnings
  • I have checked my code and corrected any poor grammar or misspellings
  • I conducted basic QA to assure all features are working
Original prompt

This section details on the original issue you should resolve

<issue_title>remove View.Diagnostics set from TableViewTests.cs</issue_title>
<issue_description>Found it. This is the cause of the parallelized unit test failures. View.Diagnostics is a process wide static.

Just delete that line.

image

Originally posted by @tig in #4731 (comment)
</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: tig <585482+tig@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove View.Diagnostics set from TableViewTests.cs Remove View.Diagnostics from TableViewTest scenario Mar 2, 2026
Copilot finished work on behalf of tig March 2, 2026 13:49
@tig tig marked this pull request as ready for review March 2, 2026 14:10
@tig tig self-requested a review as a code owner March 2, 2026 14:10
@tig tig merged commit eb6f93e into v2_develop Mar 2, 2026
4 checks passed
@tig tig deleted the copilot/remove-view-diagnostics-set branch March 2, 2026 14:11
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.53%. Comparing base (bf59dbc) to head (5bc7016).
⚠️ Report is 1 commits behind head on v2_develop.

Additional details and impacted files
@@              Coverage Diff               @@
##           v2_develop    #4781      +/-   ##
==============================================
- Coverage       77.62%   77.53%   -0.09%     
==============================================
  Files             461      461              
  Lines           46088    46088              
  Branches         6835     6835              
==============================================
- Hits            35774    35733      -41     
- Misses           8320     8358      +38     
- Partials         1994     1997       +3     

see 3 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 bf59dbc...5bc7016. 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.

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.

remove View.Diagnostics set from TableViewTests.cs

2 participants