Repository navigation
fix(presentation): dim the sub-agent stats icons at a zero count - #1504
Merged
Merged
Conversation
The stats line hard-coded the success color on the tick and the error color on the cross, so a red cross next to a 0 read as a failure that never happened. Each icon now takes its status color only once its count is positive, and falls back to the dim theme color at zero like the token figure beside it. The per-row outcome icon in rowView is a single result rather than a count, so it keeps its color. TestSubagentListStatsIconsDimAtZero pins the icon color per count combination, covering a run with zero failures.
2 tasks
inference-gateway-maintainer
Bot
requested a review
from a team
as a code owner
October 2, 2026 20:44
5 tasks
Contributor
|
🎉 This PR is included in version 0.223.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1498
Summary
The sub-agent list stats line (
└ 3 ✓ 0 ✗ · 1.2k tokens) always rendered the tick in thesuccesscolor and the cross in theerrorcolor, so a red cross next to a0read as a failure that never happened.statsViewnow colors each icon by its own count: the status color once the count is positive, thedimtheme color at zero, matching the token figure beside it.Changes
internal/presentation/tui/components/subagent_list.go:statsViewpickssuccessfor the tick only whenToolsSucceeded > 0anderrorfor the cross only whenToolsFailed > 0, both defaulting todim. Counts, spacing and padding are untouched, so the line keeps its width and alignment.internal/presentation/tui/components/subagent_list_test.go: addsTestSubagentListStatsIconsDimAtZero, a table-driven color assertion over the four count combinations (both zero, both positive, zero failures, zero successes). It builds the expected line from the real style provider and compares it exactly, so the cross of a run with0failures is proven not to carry theerrorcolor. The test skips when the terminal renders no colors, where the assertion would be vacuous.rowViewis a single result rather than a count, so it keeps its color.Verification
task precommit:runpasses (tidy, mocks,go fmt, import aliases, golangci-lint 0 issues, markdownlint).go test ./internal/presentation/tui/components/ -run 'TestSubagentList|TestCompactCount'passes, including the unchanged stats-line assertions inTestSubagentListShowsRunStatsUnderRows.Docs
A [DOCS] follow-up is being opened in
inference-gateway/docsto note the dim-at-zero coloring in the Run Stats section ofdocs/subagents.md, which shows the stats line.