Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Windows] 群聊笔记命名失败:微信 4.1.15.13 下所有群都被命名成「微信的聊天」

Open
#41 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
swift
Domain
desktop

Research direction

The report points to the Windows title readers WeChatUiTitleReader, WeChatWindowTitleReader, and WeChatOcrTitleReader; locate their implementations and trace the fallback order. First reproduce with the reported Windows WeChat version and inspect the window title and OCR result. Done means notes from different groups receive their actual group names instead of merging under 「微信的聊天」.

Written by the indexing model from the issue text.

Description

环境

  • Windows 11 (x64)
  • 微信 Windows 版 4.1.15.13(Weixin.exe)
  • WeChatBridge 1.1.12 Windows 测试版(安装正常;分享目标「微信流」在微信转发菜单可用;「沉淀到 Obsidian」可正常落盘)

现象

群聊记录多选转发 → 沉淀到 Obsidian 成功,但生成的笔记文件名与标题均为「微信的聊天」,frontmatter chat 字段为 微信,而非实际群名。
连续转发多批(同一群)会全部合并进这一个「微信的聊天.md」——不同群也会因同名而并进同一篇,内容会混。

排查记录(可复现)

  1. 微信主窗口:
    • Win32 顶层窗口类名 = Qt51514QWindowIcon;窗口标题恒为 微信,与当前打开的会话无关(会话名只在界面内自绘,不进系统标题)
  2. UIA 探测(自上而下):
    • 顶层窗口 UIA 后代元素共 2 个:Weixin、MMUIRenderSubWindowHW 两个 Pane,无任何 Text 元素
    • 实际渲染子窗口 MMUIRenderSubWindowHW(3072×1824)UIA 后代元素数 = 0(该版本未暴露无障碍树)
  3. 对照代码(windows 分支):
    • WeChatUiTitleReader.FindMainWindow() 按类名 mmui::MainWindow 匹配主窗口 → 该版本不匹配,且即使匹配 UIA 也为空 → UIA 读取失败
    • 随后降级 WeChatWindowTitleReader(GetWindowText)→ 拿到 微信 → 被直接采用(未能进入 WeChatOcrTitleReader OCR 降级)
  4. 截图实测:会话头部清晰显示「群名 (17)」(带成员数)。OCR 降级的目标区域(窗口头部横条)理论上可识别到,符合 WeChatOcrTitleReader 的匹配规则。

建议修复方向(任一/组合)

  • 窗口标题降级中过滤纯应用名(微信/Weixin/WeChat),不要短路后面的 OCR 降级;
  • 或调整 UIA 目标(新版窗口类名可能为 Qt51514QWindowIcon,实际内容在子窗口 MMUIRenderSubWindowHW;UIA 全空时直接转 OCR);
  • 或提高 OCR 降级优先级(头部「群名 (N)」格式与 OCR 匹配规则一致)。

复现步骤

  1. 微信 4.1.15.13(Windows),打开任一群聊
  2. 多选若干消息 → 转发 → 选择电脑中的应用 → 微信流 → 沉淀到 Obsidian
  3. 检查生成的笔记名:得到 微信的聊天.md(而非 <群名>的聊天.md)

如需要,我可以补充:窗口句柄 / UIA dump 原文、头部截图(脱敏)、更多版本信息。

Dominant language
Swift
Stars
1.4k
Forks
430
Avg merge
18h 9m
Merged PRs (30d)
10

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from freestylefly/WeChatBridge

All issues in freestylefly/WeChatBridge

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.