From 49bfb46ab717059891931d6e6caf5f0ab589f989 Mon Sep 17 00:00:00 2001 From: Cytown Date: Wed, 18 Mar 2026 16:03:03 +0800 Subject: [PATCH] fix for feat(web): implement macOS app feature and file logger --- scripts/build-macos-app.sh | 2 -- web/Makefile | 2 +- web/backend/api/gateway.go | 2 ++ web/backend/main.go | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/build-macos-app.sh b/scripts/build-macos-app.sh index 093360ab76..76cc72938e 100755 --- a/scripts/build-macos-app.sh +++ b/scripts/build-macos-app.sh @@ -80,8 +80,6 @@ cat > "${APP_CONTENTS}/Info.plist" << 'EOF' LSUIElement 1 - NSHighResolutionCapable - EOF diff --git a/web/Makefile b/web/Makefile index c631a974d6..06717f2b9c 100644 --- a/web/Makefile +++ b/web/Makefile @@ -92,5 +92,5 @@ lint: # Clean build artifacts clean: - rm -rf frontend/dist backend/dist $(BUILD_DIR)/* + rm -rf frontend/dist backend/dist $(BUILD_DIR) mkdir -p backend/dist && touch backend/dist/.gitkeep diff --git a/web/backend/api/gateway.go b/web/backend/api/gateway.go index 098e2babe7..da2cb57682 100644 --- a/web/backend/api/gateway.go +++ b/web/backend/api/gateway.go @@ -566,6 +566,8 @@ func (h *Handler) handleGatewayStart(w http.ResponseWriter, r *http.Request) { } // handleGatewayStop stops the running gateway subprocess gracefully. +// Note: Unlike StopGateway (which only stops self-started processes), this API endpoint +// stops any gateway process, including attached ones. This is intentional for user control. // // POST /api/gateway/stop func (h *Handler) handleGatewayStop(w http.ResponseWriter, r *http.Request) { diff --git a/web/backend/main.go b/web/backend/main.go index 922dc2f6dc..b1db3c57ac 100644 --- a/web/backend/main.go +++ b/web/backend/main.go @@ -81,6 +81,7 @@ func main() { logPath := filepath.Join(picoHome, "logs", "web.log") if err := logger.EnableFileLogging(logPath); err != nil { + // FIXME: https://github.com/sipeed/picoclaw/issues/1734 fmt.Fprintf(os.Stderr, "Failed to initialize logger: %v\n", err) os.Exit(1) }