Skip to content

fix(tui): compact detailed sidebar metrics - #3858

Merged
dgageot merged 1 commit into
mainfrom
fix/3856-compact-detailed-sidebar-metrics
Jul 28, 2026
Merged

fix(tui): compact detailed sidebar metrics#3858
dgageot merged 1 commit into
mainfrom
fix/3856-compact-detailed-sidebar-metrics

Conversation

@Sayt-0

@Sayt-0 Sayt-0 commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

  • adapt Detailed sidebar metrics to the width required by the current agent roster
  • use compact Eff, Ctx, and Cost forms without the decorative effort gauge at constrained and default widths
  • preserve semantic effort values, agent names, and model rows while packing metrics onto the fewest lines that fit
  • restore full labels and gauges when every agent's complete metric row fits

Fixes #3856

Before and after

Width Before After
Default sidebar Effort ▰▰▰▰▱▱ high
Context 30% · Cost $0.13
Eff high · Ctx 30% · Cost $0.13
Minimum sidebar Effort ▱▱▱▱▱▱ off
Ctx 6%
Cost $0.0042
Eff off · Ctx 6%
Cost $0.0042
Sufficiently wide Full labels and gauge Full labels and gauge, unchanged

The existing issue screenshot captures the visual before state. The table above shows the exact ANSI-stripped rendering pinned by the updated tests; no replacement screenshot is included because the result depends on the active roster and terminal width.

Issue expectations

Expectation Implementation
Keep Detailed mode at narrow/default widths The renderer stays in Detailed mode and changes only its metric vocabulary and flow
Use compact atomic labels Constrained cards render Eff, Ctx, and Cost
Remove cramped gauge/value combinations Compact effort rows omit the six-cell gauge and retain values such as high, off, minimal, auto, and token budgets
Keep names and models readable Name and provider/model rows remain separate and preserve existing truncation behavior
Reduce vertical space Compact metrics flow greedily; default-width cards use one joined metric row when it fits
Handle the width boundary The roster switches to full labels and gauges only when every full joined metric row fits
Update correctly on resize Tests cover default -> wide threshold -> default and verify exact restoration, line widths, and card ownership

Validation

  • task lint
  • task build
  • env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy task test
  • go test ./pkg/tui/components/sidebar ./pkg/tui/page/chat -count=1 -race
  • git diff --check

The full test suite requires the workspace HTTP proxy variables to be unset because the injected localhost proxy intentionally intercepts private-address requests used by SSRF tests.

@Sayt-0
Sayt-0 requested a review from a team as a code owner July 28, 2026 03:29
@dgageot
dgageot merged commit 8d02e79 into main Jul 28, 2026
14 checks passed
@dgageot
dgageot deleted the fix/3856-compact-detailed-sidebar-metrics branch July 28, 2026 06:06
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.

Fix cramped Detailed sidebar metrics at narrow terminal widths

3 participants