Skip to content

fix(channels): send raw QR ticket in WeChat WebUI login SSE#1910

Merged
piorpua merged 1 commit intomainfrom
fix/issue-1883
Mar 30, 2026
Merged

fix(channels): send raw QR ticket in WeChat WebUI login SSE#1910
piorpua merged 1 commit intomainfrom
fix/issue-1883

Conversation

@kaizhou-lab
Copy link
Copy Markdown
Collaborator

Summary

  • The WeChat login SSE endpoint (/api/channel/weixin/login) was sending the QR page URL (qrcode_img_content) instead of the raw QR ticket string to the WebUI client
  • The frontend uses QRCodeSVG to generate a scannable QR code from this value, so it needs the actual ticket — not a URL to an image page
  • This caused WeChat login to fail in WebUI/headless mode because the QR code encoded the wrong data, making it unrecognizable by the WeChat scanner

Related Issues

Closes #1883

Test Plan

  • Unit test updated to verify raw ticket is sent (not page URL)
  • Type check passes
  • Lint and format pass

… login SSE

The WeChat login SSE endpoint was sending the QR page URL (qrcode_img_content)
instead of the raw ticket string to the WebUI client. The frontend uses QRCodeSVG
to generate a QR code from this value, so it needs the actual ticket — not the URL
of a page that renders the QR. This caused WeChat login to fail in WebUI/headless
mode because the generated QR code encoded the wrong data.
@piorpua piorpua added the bot:reviewing Review in progress (mutex) label Mar 30, 2026
@piorpua
Copy link
Copy Markdown
Contributor

piorpua commented Mar 30, 2026

Code Review:fix(channels): send raw QR ticket in WeChat WebUI login SSE (#1910)

变更概述

本 PR 修复了微信 WebUI 登录 SSE 接口中的一个 bug:onQR 回调错误地将 QR 页面 URL(pageUrl)发送给客户端,而前端实际需要原始 ticket 字符串来通过 QRCodeSVG 生成可扫描的二维码。改动仅涉及 weixinLoginRoutes.ts 中的回调参数选择,以及对应的单元测试。


方案评估

结论:✅ 方案合理

修复精准定位了根因(错误使用了 onQR 回调的第一个参数而非第二个),改动最小且符合项目架构边界。_pageUrl 前缀正确标记了未使用的参数,符合项目命名规范。测试同步更新,验证了修复后的行为。


问题清单

无问题。


汇总

无问题记录。

结论

批准合并 — 修复正确、测试完备、改动最小,无阻塞性问题。


本报告由本地 pr-review skill 生成,包含完整项目上下文,无截断限制。

CONCLUSION: APPROVED
IS_CRITICAL_PATH: false
PR_NUMBER: 1910

@piorpua
Copy link
Copy Markdown
Contributor

piorpua commented Mar 30, 2026

✅ 已自动 review,无阻塞性问题,正在触发自动合并。

@piorpua piorpua merged commit 421ebb6 into main Mar 30, 2026
17 checks passed
@piorpua piorpua deleted the fix/issue-1883 branch March 30, 2026 09:10
@piorpua piorpua added bot:done Auto-merged by bot and removed bot:reviewing Review in progress (mutex) labels Mar 30, 2026
wuhao1477 added a commit to wuhao1477/AionUi that referenced this pull request Mar 30, 2026
* 'main' of github.com:wuhao1477/AionUi: (40 commits)
  fix(agents): prevent unhandled promise rejection in bootstrap initialization (iOfficeAI#1933)
  fix(gemini): restore context after stopping a reply (iOfficeAI#1932)
  fix(codex): reject start promise immediately on process exit during startup (iOfficeAI#1929)
  fix(conversation): sync renamed titles with detail view (iOfficeAI#1927)
  fix(paste): deduplicate filenames when pasting multiple images simultaneously
  fix(mobile): add SafeArea support and update app icon (iOfficeAI#1926)
  fix(database): guard against undefined params in databaseBridge providers (iOfficeAI#1924)
  fix(conversation): validate type field before creating conversation (iOfficeAI#1921)
  fix(docs): restore wechat_group_5.png reference to wx-5.png in readme
  fix(snapshot): add maxBuffer to git add/commit exec calls (iOfficeAI#1914)
  refactor(acp): consolidate AGENT_SKILLS_DIRS into ACP_BACKENDS_ALL (iOfficeAI#1913)
  fix(gemini): guard against EACCES in workspace realpath during init (ELECTRON-BM) (iOfficeAI#1912)
  fix(channels): send raw QR ticket instead of page URL in WeChat WebUI login SSE (iOfficeAI#1910)
  .md format
  chore(pr-automation): fix missed sleep 5 in comment to sleep 10
  chore(pr-automation): increase auto-merge retry delay to 10s
  chore(pr-automation): add 5s retry for transient GitHub mergeStateStatus UNKNOWN
  fix(docs): remove trailing whitespace in OfficeCLI readmes
  chore(pr-automation): verify auto-merge success before labeling bot:done
  fix(snapshot): guard against non-existent workspace in WorkspaceSnapshotService.init (iOfficeAI#1906)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:done Auto-merged by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: headless 模式下,wechat channel会报错

2 participants