## TidGi-Mobile v0.11.0 发布报告
发布时间: 2026-06-21 ~ 2026-06-25
标签范围: v0.10.2-fix → v0.11.0
提交数: 3 个主要 PR(含 squash)
变更文件: 64 个文件,+4,681 / −1,105 行
✨ 新功能
1. HTML 工作区同步(PR #106)
- 新增 移动端 HTML 工作区 类型,面向单文件 HTML Wiki
- 本地文件存储 + WebView 直接加载,无需走 Git 历史
- 通过 GET/PUT 与 TidGi Desktop 直接同步
- HTML 工作区使用独立设置流,支持重命名持久化
- 新增
HtmlWorkspaceService(+142 行)及配套单元测试
🔧 Bug 修复与数据安全(PR #101)
文件存储策略对齐桌面端
- Markdown tiddler 保存为
.md+.md.meta,与桌面版行为一致 - 用通用
contentTypeInfo映射替代硬编码扩展名 - 修复扩展名缺少前导点导致文件名畸形的问题(如
Foomd→Foo.md) _canonical_uri与text/vnd.tiddlywiki-multiple类型统一使用.tid- 二进制 tiddler 读写使用正确的 base64/utf8 编码
- 利用
expo-file-system原生 base64 编码写入二进制,减少 JS 端 atob + Uint8Array 开销
索引与并发安全
- 修复 Android
batchParseTidFiles并行流顺序错乱导致的索引损坏:原生层parallelStream()不保证输出顺序,旧代码按数组下标关联 title 与 path,导致 title→path 映射错误,保存用户 tiddler 时可能误删插件文件- 改用 native 返回的
_filepath作为权威路径 saveTiddler清理旧路径前先做所有权反向校验- 新增回归单元测试模拟 native 返回乱序场景
- 改用 native 返回的
FileSystemWikiStorageService增加串行操作队列,防止并发保存互相覆盖- 增加跨标题文件路径保护:删除/覆盖时拒绝属于其他 title 的调用方指定路径
- 新增 5 个 Jest 单元测试,覆盖并发安全、系统文件安全、二进制 API、native 乱序回归等
设置与迁移
- 设置 UI 改进:修复标题、移除卡片边框、支持多行路径、修复服务器列表渲染
- 内部存储描述增加自动迁移提示
- 切换工作区外部存储时支持迁移子 Wiki
导入与模板
- 模板解压后自动创建
tidgi.config.json,避免 Git 将其标记为已删除 - 克隆失败时防御性清理僵尸工作区,并始终清除 stale
qrData git clone增加按阶段的细粒度进度报告- 升级
expo-tiddlywiki-filesystem-android-external-storage到2.12.2
🧪 测试与 CI(PR #105)
E2E 测试
- 新增基于 mock-server 的移动同步 E2E 测试(含冲突处理、桌面同步场景重构)
- 新增
data-safety.feature回归测试:验证新建 tiddler 不会误删已有文件 - 修复 Detox sync/Alert 等待问题,提升 E2E 稳定性
- 新增
e2e/support/diagnostics.ts与改进后的 hooks 错误处理
CI / 构建
- 启动脚本统一使用 8GB heap(
NODE_OPTIONS=--max-old-space-size=8192) - 所有构建工作流加入
pnpm run test:unit - CI artifact 路径拍平:APK/IPA 直接位于 zip 根目录
- 新增
scripts/download-ci-apk.ps1用于下载最新 CI APK
📦 其他变更
app.jsonversion bump 到0.11.0- 修复剩余 lint 错误与 TypeScript 类型问题
## TidGi-Mobile v0.11.0 Release Report
Release Period: 2026-06-21 ~ 2026-06-25
Tag Range: v0.10.2-fix → v0.11.0
Commits: 3 main PRs (squashed)
Files Changed: 64 files, +4,681 / −1,105 lines
✨ New Features
1. HTML Workspace Sync (PR #106)
- Added new mobile HTML workspace type for single-file HTML wikis
- Local file storage + direct WebView loading, no Git history required
- Direct sync with TidGi Desktop via GET/PUT
- HTML workspaces use an independent settings flow with persistent rename support
- Added
HtmlWorkspaceService(+142 lines) and supporting unit tests
🔧 Bug Fixes & Data Safety (PR #101)
File Storage Aligned with Desktop
- Markdown tiddlers are now saved as
.md+.md.meta, matching desktop behavior - Replaced hardcoded extensions with generic
contentTypeInfomapping - Fixed malformed filenames caused by missing leading dots (e.g.
Foomd→Foo.md) _canonical_uriandtext/vnd.tiddlywiki-multiplenow consistently use.tid- Binary tiddler read/write now uses correct base64/utf8 encoding
- Use
expo-file-systemnative base64 encoding for binary writes, reducing JS-sideatob+Uint8Arrayoverhead
Index & Concurrency Safety
- Fixed Android
batchParseTidFilesparallel stream ordering corruption: nativeparallelStream()does not guarantee output order; old code associated titles with paths by array index, causing title→path mapping errors that could delete plugin files when saving user tiddlers- Now uses the
_filepathreturned by native as the authoritative path saveTiddlerperforms reverse ownership checks before cleaning up old paths- Added regression unit tests simulating out-of-order native returns
- Now uses the
FileSystemWikiStorageServicenow has a serialized operation queue to prevent concurrent saves from overwriting each other- Added cross-title path protection: delete/overwrite calls reject paths belonging to other titles
- Added 5 new Jest unit tests covering concurrency safety, system file safety, binary APIs, and native out-of-order regression
Settings & Migration
- Settings UI improvements: fixed titles, removed card borders, supported multi-line paths, fixed server list rendering
- Added auto-migration hints to internal storage descriptions
- Switching workspace external storage now supports migrating sub-wikis
Import & Templates
- Templates now auto-create
tidgi.config.jsonafter extraction to avoid Git marking it as deleted - Defensive cleanup of zombie workspaces on clone failure, and stale
qrDatais always cleared git clonenow reports progress in fine-grained stages- Upgraded
expo-tiddlywiki-filesystem-android-external-storageto2.12.2
🧪 Testing & CI (PR #105)
E2E Tests
- Added mobile sync E2E tests based on mock-server (including conflict handling and refactored desktop sync scenarios)
- Added
data-safety.featureregression test: verifies new tiddlers don't accidentally delete existing files - Fixed Detox sync/Alert waiting issues to improve E2E stability
- Added
e2e/support/diagnostics.tsand improved hooks error handling
CI / Build
- Startup scripts now uniformly use 8GB heap (
NODE_OPTIONS=--max-old-space-size=8192) - All build workflows now run
pnpm run test:unit - CI artifact paths flattened: APK/IPA files sit directly at the zip root
- Added
scripts/download-ci-apk.ps1to download the latest CI APK
📦 Other Changes
app.jsonversion bumped to0.11.0- Fixed remaining lint errors and TypeScript type issues