From cf5efea3e4bdaedf9b5e080dbfdca8ba1d2668e8 Mon Sep 17 00:00:00 2001 From: rouggy Date: Thu, 27 Aug 2026 00:32:00 +0200 Subject: [PATCH] fix(cat): the chip opens the radio menu with one radio too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It only became a menu from two radios, on the reasoning that a single radio has nothing to switch to. That hides the feature from precisely the operator who has not made a second radio yet — the click lands on a settings dialog they did not ask for, which is what happened on the first try. With one radio the menu now shows that radio and 'Add a radio…'. Right-click still goes straight to the CAT settings. --- frontend/package.json.md5 | 2 +- frontend/src/App.tsx | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/frontend/package.json.md5 b/frontend/package.json.md5 index 693b40b..b826f3b 100644 --- a/frontend/package.json.md5 +++ b/frontend/package.json.md5 @@ -1 +1 @@ -f9b41e192918fa2511f68cd1b361fcd3 \ No newline at end of file +704fe1bf370b669665df0606fae8a69d \ No newline at end of file diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index f7bf003..12a40b2 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -316,15 +316,22 @@ function RadioChip({ catUp, catState, onOpenSettings }: { const label = catUp ? (catState.rig || 'CAT') : (catState.enabled ? (shortCatError(catState.error) || 'CAT off') : 'CAT'); - const many = radios.length > 1; + // The menu opens with ONE radio too. + // + // It was only shown from two, on the reasoning that a single radio has + // nothing to switch to — but that hides the feature exactly from the operator + // who has not made a second radio yet, and the click lands on the settings + // dialog they were not asking for. With one radio the menu shows that radio + // and the way to add another. + const has = radios.length > 0; return (
- {open && many && ( + {open && has && (
{radios.map((r) => (
)}