From be2c64be027576d4238b91c5c334757a58052d21 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Fri, 5 Jun 2026 17:45:49 -0700 Subject: [PATCH] fix(desktop): wire serializeJsonBody into OAuth request path The salvaged helper exported serializeJsonBody but main.cjs still inline-built the request body, leaving the export dead and the test decoupled from the real path. Use it at the fetchJsonViaOauthSession site so the helper's coverage exercises production body construction. Byte-identical output. --- apps/desktop/electron/main.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/desktop/electron/main.cjs b/apps/desktop/electron/main.cjs index 775408f959a..91b813d5e81 100644 --- a/apps/desktop/electron/main.cjs +++ b/apps/desktop/electron/main.cjs @@ -3468,7 +3468,7 @@ function fetchJsonViaOauthSession(url, options = {}) { reject(new Error(`Unsupported Hermes backend URL protocol: ${parsed.protocol}`)) return } - const body = options.body === undefined ? undefined : Buffer.from(JSON.stringify(options.body)) + const body = serializeJsonBody(options.body) const timeoutMs = resolveTimeoutMs(options.timeoutMs, DEFAULT_FETCH_TIMEOUT_MS) const request = electronNet.request({