Repository navigation
Improve Archive Viewer navigation, search and interaction - #2
Merged
Merged
Conversation
…ad code) - Quoted-message XML boundary now ends at the FIRST matching close tag after the opening tag, not the last match across the whole remaining text. A reply that happens to contain the same tag substring (e.g. "</msg>") was previously swallowed into the discarded XML portion, silently truncating real reply text. - ArchiveMessageSearchService.indexURL is now a stateless computed property derived from archiveRoot/indexRoot instead of mutable shared state written by a background task and read from the MainActor, removing a data race in a class marked @unchecked Sendable. This also lets prepareIndex() actually reach its corrupt-index removal/rebuild path: the reuse check's error was previously left uncaught there (unlike the equivalent check in search()), so a corrupted cached index file failed identically on every future launch instead of self-healing. - Sidebar conversation context menu's "打开" button was a no-op; wired to select the conversation like the row's normal tap behavior. - jumpToMessage no longer performs a full O(n) messageOffset scan just to discard the result before calling messageWindow, which already performs the same existence check via a cheap indexed lookup. - "复制文字、发送者和时间" is no longer offered for outgoing messages, matching the bubble's own sender-name display condition; it previously copied a "消息" placeholder instead of an actual name. - Message search result avatars are now resolved once per result set and cached, instead of re-querying the database on every SwiftUI re-render. - Deduplicated the two nearly-identical snippet-building implementations into ArchiveTextSnippetBuilder, shared by the viewer's LIKE search and the derived FTS/LIKE search service. Adds regression coverage for the XML boundary truncation and for prepareIndex() actually rebuilding (not just search() falling back) when the cached index is corrupt. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Owner
Author
|
Pushed fixes for all 8 review findings in fc0360a: Correctness / concurrency (high priority):
Correctness (medium):
Perf / cleanup (low):
Added regression tests for the XML truncation bug and for |
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.
概览
本 PR 是 v0.3.0 的纯 Archive Viewer 体验迭代,不修改 Archive schema,也不新增微信消息协议。
隐私
搜索索引仅保存在本机 Application Support,目录 0700、数据库 0600;不保存来源数据库、原始行、原始 SQLite 值或任何密钥。删除索引不会影响 Archive。
验证
swift buildPASSswift test143 passed / 0 failed / 2 opt-in skippedgit diff --checkPASS范围
本 PR 不包含新的微信消息类型、增量备份、云同步或 Archive schema 变更。