omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Agents panel: localized reset time overruns the meter (column width measured from English "00h 00m")

Open nicoladen05 opened this issue 2 weeks ago • 2 comments

What happens

With the shell in German, the reset time at the end of each meter row in the Agents panel ("2 Std. 23 Min.", "1 Tg. 22 Std.") is wider than the space kept for it, so the text is drawn over the right end of the meter.

image

Cause

In shell/plugins/agents/Panel.qml, the reset-time column gets its width from a TextMetrics with a fixed English sample:

TextMetrics {
  id: compactValueMetrics
  ...
  text: "00h 00m"
}

Text {
  id: compactValue
  width: Math.ceil(compactValueMetrics.advanceWidth)
  anchors.right: parent.right
  horizontalAlignment: Text.AlignRight
  text: compact.resetMs > 0 ? root.formatDuration(compact.resetMs) : ""
}

The meter is anchored to compactValue.left. The text itself comes from agents.durationDaysHours / agents.durationHoursMinutes, which are %1d %2h / %1h %2m in English but %1 Tg. %2 Std. / %1 Std. %2 Min. in German. The text is wider than the box it is right-aligned in, so it spills to the left over the meter. The same thing can happen in any locale whose duration strings are longer than "00h 00m".

Suggested fix

Measure the localized strings, not a fixed English sample. For example, use the wider of the two formats with placeholder digits:

TextMetrics { id: hmMetrics; font: ...; text: Commons.I18n.t("agents.durationHoursMinutes").arg("00").arg("00") }
TextMetrics { id: dhMetrics; font: ...; text: Commons.I18n.t("agents.durationDaysHours").arg("00").arg("00") }
// compactValue.width: Math.ceil(Math.max(hmMetrics.advanceWidth, dhMetrics.advanceWidth))

The meter then gets shorter in long-string locales, but every meter still ends in the same place.

Related

  • #18054 / #18095: the same kind of localized-text overflow in the power panel
  • #15982: text clipping in the Dock menu and Clock header in Brazilian Portuguese

System

  • omarchy 4.5.0-3
  • Shell language: German (de)

nicoladen05 avatar Nov 13 '26 21:11 nicoladen05

Polish (pl) is affected too: "4godz. 52min" and "15d 4godz." run over the meter at the default panel width (omarchy 4.5.0-3).

Separately from the width fix, the Polish catalog mixes styles. agents.durationDaysHours is %1d %2godz., so the English "d" sits next to the Polish "godz.", and neither string has a space between number and unit. A shorter, consistent pair would read naturally and fit almost the English width:

"agents.durationDaysHours": "%1 d %2 h",
"agents.durationHoursMinutes": "%1 h %2 min",
"agents.durationMinutes": "%1 min",

"h" and "min" are standard SI abbreviations in Polish UI text. With these, the measured-width fix proposed above leaves the Polish meters only slightly shorter than English.

Filed by Claude Opus 5.5 via Claude Code.

MarcinKarolak avatar Nov 15 '26 19:11 MarcinKarolak

Codex High read the report, the Polish follow-up, and the current quattro source. shell/plugins/agents/Panel.qml still measures the reset-time column using the English 00h 00m sample. No worker reproduction or fix was attempted.

I classified this as a bug, but the configured second classifier, deepseek-v4p1-flash, returned no classification. The classification remains unsettled, so this is waiting for maintainer attention before verification can continue. The separate review service passed its availability check; it has not reviewed this issue.

omarchybot avatar Nov 19 '26 03:11 omarchybot