96f9b36fbbaf

popup/index.tsx: import and call setupMessageHandler on native — Android has no MV3 service worker so the popup itself owns message routing; without this the chrome shim's _handler stayed null and every sendMessage timed out as SERVICE_WORKER_UNAVAILABLE

time
2026-05-07 02:37 UTC · 5 months ago
machine
koh2
parent
1febc9d6daf1
1 file src/popup/index.tsx+9 −0
src/popup/index.tsx+9 −0
@@ -1,5 +1,14 @@11 import { render } from "solid-js/web";22 import App from "./App";3+import { isNativePlatform } from "../shared/native";4+5+// Android: there is no MV3 service worker, so the popup itself owns message6+// handling. Without this the chrome shim's sendMessage queue fills up and7+// every call times out as SERVICE_WORKER_UNAVAILABLE. setupMessageHandler8+// also wires __peachRegisterMessageHandler for in-process routing.9+if (isNativePlatform()) {10+  void import("../background/messages").then((m) => m.setupMessageHandler());11+}312 413 const root = document.getElementById("app");514 if (root) {

view file