Commit 759707a
fix(core): consolidate ID generation to prevent HTTP self-hosted crashes
crypto.randomUUID() requires a secure context (HTTPS) in browsers,
causing white-screen crashes on self-hosted HTTP deployments. This
replaces all direct usage of crypto.randomUUID(), nanoid, and the uuid
package with a central utility that falls back to crypto.getRandomValues()
which works in all contexts.
- Add generateId(), generateShortId(), isValidUuid() in @/lib/core/utils/uuid
- Replace crypto.randomUUID() imports across ~220 server + client files
- Replace nanoid imports with generateShortId()
- Replace uuid package validate with isValidUuid()
- Remove nanoid dependency from apps/sim and packages/testing
- Remove browser polyfill script from layout.tsx
- Update test mocks to target @/lib/core/utils/uuid
- Update CLAUDE.md, AGENTS.md, cursor rules, claude rules
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 235f074 commit 759707a
File tree
320 files changed
+1145
-889
lines changed- .claude/rules
- .cursor/rules
- apps/sim
- app
- api
- a2a
- agents
- serve/[agentId]
- academy/certificates
- auth/shopify/authorize
- chat/[identifier]
- otp
- copilot/chat
- creators
- credential-sets
- [id]
- invite
- members
- invite/[token]
- memberships
- credentials
- [id]
- members
- draft
- environment
- files
- delete
- upload
- folders
- [id]/duplicate
- form
- [identifier]
- knowledge/[id]
- connectors
- documents
- [documentId]
- chunks/[chunkId]
- tag-definitions
- upsert
- next-available-slot
- tag-definitions
- [tagId]
- tag-usage
- mcp
- copilot
- servers
- workflow-servers
- [id]/tools
- memory
- mothership
- chat
- stop
- execute
- notifications/poll
- organizations/[id]
- invitations
- [invitationId]
- members
- permission-groups
- [id]/members
- bulk
- resume/[workflowId]/[executionId]/[contextId]
- schedules
- execute
- superuser/import-workflow
- table/import-csv
- templates
- [id]
- star
- use
- tools
- a2a/send-message
- dynamodb/introspect
- mongodb
- delete
- execute
- insert
- introspect
- query
- update
- mysql
- delete
- execute
- insert
- introspect
- query
- update
- neo4j
- create
- delete
- execute
- introspect
- merge
- query
- update
- onedrive
- files
- folders
- folder
- onepassword
- create-item
- delete-item
- get-item
- get-vault
- list-items
- list-vaults
- replace-item
- resolve-secret
- update-item
- postgresql
- delete
- execute
- insert
- introspect
- query
- update
- rds
- delete
- execute
- insert
- introspect
- query
- update
- search
- secrets_manager
- create-secret
- delete-secret
- get-secret
- list-secrets
- update-secret
- sqs/send
- ssh
- check-command-exists
- check-file-exists
- create-directory
- delete-file
- download-file
- execute-command
- execute-script
- get-system-info
- list-directory
- move-rename
- read-file-content
- upload-file
- write-file-content
- stt
- tts/unified
- video
- users/me
- api-keys
- settings
- v1
- admin
- credits
- organizations
- users/[id]/billing
- workflows/import
- workspaces/[id]
- import
- members
- audit-logs
- [id]
- copilot/chat
- logs
- [id]
- workflows
- [id]
- webhooks
- agentmail
- poll
- gmail
- imap
- outlook
- rss
- trigger/[path]
- workflows
- [id]/execute
- workspaces
- [id]
- api-keys
- byok-keys
- environment
- inbox/senders
- notifications
- [notificationId]/test
- permissions
- invitations
- [invitationId]
- chat
- [identifier]
- components/input
- hooks
- workspace
- [workspaceId]
- home/hooks
- knowledge/[id]
- providers
- settings/components/subscription/components/credit-balance
- tables/[tableId]/components/table-filter
- w
- [workflowId]
- components
- chat
- hooks
- panel/components
- copilot/components/user-input/hooks
- deploy/components/deploy-modal/components/a2a
- editor/components/sub-block/components
- document-tag-entry
- dropdown
- eval-input
- filter-builder
- knowledge-tag-filters
- sort-builder
- starter
- table
- variables-input
- hooks
- utils
- components/sidebar
- components/workflow-list/components/folder-item
- hooks
- hooks
- providers
- background
- components/emcn/components/toast
- executor/handlers
- agent
- mothership
- workflow
- hooks
- queries
- a2a
- lib
- a2a
- api-key
- audit
- auth
- billing
- core
- organizations
- webhooks
- copilot
- client-sse
- orchestrator
- sse/handlers
- stream
- tool-executor
- deployment-tools
- workflow-tools
- tools/server
- knowledge
- table
- workflow/edit-workflow
- core
- async-jobs/backends
- idempotency
- utils
- workspace-dispatch
- credentials
- environment
- knowledge
- chunks
- connectors
- documents
- tags
- logs
- execution
- snapshot
- mothership/inbox
- notifications
- table
- query-builder
- uploads/providers
- blob
- s3
- webhooks
- workflows
- custom-tools
- diff
- executor
- operations
- orchestration
- persistence
- schedules
- skills
- workspaces
- serializer
- socket/handlers
- stores
- chat
- notifications
- table
- terminal/console
- undo-redo
- variables
- workflows
- subblock
- workflow
- tools
- http
- langsmith
- triggers/generic
- packages/testing
- src
- factories
- mocks
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
320 files changed
+1145
-889
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
12 | 33 | | |
13 | 34 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
19 | 40 | | |
20 | 41 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | | - | |
| 403 | + | |
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
| 407 | + | |
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
| |||
628 | 628 | | |
629 | 629 | | |
630 | 630 | | |
631 | | - | |
| 631 | + | |
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
636 | | - | |
| 636 | + | |
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
| |||
1427 | 1427 | | |
1428 | 1428 | | |
1429 | 1429 | | |
1430 | | - | |
| 1430 | + | |
1431 | 1431 | | |
1432 | 1432 | | |
1433 | 1433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
215 | 215 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
164 | | - | |
| 165 | + | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
0 commit comments