Description
In the aggregate stats table (daily and monthly views), the red highlight that marks the row with the highest value in each column (cost, tokens, tool calls, etc.) lands on the incorrect row when the sort order is reversed (press r).
This is a pre-existing issue, not a regression introduced in any specific PR.
Root Cause (suspected)
The best-row indices are computed by iterating over the unfiltered/un-reversed map order, while the rows are rendered in the reversed order. Because the index computed during the best-value scan doesn't account for the reversed iteration, the highlight is applied to the wrong visual row.
Steps to Reproduce
- Open the TUI with sufficient daily or monthly data.
- Press
r to reverse the sort order.
- Observe that the red highlight (maximum value) for each column does not correspond to the visually highest value in that column.
Related
Reported by @Sewer56.
Description
In the aggregate stats table (daily and monthly views), the red highlight that marks the row with the highest value in each column (cost, tokens, tool calls, etc.) lands on the incorrect row when the sort order is reversed (press
r).This is a pre-existing issue, not a regression introduced in any specific PR.
Root Cause (suspected)
The best-row indices are computed by iterating over the unfiltered/un-reversed map order, while the rows are rendered in the reversed order. Because the index computed during the best-value scan doesn't account for the reversed iteration, the highlight is applied to the wrong visual row.
Steps to Reproduce
rto reverse the sort order.Related
Reported by @Sewer56.