This commit is contained in:
legop3
2026-07-16 22:01:18 -04:00
parent 7bc08af160
commit 0d352d326d
7 changed files with 197 additions and 29 deletions
@@ -334,7 +334,12 @@ function handleWorkerMessage(message = {}) {
if (message.type !== 'status') return;
hardwareState = String(message.state || 'unknown');
lastError = message.error ? String(message.error) : null;
// Commissioning automatically restarts discovery after a transient BlueZ
// failure. Preserve the last actionable error across the following plain
// `commissioning` status instead of replacing it with an unhelpful generic
// instruction one second later. Any real progress beyond discovery clears it.
if (message.error) lastError = String(message.error);
else if (hardwareState !== 'commissioning') lastError = null;
if (hardwareState === 'connected') {
if (!connected) {
connected = true;