# Files changed · PR \#618 · lucenx/codexbar-plasma

[View on GitCafe](https://git.cafe/lucenx/codexbar-plasma/pull/618/diffs)

Repository: [lucenx/codexbar-plasma](https://git.cafe/lucenx/codexbar-plasma)

Visibility: public

[fix\(popup\): clarify overview quota hierarchy](https://git.cafe/lucenx/codexbar-plasma/pull/618.md)

Version: 6

Head commit: 34c93ff14290ba5e7e7926831d0e0fd5138b8686

Base commit: 666711530e2e9e9d06a80ec73f62f7809cc93424

Comparison base: 666711530e2e9e9d06a80ec73f62f7809cc93424

Showing up to 20 entries from this revision. If the pull request changes, reopen the first page before continuing.

## CHANGELOG.md

Status: modified; +6; −0

```diff
@@ -16,6 +16,12 @@
   status of each service component read from the public status page, with
   OpenAI's grouped components collapsible, and open the page from the list.
 
+### Changed
+
+- Make Overview quota names easier to distinguish from reset metadata, keep
+  percentages aligned with their meters, and align provider icons with their
+  names and accounts. Reveal usage-row hide actions immediately on hover or keyboard focus.
+
 ### Security
 
 - Redact secret-key and secret-access-key assignments, including AWS environment
```

## contents/ui/components/OverviewProviderRow.qml

Status: modified; +35; −4

```diff
@@ -104,6 +104,7 @@
         Rectangle {
             id: overviewProviderIdentitySurface
 
+            Layout.alignment: Qt.AlignTop
             Layout.preferredWidth: Kirigami.Units.iconSizes.medium
                 + Kirigami.Units.smallSpacing * 2
             Layout.preferredHeight: Layout.preferredWidth
@@ -157,26 +158,54 @@
 
                     required property var modelData
                     readonly property bool captionTruncated: overviewMeterCaption.truncated
+                        || overviewMeterReset.truncated
 
                     Layout.fillWidth: true
                     Layout.topMargin: Kirigami.Units.smallSpacing / 2
                     spacing: Kirigami.Units.smallSpacing / 2
 
+                    Item {
-                    RowLayout {
+                        id: overviewMeterHeader
+
                         Layout.fillWidth: true
+                        implicitHeight: Math.max(overviewMeterCaption.implicitHeight,
+                            overviewMeterReset.implicitHeight, overviewMeterPercent.implicitHeight)
-                        spacing: Kirigami.Units.smallSpacing
+                        implicitWidth: overviewMeterCaption.implicitWidth
+                            + overviewMeterReset.implicitWidth + overviewMeterPercent.implicitWidth
+                            + Kirigami.Units.smallSpacing * 2
 
                         PlainPlasmaLabel {
                             id: overviewMeterCaption
 
+                            text: overviewMeter.modelData.label || ""
+                            font.pointSize: Kirigami.Theme.smallFont.pointSize
+                            font.weight: Font.DemiBold
+                            opacity: overviewRow.applet.valueTextOpacity
+                            anchors.verticalCenter: parent.verticalCenter
+                            width: Math.min(implicitWidth, Math.max(0,
+                                overviewMeterPercent.x - Kirigami.Units.smallSpacing))
+                            elide: Text.ElideRight
+                        }
+
+                        PlainPlasmaLabel {
-                            text: overviewRow.meterCaption(overviewMeter.modelData)
+                            id: overviewMeterReset
+
+                            text: overviewRow.applet.resetTextForRow(overviewMeter.modelData)
+                            visible: text.length > 0
                             font: Kirigami.Theme.smallFont
                             opacity: overviewRow.applet.secondaryTextOpacity
+                            anchors.verticalCenter: parent.verticalCenter
+                            x: overviewMeterCaption.width + Kirigami.Units.smallSpacing
+                            width: Math.max(0, overviewMeterPercent.x - x
+                                - Kirigami.Units.smallSpacing)
-                            Layout.fillWidth: true
                             elide: Text.ElideRight
                         }
 
                         PlainPlasmaLabel {
+                            id: overviewMeterPercent
+
+                            anchors.right: parent.right
+                            anchors.verticalCenter: parent.verticalCenter
                             text: overviewRow.applet.usagePercentText(overviewMeter.modelData)
                             font.pointSize: Kirigami.Theme.smallFont.pointSize
                             font.weight: Font.DemiBold
@@ -225,6 +254,8 @@
             isMask: true
             color: Kirigami.Theme.textColor
             opacity: overviewRow.applet.secondaryTextOpacity
+            Layout.alignment: Qt.AlignTop
+            Layout.topMargin: Kirigami.Units.smallSpacing * 3
             Layout.preferredWidth: Kirigami.Units.iconSizes.small
             Layout.preferredHeight: Kirigami.Units.iconSizes.small
             Accessible.role: Accessible.Graphic
```

## contents/ui/components/ProviderUsageRow.qml

Status: modified; +0; −6

```diff
@@ -83,12 +83,6 @@
 
             onClicked: usageRow.applet.hidePopupUsageRow(
                 usageRow.providerData ? usageRow.providerData.provider : "", usageRow.rowData)
-
-            Behavior on opacity {
-                NumberAnimation {
-                    duration: Kirigami.Units.shortDuration
-                }
-            }
         }
 
         PlainPlasmaLabel {
```

## docs/codexbar-plasma-overview.png

Status: modified; +0; −0

Binary file; no text patch.

## docs/usage.md

Status: modified; +4; −0

```diff
@@ -168,6 +168,9 @@
   detail line shows the account identity when the CLI provides one, and an
   active service incident otherwise; an operational status or the provider's
   own source name is never presented as identity.
+  Provider icons align with the name and account. Each quota name is emphasized
+  separately from its reset, which shortens first when space is limited; the
+  percentage stays aligned with the end of its meter.
 - Screen readers hear what the popup draws. Overview rows describe their
   detail line, then each named quota with its reset; provider tabs describe
   the quota their underline draws, a last-known-usage note, and a refresh
@@ -188,6 +191,7 @@
 - Refresh, copy, share, hide and tab-scroll icon buttons show their action
   labels on keyboard focus as well as hover. The copy confirmation takes
   precedence over its action label.
+  Usage-row hide actions appear immediately on hover or keyboard focus.
   Provider action rows keep their full native hover and focus outlines visible
   inside the scrollable popup.
 - Overflowing popup tabs have separate scroll buttons and immediate keyboard
```

## tests/tst_popup_controls.qml

Status: modified; +4; −1

```diff
@@ -36,6 +36,7 @@
         property string lastUpdatedText: "Updated 12:00"
         property string providerUpdatedText: "Provider updated 11:55"
         property real secondaryTextOpacity: 0.7
+        property real valueTextOpacity: 0.85
         property real roundedSurfaceRadius: 8
         property real nestedSurfaceRadius: 4
         property real compactMeterTrackHeight: 5
@@ -235,6 +236,7 @@
     // Each quota window is named beside its own meter, so a short session
     // window can never stand in for an exhausted weekly one.
     function test_overviewNamesEveryQuotaWindow() {
+        failOnWarning(/Qt Quick Layouts: Detected recursive rearrange/);
         var measured = Object.assign({}, provider, {
             testRows: [
                 {label: "Session", hasPercent: true, leftPercent: 57, reset: "in 2h"},
@@ -246,7 +248,8 @@
         });
         if (!row)
             return;
+        verify(findText(row, "Session") !== null);
-        verify(findText(row, "Session · Resets in 2h") !== null);
+        verify(findText(row, "Resets in 2h") !== null);
         verify(findText(row, "57% left") !== null);
         verify(findText(row, "Weekly") !== null);
         verify(findText(row, "0% left") !== null);
```

## tests/tst_visual_layout.qml

Status: modified; +1; −1

```diff
@@ -1846,7 +1846,7 @@
         compare(button.visible, true);
         compare(button.opacity, 0);
         button.forceActiveFocus(Qt.TabFocusReason);
-        tryCompare(button, "opacity", 1);
+        compare(button.opacity, 1);
         mouseClick(button);
         compare(applet.hiddenUsageRowRequest, {provider: "codex", label: "Primary"});
 
```
