#21609: fix(ui): align gateway connect params with ConnectParamsSchema
app: web-ui
size: S
Cluster:
UI Enhancements and Security Fixes
Fixes connect params schema mismatch for Protocol v3 browser clients.
- Remove any root-level nonce usage (nonce stays under `device.nonce` when device identity is used)
- Use an allowed client id/mode (`gateway-client` / `ui`) and ensure required version/platform are present
- Ensure minProtocol/maxProtocol are set
- Add unit test asserting outbound `connect` params shape
Closes #18.
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Aligns Protocol v3 browser client connect params with `ConnectParamsSchema` by switching from legacy client identifiers (`openclaw-control-ui`/`webchat`) to allowed values (`gateway-client`/`ui`). Also removes password import from URL params (security improvement) and adds comprehensive unit test coverage.
Key changes:
- Updated `clientName` from `openclaw-control-ui` to `gateway-client`
- Updated `mode` from `webchat` to `ui`
- Added `GATEWAY_PROTOCOL_VERSION` constant (value: 3)
- Removed password import logic from URL params in `applySettingsFromUrl`
- Added unit test asserting connect params shape matches schema requirements
- Reordered imports (formatting only)
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- All changes are straightforward schema alignment fixes with proper test coverage. The client name/mode updates use valid values from the allowed enums, the protocol version constant improves maintainability, and removing password URL imports is a security improvement that aligns with existing test expectations.
- No files require special attention
<sub>Last reviewed commit: 1889ea7</sub>
<!-- greptile_other_comments_section -->
<sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#13960: fix(ui): preserve structured config validation error details
by constansino · 2026-02-11
78.6%
#20089: fix(gateway): preserve control-ui scopes when dangerouslyDisableDev...
by vashkartik · 2026-02-18
77.3%
#21000: fix: resolve option collision between browser and cookies set commands
by MisterGuy420 · 2026-02-19
75.2%
#9218: Fix Control UI chat resync on gaps and terminal events
by figitaki · 2026-02-05
75.1%
#6352: fix(ux): update gateway token error message UI location
by Glucksberg · 2026-02-01
74.9%
#22109: fix(gateway): allow Control UI session patch/delete
by lc708 · 2026-02-20
74.7%
#17605: fix: preserve scopes when disableControlUiDeviceAuth is enabled
by MisterGuy420 · 2026-02-16
74.7%
#22347: Feature request: gateway.clientUrl config to decouple client URL
by AIflow-Labs · 2026-02-21
74.5%
#14309: fix(ui): resolve chat event session key mismatch
by justonlyforyou · 2026-02-11
74.2%
#11455: fix(gateway): default gateway.mode to local when unset
by AnonO6 · 2026-02-07
74.2%