fix(desktop): stop automatic passkey prompts #7522
main fromrefs/pull/7522/head·merged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubThe desktop sign-in form could open the native passkey dialog as soon as it rendered. Stable Clerk Electron does not yet contain Clerk PR #9500, and our local autofill override ran too late to stop the native request.
This pins the first Clerk Electron and UI canary builds that contain the upstream fix. It removes the local override, keeps the non-Electron Clerk packages stable, and adds coverage for both automatic and explicit passkey requests.
Tested:
vp test run apps/web/src/components/clerk/electronPasskeys.test.ts apps/desktop/src/app/DesktopClerk.test.tspnpm --filter @t3tools/web typecheckpnpm --filter @t3tools/desktop typecheckvp fmt --check apps/web/src/main.tsx apps/web/src/components/clerk/electronPasskeys.test.ts pnpm-workspace.yaml- Theo verified the Electron sign-in flow with the development Clerk instance
Built with GPT-5.6 Sol in the Codex harness.
Note
Medium Risk Touches Electron sign-in and passkey behavior via pre-release Clerk canaries; risk is limited to desktop auth UX, not broad web auth changes.
Overview Fixes desktop sign-in opening a native passkey dialog on mount by adopting Clerk’s upstream fix instead of a local shim.
Dependency pins: @clerk/electron and @clerk/electron-passkeys move to canary builds that include clerk/javascript#9500; catalog, lockfile, and minimumReleaseAgeExclude are updated accordingly. Other Clerk packages stay on stable versions.
Electron bootstrap (main.tsx): Removes the wrapper that forced isAutoFillSupported to false and wires passkeys directly from @clerk/electron/passkeys. ElectronClerkProvider now passes __internal_clerkUIVersion so the embedded Clerk UI matches the canary that contains the same fix.
Tests: New electronPasskeys.test.ts asserts conditional/autofill passkeys.get does not hit the native bridge (returns passkey_operation_aborted), while explicit requests still call the bridge once.
Note
Stop automatic passkey prompts in Electron by aborting conditional UI requests#
- Updates
electronPasskeys.tsso thatcreatePasskeys().get()returns apasskey_operation_abortederror whenconditionalUI=true, preventing the browser from triggering automatic passkey prompts in the Electron shell. - Upgrades
@clerk/electronto0.0.34-canaryand@clerk/electron-passkeysto0.0.4-canaryinpnpm-workspace.yaml. - Removes the local override that forced
isAutoFillSupportedtofalseinmain.tsx, replacing it with the upstream@clerk/electron/passkeysimplementation and adding an__internal_clerkUIVersionprop to<ElectronClerkProvider>. - Behavioral Change: The Clerk passkeys implementation in Electron now delegates to the upstream library rather than a local stub, which may affect behavior if the upstream implementation changes.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Provider Metric Main baseline This PR Impact PR ceiling Codex Total thread wire 12.6 KiB 12.6 KiB −3 B (−0.0%) 15.1 KiB ✅ Codex Thread snapshot wire 6.3 KiB 6.3 KiB −1 B (−0.0%) 7.3 KiB ✅ Codex Live turn WebSocket wire 6.3 KiB 6.3 KiB −2 B (−0.0%) 7.8 KiB ✅ Codex Live turn WebSocket decoded 51.8 KiB 51.8 KiB 0 B (0.0%) 66.4 KiB ✅ Codex Live turn messages 16 16 0 (0.0%) 21 ✅ Claude Total thread wire 12.6 KiB 12.6 KiB −8 B (−0.1%) 15.1 KiB ✅ Claude Thread snapshot wire 6.3 KiB 6.3 KiB −5 B (−0.1%) 7.3 KiB ✅ Claude Live turn WebSocket wire 6.3 KiB 6.3 KiB −3 B (−0.0%) 7.8 KiB ✅ Claude Live turn WebSocket decoded 52.7 KiB 52.7 KiB 0 B (0.0%) 66.4 KiB ✅ Claude Live turn messages 16 16 0 (0.0%) 21 ✅ Baseline:
24c4ba6· PR result:d4677f4· Source CI: successScenario and decoded snapshot size
10 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.
- Codex decoded thread snapshot: 99.9 KiB
- Claude decoded thread snapshot: 100.6 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
Approvability#
Verdict: Approved at
d4677f4Macroscope's review found this PR approvable — Bug fix that replaces a local workaround with upstream Clerk package fixes. Well-scoped changes with added test coverage validating the expected passkey behavior. Author is a senior contributor with extensive history in these files.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
221741d1-677b-4c64-a6cc-600aaa1b3b66You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share