Skip to content

fix: gateway dashboard auth + WebSocket close code#918

Closed
rahthakor wants to merge 3 commits intoopenclaw:mainfrom
rahthakor:feature/gateway-fix-v2
Closed

fix: gateway dashboard auth + WebSocket close code#918
rahthakor wants to merge 3 commits intoopenclaw:mainfrom
rahthakor:feature/gateway-fix-v2

Conversation

@rahthakor
Copy link
Copy Markdown
Contributor

Summary

  • Mac app: Pass auth token/password to dashboard URL for authenticated access
  • UI: Use application-defined WebSocket close code (4008) instead of reserved 1008 for browser compatibility

Details

Dashboard Auth Token

When opening the dashboard from the macOS menu bar, the app now includes the configured gateway.auth.token or password in the URL query parameters. This enables seamless authenticated access to the Control UI.

WebSocket Close Code

Browsers reject WebSocket close code 1008 ("Policy Violation") as it's a reserved code. Changed to 4008 which is in the application-defined range (4000-4999).

Test Plan

  • Lint passes
  • Build succeeds
  • All 2847 tests pass
  • macOS app builds and launches
  • Code logic verified for dashboard auth URL

🤖 Generated with Claude Code

@steipete steipete self-assigned this Jan 14, 2026
steipete added a commit that referenced this pull request Jan 14, 2026
Co-authored-by: Rahul Thakor <rahthakor@users.noreply.github.com>
@steipete steipete closed this Jan 14, 2026
@steipete
Copy link
Copy Markdown
Contributor

Landed on main after rebase onto temp branch.
Fix: pass both token + password (and clear query) for dashboard URL (apps/macos/Sources/Clawdbot/MenuContentView.swift).
Changelog: add PR #/thanks entries (CHANGELOG.md).
Tests: pnpm lint && pnpm build && pnpm test.
SHAs: 400e901, 0eabc89, de7f567, 983e1b2.
Thanks @rahthakor!

@shanon00
Copy link
Copy Markdown

This 4008 is forbidden for browsers to access? I can’t even access it locally, why is it necessary to solve this, and the token and password have been changed several times?

zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
Co-authored-by: Rahul Thakor <rahthakor@users.noreply.github.com>
Fato07 pushed a commit to Fato07/elav that referenced this pull request Mar 26, 2026
Enhance plugin loading and toolbar integration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants