From 12c01327dd77ffcd4a7409bf9a0174a7169058d8 Mon Sep 17 00:00:00 2001 From: wenjie Date: Tue, 17 Mar 2026 20:34:11 +0800 Subject: [PATCH] Remove redundant Darwin tray stub (#1694) --- web/backend/tray_stub_darwin_nocgo.go | 32 --------------------------- 1 file changed, 32 deletions(-) delete mode 100644 web/backend/tray_stub_darwin_nocgo.go diff --git a/web/backend/tray_stub_darwin_nocgo.go b/web/backend/tray_stub_darwin_nocgo.go deleted file mode 100644 index c54aaac1b..000000000 --- a/web/backend/tray_stub_darwin_nocgo.go +++ /dev/null @@ -1,32 +0,0 @@ -//go:build darwin && !cgo - -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - "time" - - "github.com/sipeed/picoclaw/pkg/logger" -) - -func runTray() { - logger.Infof("System tray is unavailable in darwin builds without cgo; running without tray") - - if !*noBrowser { - go func() { - time.Sleep(browserDelay) - if err := openBrowser(); err != nil { - logger.Errorf("Warning: Failed to auto-open browser: %v", err) - } - }() - } - - ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM) - defer stop() - - <-ctx.Done() - shutdownApp() -}