omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Network panel stat rows overlap when [font] body-small is raised

Open UnderStackDev opened this issue 2 months ago • 6 comments

Summary

The network bar plugin's detail panel (Ping/Packet Loss/Receiving/Sending/Downloaded/Uploaded/IP Address/Gateway) renders its label and value text overlapping instead of side-by-side when [font] body-small in shell.toml is raised above the design default.

Steps to reproduce

  1. Set a noticeably larger body-small in ~/.config/omarchy/shell.toml, e.g.:
    [font]
    body-small = 16
    
    (default is derived from base-size, ~11px)
  2. omarchy-restart-shell
  3. Open the network bar widget's popup panel.

Observed

The stat grid rows (Receiving/Sending, Downloaded/Uploaded, IP Address/Gateway, etc.) show the value text painted on top of the label text instead of properly spaced side-by-side columns.

Root cause

plugins/panels/network/Panel.qml lays the stat rows out in a 4-column GridLayout (InfoLabel, DetailValue, InfoLabel, DetailValue). DetailValue/InfoValue is Layout.fillWidth: true with no Layout.minimumWidth, so when the row's natural width (two label+value pairs at Style.font.bodySmall) exceeds the panel's fixed contentWidth (Style.space(380)), GridLayout shrinks the fill-width value column down toward 0. Text in Qt Quick doesn't clip overflowing content by default, and InfoValue sets neither clip nor elide, so the value paints outside its (now too-narrow) column bounds and visually overlaps the neighboring label.

This is reachable any time the rendered row width exceeds contentWidth — a larger body-small, a longer IP/SSID value, or a narrower panel width would all trigger it the same way.

Suggested fix

Add clip: true and elide: Text.ElideRight to the InfoValue component (Panel.qml, ~line 1964) so a squeezed value truncates cleanly instead of overlapping the label. I've verified this locally and it resolves the overlap.

Environment

  • omarchy 4.0.4-1

UnderStackDev avatar Sep 28 '26 17:09 UnderStackDev

Reproduced on a fresh Omarchy worker running a real Hyprland session, loading the real network panel from quattro (7dd477b35) with mocked networking and synthetic connection details.

The bug is real, and the diagnosis is right. With [font] body-small = 16, three rows paint their value over the label beside it: Downloaded, IP Address and Gateway. The IP starts painting about 70px to the left of where its label ends. At the default size the rows are clean. The cause is the one you describe: the stat grid in shell/plugins/panels/network/Panel.qml (around line 1402) is four columns inside a panel Style.space(380) wide, and the value columns are Layout.fillWidth with no minimum, so they absorb whatever the labels leave. Style.space() grows with base-size, not with a pinned body-small, so raising body-small on its own widens the text without widening the panel. Raising base-size scales both together and does not trigger it: at base-size 16 and 20 the panel widened to match and every row stayed clean.

The suggested elide fix stops the overlap but loses the values. With elide: Text.ElideRight on the value text, measured on the same worker:

  • At body-small = 16, every value is cut to about 38px: 117…, 198…, 0 B….
  • At body-small = 22, the value columns are 5px wide and show nothing.
  • At the default size, a 14-character address like 198.51.100.123 becomes 198.51.100…. Today it shows in full, spilling slightly into the gap between columns. That makes the change a regression for the default case.

clip: true would not bring any of that back. Removing the line again brought the overlap back at 16px.

So no fix pull request has been opened. Fixing this properly means choosing how the panel behaves when the text outgrows it: make the panel width follow body-small, reflow the grid to two columns when four do not fit, put each value under its label, or accept truncation. That choice is the maintainer's. If you have hit this, raising base-size instead of body-small scales the panel along with the text and avoids it in the meantime.

Second opinion from Codex at medium effort: it agreed with the mechanism, agreed that elision is not an acceptable fix, and found no contained fix that keeps the values readable at the default size. It also noted that the power panel's two-column info rows can let a long value run past its row in the same way. Codex saw these conclusions before reviewing, so its agreement is not independent. This is now waiting on the maintainer.

omarchybot avatar Oct 13 '26 04:10 omarchybot

Same root cause, but at the default font with a non-English catalog

This also reproduces on quattro with the default [font] settings, no body-small override, when the shell language is French. The grid's natural width exceeds the panel's fixed Style.space(380) content width because the French labels are longer (Perte de paquets, Adresse IP, Passerelle), so the two Layout.fillWidth value columns shrink and the right-aligned IP paints over the end of its own label.

Before (fr, default font) After (one pair per row)
French network panel with the IP value painted over the Adresse IP label French network panel with each label/value pair on its own row

English happens to fit at the default 12 px — the IP starts with almost no gap left — which is why a longer translation, a longer address, or a larger body-small all push the same grid over the edge. The captures use the network-panel fixture with synthetic details (Guest Wi-Fi, 192.0.2.10 / 192.0.2.1), so no real SSID or address is exposed. They are on an evidence branch in my fork: https://github.com/jotenakis2/omarchy/tree/issue-13572-evidence.

What I tried

Changing the stat grid from columns: 4 to columns: 2, one label/value pair per row, which is the same full-width row layout the power and Dropbox panels already use:

         GridLayout {
           width: parent.width
-          columns: 4
+          columns: 2
           columnSpacing: Style.space(20)
           rowSpacing: Style.spacing.labelGap

The panel gets taller, but each pair now has the full card width, so no value can paint over a label regardless of translation or font size.

Verification

  • Reproduced in the real shell on Omarchy 4.5.0-3 (quattro, panel source matching 14abc07) with the French catalog and default font settings.
  • bash test/shell.d/network-test.sh and bash test/shell.d/network-panel-runtime-test.sh pass with the change.
  • Visually checked the patched panel in FR and EN; the address rows stay fully readable in both.

I have not opened a separate PR: #8741 already fixes the address rows in the narrower form, and the bot's note above is right that the wider choice is the maintainer's. If reflowing to two columns is the preferred direction, I am happy to turn this into a PR for this issue; it would also cover the font-size triggers from #13574 for this panel.

jotenakis2 avatar Nov 06 '26 20:11 jotenakis2

Rechecked on current quattro (419a5a709) on a fresh Omarchy worker with real Hyprland and Quickshell, loading the real network panel with mocked networking and synthetic details. The French case also reproduces at the default body-small size of 11 px: with 198.51.100.123, the address paints about 11 px into “Adresse IP”. The same values fit in English. The shorter 192.0.2.10 / 192.0.2.1 example fits in French on this worker, so the failure depends on the address and font metrics as well as the language. English at body-small = 16 still overlaps on Downloaded, IP Address and Gateway.

The four-column grid still has 348 px of usable width. The longer French “Perte de paquets” label leaves less room for the value columns; the right-aligned address then paints beyond its column. Changing the language while keeping the network fixture and font size fixed isolates that layout pressure.

#8741 remains open and gives the IP address and gateway full-width rows; it leaves the six other statistics in paired columns. #19074 is also open and clips/elides values in the existing columns. The font-width approach in #13574 was closed unmerged by its author. I have not opened another fix: the choice of full rows, a wider panel, or truncation is still waiting on the maintainer. This diagnosis used layout measurements and a worker capture; no test suite was run.

Codex High ran the reproduction. Opus 5.5 High and muse-wonder via pi, thinking high, reviewed the source and measurements and agreed that the layout choice remains with the maintainer. They also noted that a two-column grid still has a finite width limit, so it cannot guarantee that every font size fits. They could read the working notes; their agreement is not guaranteed to be independent.

French at the default 11 px body-small size: the synthetic address overlaps its label in the real panel loaded with mocked networking.

omarchybot avatar Nov 18 '26 04:11 omarchybot

#8741 now covers the statistics rows as well as IP Address and Gateway. It gives the addresses their own rows and switches the other statistics to one label and value per row when space is tight. The worker check at 18c50f4 cleared the reported overlap at body-small = 16, and reverting the change brought it back. #19074 keeps four columns and abbreviates values that overflow. Both PRs are linked here for the maintainer's decision. Worker results and screenshots

GPT-6 High in Codex checked the diffs and existing worker results. Opus 5.5 High and muse-wonder via pi, thinking high agreed after reading the worker report. Verification of the French default-font case is limited to the earlier reproduction on the base branch.

omarchybot avatar Nov 28 '26 20:11 omarchybot

Confirming on Omarchy 4.5.0-3 with the stock shell.toml, the only change being omarchy display text size 14 (which raises [font] base-size and therefore body-small proportionally).

The detail-panel rows paint the right-aligned value over the label — in my case Downloaded/Uploaded and IP Address/Gateway (see the reported collision between "Indirizzo IP" and the start of 10.11.12.29 in the issue screenshot). Nothing is clipped: the full value remains selectable/copyable.

One detail that may help triage: with an Italian locale the labels are localized and wider ("Indirizzo IP" instead of "IP Address"), so the collision already appears at a modest 14 px instead of 16 — any fix that accounts for label width rather than a fixed row height will also have to handle localized labels.

lordwotton29 avatar Nov 28 '26 21:11 lordwotton29

I reproduced the Italian overlap on a fresh Omarchy worker running quattro (95a1c34752) with synthetic network details. At base-size = 14 (derived body-small = 13), the address drew about 3 px into “Indirizzo IP” and fit in English at the same width. The transfer rows fit with the sample values.

#8741 gives the address and gateway their own rows and uses the translated label widths to decide when to reflow the other statistics. The Italian worker result is for quattro. Both linked fixes are awaiting the maintainer’s decision.

GPT-6 High in Codex ran the reproduction. Opus 5.5 High and muse-wonder via pi, thinking high reviewed the measurements and agreed after reading my diagnosis, so their agreement may reflect it.

English at base size 14, with a gap between the IP label and value. Italian at base size 14, with the same synthetic value touching the IP label.

omarchybot avatar Nov 28 '26 22:11 omarchybot