Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): stop automatic passkey prompts #7522

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/7522/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

The 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.ts
  • pnpm --filter @t3tools/web typecheck
  • pnpm --filter @t3tools/desktop typecheck
  • vp 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.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit d4677f4499d1e99d56f18869fc6a8cc4fb2e72b4. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Stop automatic passkey prompts in Electron by aborting conditional UI requests

  • Updates electronPasskeys.ts so that createPasskeys().get() returns a passkey_operation_aborted error when conditionalUI=true, preventing the browser from triggering automatic passkey prompts in the Electron shell.
  • Upgrades @clerk/electron to 0.0.34-canary and @clerk/electron-passkeys to 0.0.4-canary in pnpm-workspace.yaml.
  • Removes the local override that forced isAutoFillSupported to false in main.tsx, replacing it with the upstream @clerk/electron/passkeys implementation and adding an __internal_clerkUIVersion prop 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.
Macroscope summarized d4677f4.
    1. Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 221741d1-677b-4c64-a6cc-600aaa1b3b66

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      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
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire12.6 KiB12.6 KiB−3 B (−0.0%)15.1 KiB✅
      CodexThread snapshot wire6.3 KiB6.3 KiB−1 B (−0.0%)7.3 KiB✅
      CodexLive turn WebSocket wire6.3 KiB6.3 KiB−2 B (−0.0%)7.8 KiB✅
      CodexLive turn WebSocket decoded51.8 KiB51.8 KiB0 B (0.0%)66.4 KiB✅
      CodexLive turn messages16160 (0.0%)21✅
      ClaudeTotal thread wire12.6 KiB12.6 KiB−8 B (−0.1%)15.1 KiB✅
      ClaudeThread snapshot wire6.3 KiB6.3 KiB−5 B (−0.1%)7.3 KiB✅
      ClaudeLive turn WebSocket wire6.3 KiB6.3 KiB−3 B (−0.0%)7.8 KiB✅
      ClaudeLive turn WebSocket decoded52.7 KiB52.7 KiB0 B (0.0%)66.4 KiB✅
      ClaudeLive turn messages16160 (0.0%)21✅

      Baseline: 24c4ba6 · PR result: d4677f4 · Source CI: success

      Scenario 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.

    4. Approvability

      Verdict: Approved at d4677f4

      Macroscope'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).

Sign in to join this conversation.