Skip to content

Fix WeChat QR login cancellation and recovery#147

Merged
webup merged 2 commits into
developfrom
fix/wechat-qr-recovery
May 4, 2026
Merged

Fix WeChat QR login cancellation and recovery#147
webup merged 2 commits into
developfrom
fix/wechat-qr-recovery

Conversation

@webup
Copy link
Copy Markdown
Contributor

@webup webup commented May 4, 2026

What

  • keep the WeChat QR login flow polling while the openclaw channels login command is still running
  • keep Cancel enabled during QR scanning and clean up the active WeChat session with openclaw channels logout --channel wechat
  • add an explicit timeout state with QR refresh recovery, and clean up the timed-out session before retry
  • add focused Channels page tests for cancel, pending-login polling, and timeout recovery

Resolves #144.

Why

The WeChat QR setup flow could get stuck in a non-cancelable waiting state and gave users no recovery path after a stale QR session. The UI also needed to stay responsive while the underlying login command was still active.

How

  • run the WeChat login command in the background while polling openclaw channels status
  • invalidate stale attempts so late login failures cannot overwrite a newer connected or timedOut state
  • call openclaw channels logout --channel wechat when canceling an active scan or refreshing after timeout
  • extend the Channels tests to cover the new async state transitions

Verification

  • npx vitest run src/modules/channels/__tests__/ChannelsPage.test.tsx
  • npm run build
  • live dev-browser verification on /channels: after 开始扫码登录, the modal stays in 等待扫码..., 取消 remains enabled, and cancel closes the dialog immediately

Screenshots

  • Verified live with dev-browser on /channels in this CLI session; no GitHub-hosted screenshot asset was uploaded from the terminal session.

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.

WeChat QR login flow cannot be canceled and provides no timeout or refresh recovery

1 participant