From bdaa3134fd80050acae1452a692d15f37270e281 Mon Sep 17 00:00:00 2001 From: Hunter275 Date: Thu, 9 Jul 2026 00:39:05 -0400 Subject: [PATCH 1/2] add checks for both bluetooth and serial in the FeatureErrorMessage logic --- .../Dialog/AddConnectionDialog/AddConnectionDialog.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/web/src/components/Dialog/AddConnectionDialog/AddConnectionDialog.tsx b/apps/web/src/components/Dialog/AddConnectionDialog/AddConnectionDialog.tsx index 38332c7f3..1c9b8a0f7 100644 --- a/apps/web/src/components/Dialog/AddConnectionDialog/AddConnectionDialog.tsx +++ b/apps/web/src/components/Dialog/AddConnectionDialog/AddConnectionDialog.tsx @@ -103,6 +103,14 @@ const FeatureErrorMessage = ({ missingFeatures, tabId }: FeatureErrorProps) => { return null; } + if (tabId === "serial" && !missingFeatures.includes("Web Serial")) { + return null; + } + + if (tabId === "bluetooth" && !missingFeatures.includes("Web Bluetooth")) { + return null; + } + const browserFeatures = missingFeatures.filter( (feature) => feature !== "Secure Context", ); From 75cca103c2ed726a967042abbb19ca347b5f749e Mon Sep 17 00:00:00 2001 From: Hunter275 Date: Thu, 9 Jul 2026 23:27:26 -0400 Subject: [PATCH 2/2] move the check further down and only show if neither needsSecureContext and needsFeature are empty --- .../AddConnectionDialog/AddConnectionDialog.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/apps/web/src/components/Dialog/AddConnectionDialog/AddConnectionDialog.tsx b/apps/web/src/components/Dialog/AddConnectionDialog/AddConnectionDialog.tsx index 1c9b8a0f7..f8c21a685 100644 --- a/apps/web/src/components/Dialog/AddConnectionDialog/AddConnectionDialog.tsx +++ b/apps/web/src/components/Dialog/AddConnectionDialog/AddConnectionDialog.tsx @@ -103,14 +103,6 @@ const FeatureErrorMessage = ({ missingFeatures, tabId }: FeatureErrorProps) => { return null; } - if (tabId === "serial" && !missingFeatures.includes("Web Serial")) { - return null; - } - - if (tabId === "bluetooth" && !missingFeatures.includes("Web Bluetooth")) { - return null; - } - const browserFeatures = missingFeatures.filter( (feature) => feature !== "Secure Context", ); @@ -123,6 +115,10 @@ const FeatureErrorMessage = ({ missingFeatures, tabId }: FeatureErrorProps) => { ? "Web Serial" : undefined; + if (!needsFeature && !needsSecureContext) { + return null; + } + return (