Commit 934aad1
fix(list): stop repeating the failure count in the list footer (#3467)
Follow-up to #3442. A failed task printed the same count twice on
adjacent lines — the summary footer's `N tasks failed` clause and the `▲
N tasks failed:` warning header directly below it that names each
failure:
```
○ Showing 5 worktrees, 3 ahead; 6 tasks failed
▲ 6 tasks failed:
(detached): working-tree conflict check
fatal: bad object HEAD
```
The footer clause was never a distinct signal: its count is exactly
`non_timeout_errors.len()`, and that vector being non-empty is precisely
the condition under which the warning renders. So the number was
duplicated in 100% of cases.
Rather than suppress the duplicate when a warning happens to follow,
this splits the two by what each reports. The footer counts what's
*missing* from the table — timed-out tasks, which leave an empty cell
and have no message to print, so a count is the only signal they can
carry (and the warning deliberately filters them out). Failures are
named in the warning with git's full error text.
`format_summary_message` drops its `error_count` parameter entirely; the
footer now reads:
```
○ Showing 5 worktrees, 3 ahead
▲ 6 tasks failed:
...
```
Also corrects a stale claim in the `status_symbols` module spec: it said
the footer "lists which tasks did not finish per item," giving a mapping
from a `·` cell back to the timed-out `TaskKind`. No such mapping ever
existed — the footer only carried counts, and budget-based truncation
produces no diagnostic at all by design.
One narrow behavior note: in progressive TTY mode the footer is stdout
(a repainted table row) while the warning is stderr, so `wt list
2>/dev/null` on a TTY no longer shows a bare failure count. That case
was already discarding the error detail, and discarding stderr discards
narration by definition; the ordinary piped case (both on stderr) is
unchanged.
## Testing
The `format_summary_message` unit test now covers the timeout-only
footer variants; the two failure-warning integration snapshots are
updated to show the deduplicated footer. Verified end-to-end against the
`index.lock` scenario (dirty worktree + pre-existing lock file).
> _This was written by Claude Code on behalf of max_
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent c919ab6 commit 934aad1
5 files changed
Lines changed: 26 additions & 41 deletions
File tree
- src/commands/list
- collect
- model
- tests/snapshots
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1987 | 1987 | | |
1988 | 1988 | | |
1989 | 1989 | | |
1990 | | - | |
1991 | | - | |
1992 | 1990 | | |
1993 | 1991 | | |
1994 | 1992 | | |
| |||
2002 | 2000 | | |
2003 | 2001 | | |
2004 | 2002 | | |
2005 | | - | |
2006 | 2003 | | |
2007 | 2004 | | |
2008 | 2005 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
369 | 375 | | |
370 | 376 | | |
371 | 377 | | |
372 | 378 | | |
373 | | - | |
374 | 379 | | |
375 | 380 | | |
376 | 381 | | |
| |||
379 | 384 | | |
380 | 385 | | |
381 | 386 | | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
401 | 392 | | |
402 | 393 | | |
403 | 394 | | |
| |||
538 | 529 | | |
539 | 530 | | |
540 | 531 | | |
541 | | - | |
| 532 | + | |
542 | 533 | | |
543 | 534 | | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
554 | 538 | | |
555 | | - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
556 | 542 | | |
557 | 543 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
190 | | - | |
191 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
0 commit comments