Skip to content

Fix usage panel cache metrics - #202

Merged
yottadynamics merged 2 commits into
mainfrom
fix-usage-panel-cache-rate
Aug 11, 2026
Merged

yottadynamics merged 2 commits into
mainfrom
fix-usage-panel-cache-rate

Conversation

@yottadynamics

Copy link
Copy Markdown
Owner

Summary

Fixes several usage-panel edge cases that were left as local dirty changes on main:

  • reports cache hit rate on the same prompt-token basis as total usage by including cache creation tokens in the denominator
  • keeps the cache-hit row visible as 0% when cache writes happen but cache reads are zero
  • avoids reserving a scroll-hint line when the usage popup content exactly fits
  • makes usage outlier detection compare each row against the mean of the other rows, so a dominant row cannot hide itself
  • widens the subagent tools-count column for 100+ tool calls

Related issue

None.

How was this tested?

  • go test ./internal/tui
  • go test ./...
  • go vet ./...
  • lsp_changed_files_diagnostics reported no diagnostics for the changed files

Checklist

  • go test ./... passes
  • go vet ./... is clean
  • Tests added or updated — a new capability ships with tests, a bug fix ships with a regression test
  • Docs updated in the same change if behavior or surface changed (not applicable: internal TUI bug fixes)
  • PR is focused on one logical change

@yottadynamics
yottadynamics merged commit 6332a85 into main Aug 11, 2026
7 checks passed
@yottadynamics
yottadynamics deleted the fix-usage-panel-cache-rate branch August 11, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant