Skip to content

FIX: prioritize fuel gauge in short cards - #36

Merged
merefield merged 1 commit into
mainfrom
agent/fuel-short-card-priority
Aug 26, 2026
Merged

FIX: prioritize fuel gauge in short cards#36
merefield merged 1 commit into
mainfrom
agent/fuel-short-card-priority

Conversation

@merefield

@merefield merefield commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Why

This addresses #35

When horizontal quota cards become very short, the Bars view preserves its primary gauge and drops secondary telemetry first. Fuel Tank did the opposite at its minimum visual height: it replaced the fuel row with the RANGE label, and a two-row allocation could show only tank borders.

What changed

  • keep the actual fuel row as the one-row Fuel Tank representation
  • restore the range readout only when a second visualization row is available
  • restore dim Empty/Full endpoint context only at three or more visualization rows
  • retain the existing card-level priority that removes reset-cycle and FREE/USED telemetry before the primary visualization
  • add focused tests for one-, two-, and three-row tanks and minimum-height quota cards

Impact

Fuel Tank now behaves like Bars under vertical pressure: the main quota signal remains visible while low-intensity labels and the reset timeline disappear first. Normal-height Fuel Tank cards retain their existing appearance and reverse-gauge direction.

Validation

  • go test ./internal/ui
  • go test -race -cover ./...
  • go vet ./...
  • git diff --check
  • rebuilt the local binary for visual review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The behavior change is narrowly scoped, matches the stated intent, and is covered by targeted tests for the constrained-height cases.

Pull request overview

This PR adjusts the Fuel Tank meter’s height-constrained rendering so the primary “fuel row” is preserved at minimal heights, and secondary labels (range readout, then Empty/Full endpoints) are only shown when more vertical space is available—matching the Bars view’s prioritization behavior under vertical pressure.

Changes:

  • Update renderFuelTankSized to prioritize the tank row at 1-row height, add the range readout at 2 rows, and add Empty/Full endpoints at 3+ rows.
  • Preserve default Fuel Tank sizing behavior when no explicit height is provided.
  • Add focused tests covering 1-, 2-, and 3-row tanks and a minimum-height Fuel meter area to ensure secondary telemetry drops before the tank.
File summaries
File Description
internal/ui/meters.go Changes Fuel Tank height prioritization so the tank row remains visible first, then restores secondary labels as height increases.
internal/ui/meters_test.go Adds regression tests for short-height tank rendering and verifies minimum-height meter layout drops telemetry before the tank.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@merefield
merefield merged commit 96a84a6 into main Aug 26, 2026
4 checks passed
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.

2 participants