Skip to content

[nextest-runner] restrict --show-progress=only to interactive scenarios#3087

Merged
sunshowers merged 1 commit into
mainfrom
only-interactive
Feb 21, 2026
Merged

[nextest-runner] restrict --show-progress=only to interactive scenarios#3087
sunshowers merged 1 commit into
mainfrom
only-interactive

Conversation

@sunshowers

Copy link
Copy Markdown
Member

In non-interactive scenarios, --show-progress=only hides successful tests, which is generally not what this is intended for.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the handling of --show-progress=only to make it context-aware, restricting its output-suppression behavior to interactive terminals only. In non-interactive scenarios (piped output, CI environments), it now behaves like auto, showing successful tests with a counter.

Changes:

  • Introduced a new DisplayConfig struct that consolidates display configuration and resolves it based on terminal interactivity and CI detection
  • Modified ShowProgress::Auto to include a suppress_success flag, allowing the "only" variant to be represented as Auto { suppress_success: true }
  • Updated the conversion from UiShowProgress::Only to map to ShowProgress::Auto { suppress_success: true } instead of special-casing it in the CLI layer

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
site/src/changelog.md Added changelog entry documenting the behavior change for --show-progress=only
nextest-runner/src/user_config/elements/ui.rs Updated UiShowProgress::Only documentation and conversion to ShowProgress
nextest-runner/src/reporter/mod.rs Updated exports to include DisplayConfig and removed StatusLevels from public API
nextest-runner/src/reporter/imp.rs Refactored to use DisplayConfig instead of individual status level fields
nextest-runner/src/reporter/displayer/progress.rs Changed ShowProgress::Auto from unit variant to struct variant with suppress_success field
nextest-runner/src/reporter/displayer/mod.rs Added new config module to exports
nextest-runner/src/reporter/displayer/imp.rs Integrated DisplayConfig::resolve() to determine progress display and status levels
nextest-runner/src/reporter/displayer/config.rs New file implementing DisplayConfig with comprehensive logic for resolving display decisions
nextest-runner/src/record/replay.rs Updated to use DisplayConfig::with_overrides() for replay scenarios
cargo-nextest/src/dispatch/core/value_enums.rs Updated CLI documentation to clarify interactive vs non-interactive behavior
cargo-nextest/src/dispatch/core/run.rs Removed special-case handling of "only" variant; now handled by DisplayConfig

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

In non-interactive scenarios, `--show-progress=only` hides successful tests, which is generally not what this is intended for.
@codecov

codecov Bot commented Feb 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.84570% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.28%. Comparing base (96bc6d4) to head (2e438ce).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
cargo-nextest/src/dispatch/core/value_enums.rs 22.22% 7 Missing ⚠️
nextest-runner/src/reporter/displayer/imp.rs 76.92% 6 Missing ⚠️
cargo-nextest/src/dispatch/core/run.rs 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3087      +/-   ##
==========================================
+ Coverage   84.17%   84.28%   +0.10%     
==========================================
  Files         155      156       +1     
  Lines       42234    42470     +236     
==========================================
+ Hits        35552    35797     +245     
+ Misses       6682     6673       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sunshowers sunshowers merged commit 98b2fc5 into main Feb 21, 2026
23 checks passed
@sunshowers sunshowers deleted the only-interactive branch February 21, 2026 01:13
@trunk-io

trunk-io Bot commented Feb 21, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

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