Problem / motivation
When a field's Left has reached its Max (cap), nothing in the UI signals that the field is full. The Left column is rendered with signed, which only colors negatives red and leaves everything else default:
monay/tui/format.py:19 (signed) — style=theme.ERROR if m.is_negative else ""
monay/tui/widgets/section_detail.py:49 — signed(f.left) in the field table
So a field sitting exactly at its ceiling looks identical to a half-full one. A green "full" cue would make it easy to scan which fields are topped up.
Proposed solution
In the section drill-in field table, color the Left cell green when it equals the field's Max — i.e. when the cap is finite and f.left == f.cap.limit (Cap.limit, monay/domain/values.py). f.left is already clamped to the cap at compute time (Field.left = cap.clamp(raw), monay/domain/month.py), so equality cleanly means "at max / full".
Implementation: a small Left-cell helper (or extend the Left rendering in section_detail.build) with the precedence:
- negative → red (
theme.ERROR, unchanged)
- finite cap and
left == cap.limit → green (theme.OK)
- otherwise → default
Infinite-cap fields have no Max, so they never go green.
Alternatives considered
- Bake the rule into the shared
signed helper — rejected: signed is reused for CURRENT/REST/leftovers (monay/tui/format.py:19) which have no cap; the green-at-max rule is field-specific and needs the cap, so it belongs at the Left cell, not in signed.
- A separate "full" chip/column — rejected: an extra column adds width; recoloring the existing Left cell conveys it with no layout cost.
Problem / motivation
When a field's Left has reached its Max (cap), nothing in the UI signals that the field is full. The Left column is rendered with
signed, which only colors negatives red and leaves everything else default:monay/tui/format.py:19(signed) —style=theme.ERROR if m.is_negative else ""monay/tui/widgets/section_detail.py:49—signed(f.left)in the field tableSo a field sitting exactly at its ceiling looks identical to a half-full one. A green "full" cue would make it easy to scan which fields are topped up.
Proposed solution
In the section drill-in field table, color the Left cell green when it equals the field's Max — i.e. when the cap is finite and
f.left == f.cap.limit(Cap.limit,monay/domain/values.py).f.leftis already clamped to the cap at compute time (Field.left = cap.clamp(raw),monay/domain/month.py), so equality cleanly means "at max / full".Implementation: a small Left-cell helper (or extend the Left rendering in
section_detail.build) with the precedence:theme.ERROR, unchanged)left == cap.limit→ green (theme.OK)Infinite-cap fields have no Max, so they never go green.
Alternatives considered
signedhelper — rejected:signedis reused for CURRENT/REST/leftovers (monay/tui/format.py:19) which have no cap; the green-at-max rule is field-specific and needs the cap, so it belongs at the Left cell, not insigned.