From 67d6f3a8397c57bda033cb594113c6609c1f255d Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Wed, 23 Sep 2026 12:02:13 +0800 Subject: [PATCH] fix(settings): keep keybinding action names on one line (#919) On Linux the Keybindings page wrapped action names one to three CJK glyphs per line and spilled them over the rows below, even though the keycaps beside them left plenty of room. The label was a shrinkable block sized to its own measured text, so any layout pass that measured it narrower than it finally ended up left its painted lines wrapped at that narrower width. An action name is a single line: make it nowrap, and beside the keycaps let it take the space they leave (flex_1) instead of sizing to its text, so neither its box nor its lines depend on that measurement. Stacked rows keep the whole row for the name as before. The Agents half of the report (a long Codex install-failure note squeezing the agent name to a glyph per line) is #897, already fixed on main by #898 and not yet in a stable release. --- src/ui/settings.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ui/settings.rs b/src/ui/settings.rs index febaf1f1..59bd1bf2 100644 --- a/src/ui/settings.rs +++ b/src/ui/settings.rs @@ -8543,9 +8543,18 @@ impl Tty7App { list = list.child( hand_rolled_row(div().py_1p5()) .when(!last_in_group, |s| s.border_b_1().border_color(border)) + // An action name is a line, never a paragraph: wrapped, it + // came out one or three CJK glyphs a line on Linux (#919), + // spilling over the rows below it while the keycaps beside + // it had room to spare. Beside the keycaps the name takes + // what they leave rather than sizing itself to its own + // measured text, so its box no longer depends on that + // measurement either; stacked, it has the whole row. .child( div() + .when(!stacked, |d| d.flex_1()) .min_w_0() + .whitespace_nowrap() .text_sm() .text_color(foreground) .child(label),