fix(web): polyfill crypto.randomUUID for non-secure HTTP contexts by chirino · Pull Request #666 · pingdotgg/t3code

@chirino

Replace direct crypto.randomUUID() calls with a randomUUID() helper in
utils.ts that falls back to crypto.getRandomValues() when the browser
is not in a secure context (e.g. plain HTTP on a non-localhost address).

Signed-off-by: Hiram Chirino <hiram@hiramchirino.com>

@github-actions bot added the vouch:unvouched

PR author is not yet trusted in the VOUCHED list.

label

Mar 9, 2026

@juliusmarminge

- Replace manual UUID byte formatting fallback in `apps/web/src/lib/utils.ts`
- Use `Effect.runSync(Random.nextUUIDv4)` when `crypto.randomUUID` is unavailable