summaryrefslogtreecommitdiffhomepage
path: root/src/app/uuid.test.ts
AgeCommit message (Collapse)Author
2026-06-07fix: blank page on non-localhost HTTP (secure-context crypto.randomUUID)Adam Malczewski
crypto.randomUUID() is secure-context-only — undefined on plain-HTTP non-localhost origins (e.g. http://arch-razer:24204), so createAppStore threw during mount and nothing rendered. Add src/app/uuid.ts randomId(): prefer crypto.randomUUID when present, else build a v4 from crypto.getRandomValues (available in insecure contexts), else Math.random fallback. Use it for the conversation id. Verified: svelte-check 0/0, vitest 221, build ok.