fix(mesh): ride out the radio restart during apply — no false errors, no setup modal
Demo images / Build & push demo images (push) Successful in 3m54s

Applying RF settings deliberately restarts the radio daemon (~15-20s).
Two things treated that healthy, expected gap as a fault (operator,
2026-08-06):

- radio_state was single-shot: a query landing inside the restart
  window reported "The radio daemon did not answer the state query"
  for a restart that was working correctly. It now retries for ~30s
  and says the radio is restarting while it waits. A real device-level
  refusal (not an RNode) still returns immediately.
- The device-setup modal auto-opens for any detected-but-unconnected
  port, so the restart looked like a newly plugged stick and
  interrupted the apply. Apply and Reboot now suppress auto-detect for
  90s via mesh.suppressDeviceDetect().

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
archipelago
2026-08-06 09:55:52 -04:00
co-authored by Claude Fable 5
parent 53753687a5
commit f394c02055
3 changed files with 60 additions and 15 deletions
+11
View File
@@ -356,9 +356,19 @@ export const useMeshStore = defineStore('mesh', () => {
// The modal waits for 2 sightings so it doesn't flash during the couple of
// seconds an ordinary reconnect (same radio, transient blip) needs.
const detectSightings = ref<Record<string, number>>({})
/** Epoch-ms until which the device-setup modal must NOT auto-open: an
* operator-initiated radio restart (settings apply, Reboot Radio) takes
* the radio down for ~15-20s, and the modal treated that healthy,
* expected gap as "a new stick was plugged in" and interrupted the flow
* (operator, 2026-08-06). */
const suppressDetectUntil = ref(0)
function suppressDeviceDetect(ms = 90_000) {
suppressDetectUntil.value = Date.now() + ms
}
const undismissedDetectedDevices = computed(() => {
const s = status.value
if (!s) return []
if (Date.now() < suppressDetectUntil.value) return []
return (s.detected_devices || []).filter(p =>
dismissedDetected.value[p] !== pluggedAt(s, p) &&
// The port the live session occupies is not a candidate…
@@ -1148,6 +1158,7 @@ export const useMeshStore = defineStore('mesh', () => {
latestBlockHeight,
fetchStatus,
undismissedDetectedDevices,
suppressDeviceDetect,
dismissDetectedDevice,
flashFlowPath,
openFlashFlow,