Repository navigation
fix(browser): open WhatsApp Web in the browser - #727
Merged
Merged
Conversation
WhatsApp's server refuses any browser that names an app beside Chrome, so Scient's tabs got "WhatsApp works with Google Chrome 100+" on a current engine. Drop the app name from requests to web.whatsapp.com only. Every other site keeps Electron's native identity, because Cloudflare Turnstile loops on some rewritten ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without this, removing the mount left all tests passing while WhatsApp went back to being blocked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
yaacovcorcos
enabled auto-merge
November 1, 2026 09:52
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WhatsApp Web now opens in Scient's browser. It used to show "WhatsApp works with Google Chrome 100+" even though the engine is Chrome 152.
Cause
Electron's native identity includes the app's name:
Scient/0.6.26 Chrome/152… Electron/44… Safari/537.36. WhatsApp's server refuses any browser that names an app beside Chrome. It refused the token before Chrome, after Safari, and with a modern version number.Electron/…alone is accepted.Change
New
apps/desktop/src/scient/browser/siteBrowserIdentity.tsdrops the app name from theUser-Agentrequest header forweb.whatsapp.comonly. It is mounted where each browser session is created, so normal and incognito tabs both get it. The page's ownnavigator.userAgentstays native.It is one host because a general rewrite is what upstream removed in pingdotgg/t3code#7110: Cloudflare Turnstile loops on rewritten identities.
Measured (Electron 44.10 / Chrome 152, macOS)
dash.cloudflare.com/loginUpstream measured the middle row failing on Electron 41 / Linux, which is another reason not to apply it everywhere.
Through the real
BrowserSessioncode in a dev app with this change:dash.cloudflare.com/logindoes not loop in the same session.Electron proxies a session's requests once any
webRequestlistener exists, so the hook's path reaches beyond WhatsApp. A session with the hook matched one without on download, 500 KB upload, CORS preflight, streaming, WebSocket and the Google sign-in page.Not proven
Electron keeps one
onBeforeSendHeaderslistener per session, so any later listener on these sessions would silently replace this one. Nothing else registers one today.🤖 Generated with Claude Code