[scheduler] Use @base-ui generateId for event ids in createEventModel#22788
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…torandomuuid-directly-breaks-on-non-secure-contexts
Deploy previewBundle size
Check out the code infra dashboard for more information about this PR. |
romgrk
reviewed
Jun 11, 2026
Contributor
There was a problem hiding this comment.
We could use @base-ui/utils/generateId and get rid of this file (here and in the chat package).
Address review: replace the createLocalId helper with the existing @base-ui/utils/generateId, which avoids crypto.randomUUID entirely. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
crypto.randomUUID() in createEventModel@base-ui generateId for event ids in createEventModel
…torandomuuid-directly-breaks-on-non-secure-contexts
…torandomuuid-directly-breaks-on-non-secure-contexts
mbrookes
pushed a commit
to mbrookes/mui-x
that referenced
this pull request
Jun 27, 2026
…Model` (mui#22788) Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
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.
Summary
createEventModelgenerated event ids with a barecrypto.randomUUID()call.crypto.randomUUIDonly exists in a secure context (HTTPS orlocalhost) and in recent browsers, so on plain-HTTP deployments (intranet, IP-based staging) or older browsers it throwscrypto.randomUUID is not a function, breaking event creation and drag-from-outside in production.This switches
createEventModelto@base-ui/utils/generateId, which generates ids without touchingcryptoat all (it uses a counter +Math.random()), so the secure-context issue is gone by construction and there is no extra helper to maintain.Changes
generateId('event')increateEventModelinstead of callingcrypto.randomUUID()directly.Closes #22760