Repository navigation
Open sites that refuse Scient's browser identity - #728
Merged
Merged
Conversation
WhatsApp and monday.com refuse Electron's native identity, while Cloudflare and some journals refuse a Chrome identity from a browser that isn't Chrome. Requests now say Chrome by default, a page refused with a 403 is retried once with the true identity, and Cloudflare's challenge host keeps the true identity. This replaces the WhatsApp-only rule from #727. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yaacovcorcos
enabled auto-merge
November 1, 2026 14:03
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 1280ccd)
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. |
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.
What Changed
Scient's browser now opens sites that refuse Electron, such as WhatsApp and monday.com, without a per-site list. This replaces the WhatsApp-only rule from #727.
apps/desktop/src/scient/browser/siteBrowserIdentity.tshas three rules, applied to every browser session, normal and incognito:User-Agentheader. The page's ownnavigator.userAgentstays native.challenges.cloudflare.comkeeps the true identity.This PR also carries upstream's
1280ccd0d2(pingdotgg/t3code#28603), which pins the clock in oneUsageServicetest. That test used a fixed date that passed the 92-day retention limit at 10:00 UTC on 2026-11-01, so it now fails on every branch, includingmain, and blocks the merge queue.Why
Sites refuse opposite things, so neither identity works alone:
Electron/.A site list only learns after a user is blocked. Changing only the header, with one fallback, covers both groups.
The retry reloads after the refused page arrives. Cancelling the response and calling
loadURLshowsERR_BLOCKED_BY_CLIENTon a real address-bar load, and reloading any sooner repeats the previous page. If the user leaves first, the page that arrives instead isn't reloaded.Measured (Electron 44.10 / Chrome 152, macOS)
Through the real address bar in a dev app, these load: WhatsApp, monday.com, IEEE, ScienceDirect, Science, Wiley, ACS, Oxford, Cell, Taylor & Francis, Sage, Nature, the Cloudflare login, two Cloudflare bot challenges, Overleaf, GitHub, Google, Microsoft and chess.com. A page that refuses everything gets exactly two requests.
dash.cloudflare.com/loginThe retry was run in real Electron against a local server: a plain refused page, one with a fragment, an empty 403, a redirect to a refused page, a page refused with both identities, and leaving or stopping before arrival.
The hooks cost about 0.02 ms per request, with no visible effect on a 300 MB download or WebSocket stream.
Not proven
Linking WhatsApp by QR worked but took a long time. The busy process was the page's renderer, and the cause is unknown; the hooks aren't it.
On a challenged site's first visit, Back takes two presses because the challenge leaves its own history entry.
Electron keeps one listener per
webRequestevent per session, so a later listener on these sessions would silently replace this one. Nothing else registers one today.Documentation impact: None — internal browser behaviour with no documented setting.
Checklist
🤖 Generated with Claude Code