docs(internals): record that desktop Clerk UI floats on @clerk/ui@1 - #151
Merged
Conversation
Desktop does not bundle Clerk's UI; @clerk/electron fetches it from Clerk's CDN at runtime. With no __internal_clerkUIVersion passed, the requested range is @clerk/ui@1, so a new 1.x reaches every desktop user with no commit, no lockfile entry, and no CI signal. That already happened once: #108 dropped the pinned canary on 2026-08-27 when @1 meant 1.30.8, and Clerk published 1.31.0 the next evening. Records the tradeoff we are accepting, how to tell a Clerk regression from a Pylon one, and how to pin as a stopgap.
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.
#108 dropped the pinned Clerk UI canary so desktop would track stable. I went to verify that and found the range had already moved underneath us, which is worth writing down rather than rediscovering later.
What's actually happening
Desktop does not bundle Clerk's UI.
@clerk/electronfetches it from Clerk's CDN at runtime, and@clerk/sharedbuilds the URL as.../npm/@clerk/ui@<version>/dist/ui.browser.jsfromversionSelector(__internal_clerkUIVersion, "1.30.8")— where that second argument is a fallback hardcoded inside@clerk/shared, not something Pylon sets. Pylon passes no version, so the request is@clerk/ui@1: a floating major range resolved by the CDN on every launch.It has already drifted:
@1meant when #108 merged (08-27 00:16)@1resolves to now@clerk/uiis not a dependency of any Pylon package, so there is no lockfile entry and nothing to bisect. A minor version reached desktop with no commit, no release, and no CI signal.What this PR does
Documents the tradeoff we are choosing to accept — Clerk's fixes arrive automatically, at the cost of untested bumps — plus how to tell a Clerk regression from a Pylon one, the
npm view '@clerk/ui@1' versioncheck, and how to pin as a stopgap. It also records that an automatic passkey prompt on the sign-in surface is the specific regression the original upstream pin existed to prevent, so a future reader recognizes it.Docs only, no code change.
Verification
Every claim checked against source rather than memory: the
versionSelector(..., "1.30.8")call and URL shape in@clerk/shared@4.30.1, the unpinnedElectronClerkProviderinapps/web/src/main.tsx, #108's merge date, and the livenpm viewresolution.Model: Claude Opus 5. Harness: Claude Code.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.