From 0b58d3311752f68211d8b3c8d79263af2ad01bce Mon Sep 17 00:00:00 2001 From: sravan Date: Thu, 2 Jul 2026 08:43:40 +0530 Subject: [PATCH] =?UTF-8?q?fix(desktop):=20drop=20-w=20=E2=80=94=20SnoreTo?= =?UTF-8?q?ast=20waits=20by=20default;=20-w=20made=20it=20fail=20(exit=20-?= =?UTF-8?q?1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Testing showed SnoreToast blocks/waits for the toast interaction when given -pipeName; the -w flag actually fails on this build (exit -1) which forced the reply-less fallback. Without -w it waits, captures the typed reply, and writes it to our pipe. Co-Authored-By: Claude Opus 4.8 --- desktop/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop/main.js b/desktop/main.js index 2fe5089..61ae564 100644 --- a/desktop/main.js +++ b/desktop/main.js @@ -72,9 +72,9 @@ function snoreExe() { } catch (_) {} return null; } -// Direct SnoreToast with -w so it waits and writes the reply to our pipe. Rejects if the binary -// is missing or fails to show a toast (so the caller can fall back). Args match node-notifier's -// known-good set + -w (no -application, which broke the toast). +// Direct SnoreToast: with -pipeName it blocks and waits for the interaction on its own, then +// writes the result (incl. the typed reply) to our pipe (do NOT pass -w — it fails on this +// build; and no -application). Rejects if the binary is missing/fails so the caller can fall back. function directToast(payload, img) { return new Promise((resolve, reject) => { const exe = snoreExe(); @@ -85,7 +85,7 @@ function directToast(payload, img) { server = net.createServer((sock) => { sock.on('data', (d) => { raw = Buffer.concat([raw, d]); }); }); server.on('error', (e) => settle(reject, e)); server.listen(pipe, () => { - const args = ['-appID', APP_ID, '-tb', '-w', '-pipeName', pipe]; + const args = ['-appID', APP_ID, '-tb', '-pipeName', pipe]; if (img) args.push('-p', img); args.push('-m', payload.body || ' ', '-t', payload.title || 'Biz Connect'); const child = spawn(exe, args, { windowsHide: true });