Repository navigation
fix(preview): 图库标题与兄弟文件、svg 串图、tar.gz 报错、odt 渲染 - #242
Merged
Merged
Conversation
- 图库:guest 文件的标题用原文件名(不再带缓存的 hash 前缀),左右滑动只含 同一来源目录里的图片;当前图片始终在列表内(svg 不再因被过滤导致下标 -1 而显示成目录里的第一张) - svg:接入 coil-svg(SvgDecoder),按真实内容绘制;全屏查看器改用 App 的 ImageLoader,两处解码器一致 - 压缩包:新增 ArchiveReader,按魔数识别 zip / tar / tar.gz / 单文件 gz 并列出 条目;bzip2、xz、7z、RAR、zstd 等明确提示不支持,而不是报 zip 错误 - odt:转成 Markdown(标题、段落、嵌套列表、表格、链接、粗体/斜体/等宽、 预格式化块,跳过脚注与批注);ods/odp 仍不能预览,提示改为明确说明 Co-Authored-By: Claude Sonnet 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.
修了什么(2026-10-18 真机上复现的四个文件预览问题)
<sha256>-<name>);"兄弟文件"是列整个共享缓存目录,里面混着所有目录/会话的副本GuestFileCache(缓存命名只此一处)和ImageGalleryPlan:兄弟文件来自 guest 原目录的列表,标题用原文件名;非当前页的图按需拉取(ImageGalleryItem.ensureReady).svg显示成另一张图coil-svg(SvgDecoder,Apache-2.0,已写入 THIRD_PARTY_LICENSES);ImageGalleryPlan.order保证当前图一定在列表里、类型判断统一走fileCategoryFor;全屏查看器改用 App 的 ImageLoader,解码器一致。没有用 WebView 画 SVG(现有 WebView 允许 JS 和 file 访问,不适合不可信 SVG).tar.gz报错ZipFileArchiveReader:按文件头魔数识别 zip / tar / tar.gz / 单文件 gz 并列出条目(ustar prefix、GNU 长名、pax 头、base-256 大小、校验和校验;最多 2000 条,扫描上限 256 MiB)。bzip2、xz、7z、RAR、zstd、deb、rpm 明确提示"不支持",不再报 zip 错误.odt只有降级显示OfficeToMarkdown增加 ODT:标题、段落、嵌套列表、表格、链接、粗体/斜体/等宽、预格式化块,跳过脚注与批注;转成 Markdown 后沿用现有渲染。.ods/.odp评估后不做(表格/幻灯片需要单独的转换器),保持"不能预览,可用其他应用打开",提示文案改成明确说明验证
已验证
:app:compileDebugKotlin通过。ImageGalleryPlanTest、ArchiveReaderTest、OfficeToMarkdownTest;沙箱包其余测试也跑过,无回归)。覆盖:svg 当前图不再丢、标题无 hash 前缀、兄弟文件只来自原目录且缓存路径与GuestFileCache一致、其它目录/会话的缓存副本不会混入;tar / tar.gz / 单文件 gz / zip、bzip2·xz·7z·RAR 魔数 → 不支持、zip 扩展名但内容不是 zip → 报错、tar 头损坏 → 报错、超过 2000 条 → 截断并标记;ODT 的各类结构、被跳过的脚注、无content.xml→ null。lintVitalRelease)从提交f1b2b6bc构建成功,生产密钥签名(证书 SHA-256c029f611…df856),与手机上已装的是同一签名。未验证(真机)
f0e2ff6f,但 11:38 手机上的 App 被别的 agent 用另一份构建覆盖(APK 哈希与我的不同),之后抓到的截图(标题仍带 hash)来自那份构建,不能算本 PR 的结果。为免和对方互相覆盖、打断对方正在跑的任务,没有再装一次。所以四项预览在真机 release 包上的复测目前都没有完成:图库标题 / 滑动范围、svg、tar.gz 列表、odt 渲染。t.odt)在设备上看过排版。.ods/.odp的"不支持"提示文案未在设备上看过。已知限制
🤖 Generated with Claude Code