From 719ba2c7f5e5acbbe12fce9e1bf81488de250012 Mon Sep 17 00:00:00 2001 From: Suriyakumarvijayanayagam Date: Fri, 11 Sep 2026 12:49:56 +0530 Subject: [PATCH] Recognition starts with the app, not with a button The engine only ever started when somebody pressed Start. So a till that rebooted overnight came back with the window open, the tray icon showing, the session restored - and recognition off until a shop assistant noticed. That is the failure the tray colours exist to catch, and it should not be the default state every morning. Guarded on the interpreter actually existing: on a PC where setup has not run yet, the supervisor would loop on a missing executable with nothing useful to say. Start and Stop remain for the case where somebody has deliberately stopped it. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01KGcjxF1cNLcuwc3DAPcnfj --- desktop/app.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/desktop/app.go b/desktop/app.go index 6369d09..4bf36f1 100644 --- a/desktop/app.go +++ b/desktop/app.go @@ -124,6 +124,23 @@ func (a *App) startup(ctx context.Context) { }) a.startPipeline(ctx) + + // Recognition starts with the app. Until this, the engine only ever + // started when somebody pressed Start - which meant a till that rebooted + // overnight came back with the window open, the tray icon showing, the + // session restored, and recognition off until a shop assistant noticed. + // That is the failure the tray colours exist to catch, and it should not + // be the default state every morning. + // + // Guarded on the interpreter actually being there: on a PC where setup has + // not run yet, starting the supervisor would loop on a missing executable + // with nothing useful to say. The Start button still exists for the one + // case where somebody has deliberately stopped it. + if _, err := os.Stat(exe); err == nil { + a.sup.Start() + } else { + log.Printf("engine not installed yet (%s); run behavision-setup, then Start", exe) + } } // webhookURL is the loopback address the bridge is listening on, or empty