[Repo Assist] fix(chat): surface incompatible-gateway state when handshake lacks session key#482
Merged
shanselman merged 1 commit intoMay 21, 2026
Conversation
…ssion key When the gateway handshake completes but does not advertise a mainSessionKey (or the legacy mainKey alias), the composer was showing "Connected" with a disabled-but-unlabelled send box. The user had no indication that the gateway needed updating. Changes: - OpenClawChatDataProvider: emit "Incompatible gateway" as ConnectionStatus when HasHandshakeSnapshot=true but MainSessionKey is null/empty and the socket is Connected, instead of plain "Connected". - OpenClawChatRoot: map the "Incompatible" prefix to the new "incompatible-gateway" connState token. - OpenClawComposer: handle "incompatible-gateway" → disable inputs + show Chat_Composer_Placeholder_IncompatibleGateway placeholder. - Resources.resw (all 5 locales): add Chat_Composer_Placeholder_IncompatibleGateway string. - OpenClawChatDataProviderTests: add two focused tests for the incompatible-handshake path (snapshot ConnectionStatus and ComposeTarget.IsReady=false). Closes #459 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
Fixes #459. When the gateway handshake completes but does not advertise
sessionDefaults.mainSessionKeyor the legacymainKeyalias (an incompatible/outdated gateway), the composer was silently disabled with no user-visible explanation — the connection label read "Connected" but nothing could be sent.Root Cause
OpenClawChatDataProvider.BuildSnapshotused_status == Connectedas the sole input for theConnectionStatuslabel, regardless of whether the handshake actually resolved a session key. The UI had no way to distinguish "connected and ready" from "connected but gateway is incompatible".Changes
OpenClawChatDataProvider.cs"Incompatible gateway"asConnectionStatuswhenHasHandshakeSnapshot=truebutMainSessionKeyis null/empty while connectedOpenClawChatRoot.cs"Incompatible"prefix to a new"incompatible-gateway"connState tokenOpenClawComposer.cs"incompatible-gateway"→ disable inputs + showChat_Composer_Placeholder_IncompatibleGatewayplaceholderResources.resw(5 locales)Chat_Composer_Placeholder_IncompatibleGateway="Gateway update required — incompatible version"OpenClawChatDataProviderTests.csTrade-offs
"Incompatible gateway"string prefix is a sentinel convention (matched viaStartsWith("Incompatible", ...)inOpenClawChatRoot). This is consistent with how"Connected"and"Connecting"are already matched.Chat_Composer_Placeholder_IncompatibleGatewayfor now; proper translations can follow once the copy is approved.Test Status
LoadAsync_HandshakeComplete_NoSessionKey_SignalsIncompatibleGateway,StatusChanged_IncompatibleGateway_IsReflectedInSnapshotConnectionLabelOpenClaw.Tray.Tests: 1093 passed, 10 pre-existing failures (LocalGatewaySetupTests— Windows WSL tests that fail on Linux)OpenClaw.Shared.Tests: 1796 passed, 7 pre-existing failures (platform-specific, unrelated)