You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
committed
fix(client): the info bar's budget and its cut share a unit (UI/UX v3 N-7a)
The InfoBar sized its message with a column budget and then spent it in
characters: `max_chars` came from `sw / cell_w`, and the message was cut
with `chars().take(max_chars)`. Those are the same number only in Latin.
All three bar kinds get their text from `fl!` — update, offline and error
— so every non-Latin locale bought twice the room it was allotted and ran
under the `[Esc]` hint at the right edge.
The budget is now pixels on both sides: `measure_run` for the hint and the
overflow count, `truncate_run_to_width` for the message. The `…` that
appears on a cut is new; the old truncation was silent.
The hint's own `x` came off `hint.len()`, a byte count that was correct
only because `[Esc]` is ASCII and untranslated. It is measured now, so
that stops being load-bearing.
Both draws move to `add_run_verts`, which puts the bar's text on the
chrome ramp — body for the message, caption for the key hint — and takes
its line box from `chrome_metrics` instead of `cell_h`.
The gate is per builder, not per file: `ui_verts.rs` still draws on the
cell path on purpose in `build_quick_select_verts`, whose labels sit on
real terminal cells. A file-wide check would need an exemption list, and
those grow.
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
0 commit comments