From 6cf491d9210fb2e0e813fb6470c6928320b0d4f3 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Bruhn Date: Tue, 16 Dec 2025 23:49:35 +0100 Subject: [PATCH 1/3] feature: Add browser compatibility detection for Web Bluetooth MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Detects if the browser supports Web Bluetooth API and displays an informative warning when unsupported. Provides users with clear options: use a compatible browser or download the desktop app. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- src/App.tsx | 70 ++++++++++++++++++++++++++--------- src/utils/bluetoothSupport.ts | 17 +++++++++ 2 files changed, 69 insertions(+), 18 deletions(-) create mode 100644 src/utils/bluetoothSupport.ts diff --git a/src/App.tsx b/src/App.tsx index c2e8c7f..3c5524a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -12,6 +12,7 @@ import { BluetoothDevicePicker } from './components/BluetoothDevicePicker'; import { getErrorDetails } from './utils/errorCodeHelpers'; import { getStateVisualInfo } from './utils/machineStateHelpers'; import { CheckCircleIcon, BoltIcon, PauseCircleIcon, ExclamationTriangleIcon, ArrowPathIcon, XMarkIcon, InformationCircleIcon } from '@heroicons/react/24/solid'; +import { isBluetoothSupported } from './utils/bluetoothSupport'; import './App.css'; function App() { @@ -333,27 +334,60 @@ function App() {
{/* Left Column - Controls */}
- {/* Connect Button - Show when disconnected */} + {/* Connect Button or Browser Hint - Show when disconnected */} {!isConnected && ( -
-
-
- - - + <> + {isBluetoothSupported() ? ( +
+
+
+ + + +
+
+

Get Started

+

Connect to your embroidery machine

+
+
+
-
-

Get Started

-

Connect to your embroidery machine

+ ) : ( +
+
+ +
+

Browser Not Supported

+

+ Your browser doesn't support Web Bluetooth, which is required to connect to your embroidery machine. +

+
+

Please try one of these options:

+
    +
  • Use a supported browser (Chrome, Edge, or Opera)
  • +
  • + Download the Desktop app from{' '} + + GitHub Releases + +
  • +
+
+
+
-
- -
+ )} + )} {/* Pattern File - Show during upload stage (before pattern is uploaded) */} diff --git a/src/utils/bluetoothSupport.ts b/src/utils/bluetoothSupport.ts new file mode 100644 index 0000000..84685c2 --- /dev/null +++ b/src/utils/bluetoothSupport.ts @@ -0,0 +1,17 @@ +/** + * Check if the current browser/environment supports Web Bluetooth API + * @returns true if Web Bluetooth is supported (or running in Electron), false otherwise + */ +export function isBluetoothSupported(): boolean { + // Always supported in Electron app + if (typeof window !== 'undefined' && (window as any).electronAPI) { + return true; + } + + // Check for Web Bluetooth API support in browser + if (typeof navigator !== 'undefined' && 'bluetooth' in navigator) { + return true; + } + + return false; +} From 5fea462a7105288968b5bcb9a3e949dda4f440d6 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Bruhn Date: Tue, 16 Dec 2025 23:49:35 +0100 Subject: [PATCH 2/3] feature: Add browser compatibility detection for Web Bluetooth MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Detects if the browser supports Web Bluetooth API and displays an informative warning when unsupported. Provides users with clear options: use a compatible browser or download the desktop app. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- src/utils/bluetoothSupport.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/bluetoothSupport.ts b/src/utils/bluetoothSupport.ts index 84685c2..eb87b7d 100644 --- a/src/utils/bluetoothSupport.ts +++ b/src/utils/bluetoothSupport.ts @@ -4,12 +4,12 @@ */ export function isBluetoothSupported(): boolean { // Always supported in Electron app - if (typeof window !== 'undefined' && (window as any).electronAPI) { + if (typeof window !== "undefined" && "electronAPI" in window) { return true; } // Check for Web Bluetooth API support in browser - if (typeof navigator !== 'undefined' && 'bluetooth' in navigator) { + if (typeof navigator !== "undefined" && "bluetooth" in navigator) { return true; } From dac772713cffaead4682204070fcaeb32434137c Mon Sep 17 00:00:00 2001 From: Jan-Henrik Bruhn Date: Tue, 16 Dec 2025 23:58:26 +0100 Subject: [PATCH 3/3] ci: add nameto autolabel workfow --- .github/workflows/autolabel.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/autolabel.yaml b/.github/workflows/autolabel.yaml index 87b97c4..eabe804 100644 --- a/.github/workflows/autolabel.yaml +++ b/.github/workflows/autolabel.yaml @@ -1,3 +1,5 @@ +name: Autolabel + on: pull_request: types: [opened, reopened, synchronize]