Repository navigation
fix(windows): 群聊笔记不再全部命名成「微信」 (#41) - #69
Merged
Merged
Conversation
WeChat 4.x titles its main window 「微信」 whatever chat is open, and newer builds no longer expose the mmui::MainWindow UIA tree. The UIA read came back empty, the window-title fallback returned 「微信」, and that was taken as the group name — so the OCR fallback never ran and every group landed in the same 「微信的聊天.md」. A title that is only the app name (微信 / Weixin / WeChat) now reads as no name in both the window-title and UIA readers, so the chain falls through to OCR of the chat header. If that also fails, the note is named after the participants instead of a shared 「微信」. Fixes #41 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
问题
在 Windows 微信 4.1.15 上,群聊转发到 Obsidian 后,笔记一律命名成「微信的聊天」。不同群的内容会合并进同一篇。
排查结果和 issue 一致:
mmui::MainWindow,UIA 也读不到任何文本,第一步读群名失败。GetWindowText),读到的是微信,被直接当成了群名。WeChatOcrTitleReader降级没有执行。改动
WeChatWindowTitleReader新增IsAppName:标题只是微信/Weixin/WeChat(不分大小写)时,视为没读到群名,流程继续走到 OCR 识别聊天头部的「群名 (N)」。WeChatUiTitleReader读到的 UIA 文本也做同样的过滤,避免以后新版本把微信暴露成文本元素又出同样的问题。WindowTitleReaderIgnoresTheAppName。验证
Fixes #41
🤖 Generated with Claude Code