Skip to content

Improve TUI experience #5

@sakost

Description

@sakost

Summary

The current terminal UI provides functional progress reporting but could be enhanced for a better user experience during long-running mutation testing sessions.

Current State

The TUI is event-driven with a background tokio render task (src/progress/):

  • Render modes: Fancy (TTY default with progress bar + spinner), Plain (no color/overwrite), Verbose (per-mutant lines), Quiet (suppress all)
  • Progress bar: Shows [#>-] pos/len mutants (ETA remaining) using indicatif
  • Phase display: Animated spinner (⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏) during coverage/generation phases, checkmark on completion
  • Per-mutant output (verbose mode): Colored status + file + line + mutator + original → mutated text
  • Final summary: Scoreboard with killed/survived/timeouts/errors/no_coverage counts

Suggested Improvements

Real-time statistics panel

  • Show live operator-level kill rates as mutations run
  • Show per-file progress (e.g., "file 3/12: src/auth/login.py")
  • Display running mutation score that updates as results arrive

Interactive mode

  • Pause/resume capability (Ctrl+Z or p key)
  • Cancel with summary (currently Ctrl+C stops but could show partial results more prominently)
  • Allow filtering/focusing on specific files mid-run

Better ETA estimation

  • Use per-mutant timing history for more accurate ETA
  • Show throughput (mutants/second)

Multi-line layout

  • Dedicated sections for: current phase, progress bar, recent results, live stats
  • Use ratatui or similar for a richer multi-panel layout

Log file support

  • Option to write detailed per-mutant results to a log file while showing summary on screen
  • Useful for CI where you want both a clean output and full details

Implementation

Key files:

  • src/progress/reporter.rsProgressReporter (event sender)
  • src/progress/event.rs — event types
  • src/progress/render.rs — render loop
  • src/progress/style.rs — colors and formatting

Currently uses console + indicatif crates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions