fix(ui): robust UUID generation for HTTP Control UI#133
fix(ui): robust UUID generation for HTTP Control UI#133steipete merged 1 commit intoopenclaw:mainfrom
Conversation
|
Ahhhh repeating comment from earlier PR; crypto.randomUUID() requires a secure context (HTTPS/localhost), so the UI fails to connect when accessed this way. The fallback uses crypto.getRandomValues() which works everywhere. Happy to close if HTTPS is the expected setup for remote access. Yes totally makes sense. I ran into the same issue before. Thank you! |
|
Is in the merge queue! |
fix(ui): robust UUID generation for HTTP Control UI
- Replace hardcoded Unix paths with path.join(path.sep, ...) for cross-platform - Remove skipIf(win32) from tests now that paths are platform-agnostic - Remove itIfNotWin32 from pi-embedded-runner test Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tasks completed: 2/2 - Task 1: ChatType unification dm -> direct (#126) - Task 2: Windows paths + cross-platform tests (#127, #132, #133) Phase 13 complete (11/11 plans). SUMMARY: .planning/phases/13-paths-config-refactoring/13-11-SUMMARY.md
|
Starting work on this iframe sizing bug now. Investigating renderer/CSS handling for HTML content fill behavior. |
|
Progress update: applied iframe sizing fix in renderer/CSS and added html-specific content-root padding removal to avoid inset gap. Build + test run is green (55 passing). Preparing commit/push next. |
|
Ready for verification. Pushed commit: 9a322fe4e to branch clawline-surface-electron. What changed:
Validation:
pushed to origin/clawline-surface-electron @ 9a322fe4e |
fix(ui): robust UUID generation for HTTP Control UI
Context
Accessing the browser Control UI over plain HTTP (e.g. legacy
gateway.bind: "tailnet"/ token flow likehttp://<tailscale-ip>:18789/ui/) can run in an insecure context wherecrypto.randomUUID()is unavailable, causing the UI to fail at runtime.This comes up in the documented legacy tailnet-bind mode (see
docs/control-ui.mdanddocs/web.md). Integrated Tailscale Serve (HTTPS) remains the recommended path.Follow-up to #132 (closed/unmerged).
Fixes #131.
What changed
generateUUID()helper that preferscrypto.randomUUID(), falls back tocrypto.getRandomValues(), and finally falls back to a non-crypto v4 UUID to avoid hard crashes ifcryptois missing.idempotencyKey/run IDs (removes the remaining directcrypto.randomUUID()calls in the UI).Test plan
pnpm -C ui testpnpm -C ui build