fix(weixin): single-source QR login and non-blocking Settings refresh#406
Open
Gucc111 wants to merge 2 commits into
Open
fix(weixin): single-source QR login and non-blocking Settings refresh#406Gucc111 wants to merge 2 commits into
Gucc111 wants to merge 2 commits into
Conversation
Start the gateway before IM channel initialization and surface Weixin QR login state so Web UI remains usable while channels connect. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
WeixinChannelthe single source of QR login — the UI server no longer callsweixin-ilink.loginWithQR()directly, eliminating the dual-login race condition.prepare_weixin_logingateway RPC so the Settings page can trigger a backend channel start/restart without importingweixin-ilink.useGatewayStatusnow does silent refresh (no full-page loading spinner) once initial data is loaded.qrUrlintoruntime-status.jsonfromWeixinChannel.onQRCode, so the UI reads the QR code from runtime state instead of maintaining its own login task.requestedAttimestamp to ignore stalefailed/expiredruntime errors from previous attempts.Test plan
npm test— 58 tests pass (includes new regression tests for begin route, runtime QR persistence, stale error filtering, and protocol RPC exposure)npm --workspace ui run build— succeedsadapters.weixin.enabled: false, click WeChat QR login in Settings → should show "preparing" then display QR codefailedruntime state, click QR login again → should restart the channel, not show the stale errorMade with Cursor