This commit is contained in:
nuno maduro
2026-05-01 15:33:06 +01:00
parent 3802fa80e6
commit 0a97d3a288

View File

@ -929,15 +929,24 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
$reasons === [] ? '' : ' ('.implode(', ', $reasons).')', $reasons === [] ? '' : ' ('.implode(', ', $reasons).')',
)); ));
if ($changedFiles !== []) { // List the first few affected test files so the developer can see
$preview = array_slice($changedFiles, 0, 3); // *which* tests are about to run, not just the count. Capped at 10
$remainder = count($changedFiles) - count($preview); // to keep the line tight on large impact sets.
$suffix = $remainder > 0 ? sprintf(', +%d more', $remainder) : ''; $previewLimit = 10;
$sorted = $affected;
sort($sorted);
$preview = array_slice($sorted, 0, $previewLimit);
foreach ($preview as $file) {
$this->output->writeln(sprintf(' <fg=gray> • %s</>', $file));
}
$remainder = count($sorted) - count($preview);
if ($remainder > 0) {
$this->output->writeln(sprintf( $this->output->writeln(sprintf(
' <fg=gray>└ %s%s</>', ' <fg=gray> … +%d more</>',
implode(', ', $preview), $remainder,
$suffix,
)); ));
} }
} }