← Back to PRs

#21609: fix(ui): align gateway connect params with ConnectParamsSchema

by sey-agent open 2026-02-20 04:43 View on GitHub →
app: web-ui size: S
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