From 423a5cef24a72d14b196afedad80b48b388f922f Mon Sep 17 00:00:00 2001 From: Tyler South Date: Wed, 26 Aug 2026 22:08:24 -0400 Subject: [PATCH] Stop the agents status card rendering as an empty box --- shell/plugins/agents/Panel.qml | 6 +++++- test/shell.d/agents-panel-test.sh | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/shell/plugins/agents/Panel.qml b/shell/plugins/agents/Panel.qml index 6637531a380..d4414a639d7 100644 --- a/shell/plugins/agents/Panel.qml +++ b/shell/plugins/agents/Panel.qml @@ -509,7 +509,11 @@ Panel { anchors.verticalCenter: parent.verticalCenter anchors.leftMargin: Style.space(12) anchors.rightMargin: Style.space(12) - text: root.provider ? String(root.provider.authHelpText || "") : "" + // The card is gated on usageStatusText, but the remedy in + // authHelpText is the better message when a collector offers + // one. A record can carry a status with no auth advice to give, + // so fall back to the status rather than render an empty box. + text: root.provider ? String(root.provider.authHelpText || root.provider.usageStatusText || "") : "" color: root.dim font.family: root.fontFamily font.pixelSize: Style.font.caption diff --git a/test/shell.d/agents-panel-test.sh b/test/shell.d/agents-panel-test.sh index c09bab8793a..f0ef99a2121 100755 --- a/test/shell.d/agents-panel-test.sh +++ b/test/shell.d/agents-panel-test.sh @@ -14,4 +14,5 @@ assert(/if \(buttonCode === Qt\.RightButton\) root\.launchAgent\(\)/.test(panelS assert(/else if \(buttonCode === Qt\.MiddleButton\) root\.selectProvider\(root\.providerIndex \+ 1\)/.test(panelSource), 'agents middle click still advances the subscription') assert(/else root\.toggle\(\)/.test(panelSource), 'agents left click still toggles the panel') assert(!/if \(buttonCode === Qt\.RightButton\) root\.refreshNow\(\)/.test(panelSource), 'agents right click no longer refreshes') +assert(/text: root\.provider \? String\(root\.provider\.authHelpText \|\| root\.provider\.usageStatusText \|\| ""\) : ""/.test(panelSource), 'status card falls back to the usage status when a record has no auth help') JS