滚猫md v0.4.0
滚猫md v0.4.0
这次更新集中改善长文导航、继续阅读、未保存内容恢复和图文分享。阅读区域保留原来的 1200px 默认宽度,并提供更宽选项。
阅读与界面
- 重新整理顶部工具栏,常用操作包括新建、打开、保存、查找、大纲和更多。
- 大纲默认启用并展开;可以收起章节面板,也可以在阅读设置中完全关闭大纲入口,状态会记住。
- 阅读设置提供 14 / 16 / 18 / 20 / 24px 字号、1.5 / 1.7 / 2 倍行高和 1200 / 1600 / 2100px / 全宽。默认采用 16px、1.5 倍行高、1200px。
- 最近打开最多记录 20 篇文档,保存各自的模式与位置,方便继续阅读。
- 字符数继续显示;tokens 估算默认隐藏,可按需打开。
- 所见即所得与阅读视图统一 callout 样式。
保存与恢复
原文档仍由“保存”或“另存为”写入。未保存的完整内容会自动保存在本机恢复草稿中:编辑停顿约 1.5 秒后保存,持续输入时每约 10 秒检查。大文档正文保持完整,列表滚动保留最多 5 份恢复副本。
离开未保存文档时,可选择“保存并继续”“放弃更改”或“取消”。成功保存当前完整内容后会移除对应草稿;放弃编辑仍保留可恢复副本。可以从“更多”→“恢复草稿”找回内容或删除不需要的记录。
五份恢复副本会随继续使用更新和淘汰,长期版本历史与重要文件备份请自行管理。最近记录和恢复草稿存在本机 IndexedDB,阅读设置与这些记录使用本机 WebView 应用数据。清除应用数据或站点数据可能删除记录;把免安装 EXE 复制到另一台设备不会自动迁移它们。
本地图片与分享
- Windows 可以读取 Markdown 同目录及子目录中的相对 PNG、JPEG、GIF 和 WebP 图片,每张最大 32 MiB。
- 先保存文档,再粘贴截图或使用“插入本地图片”,附件会以唯一文件名保存在旁边的
assets/中。 - Android 通过“更多”→“关联图片文件夹”授权直接包含当前 Markdown 文件的目录,以读取图片和保存附件;授权保留取决于系统与内容来源。
- 图片导出使用可访问的本地图片;文件移动和目录授权变化后,请检查相对路径与附件。
- 选中文字后可复制为 PNG;代码块提供直接复制按钮。
平台边界
- 图片支持范围为授权文档目录及子目录。SVG、父目录越级、绝对路径和指向目录外的符号链接不在读取范围内。
- “另存为”到其他目录只保存 Markdown 文件,不会自动迁移图片附件。请将引用的附件目录复制到新位置,保持相对路径有效。
- Android 的某些内容来源无法提供可关联目录,需要通过系统文件选择器重新打开或另存文档后授权。
- 浏览器文件访问和图片剪贴板能力由运行环境提供;网络图片导出仍受图片服务器的 CORS 限制。
- 当前仅接受有效 UTF-8 文本;混合换行保存后可能统一为主要换行格式。
- 大文档继续使用可视区分块渲染,复杂排版可能与普通文档存在差异。
验证记录
截至 2026-09-07,已完成以下验证。自动化、浏览器 UI、Windows 原生 UI 与 Android 构建/签名分别记录,未覆盖的路径单独说明。
| 项目 | 实际结果 |
|---|---|
| 前端自动化测试 | 当前 npm test 183 项全部通过。 |
| Rust 自动化测试 | 当前 10 项全部通过。 |
| 前端生产构建 | Vite 生产构建通过,最新一次耗时 3.25 秒。 |
| Windows 原生启动与基础用户路径 | 最终 EXE 构建通过(2 分 52 秒),文件版本 0.4.0;从发布产物启动并打开测试文档,文件名、大纲默认展开、阅读与本地图片显示通过。此前预览已验证 callout、查找和三模式切换。 |
| 浏览器布局与大纲 | 320 / 390 / 1280 / 2400px 视口、三主题、偏好刷新、大纲默认展开/关闭重开/章节跳转通过;2100px 正文实宽已核对。 |
| 浏览器草稿与代码剪贴板 | 158 字符未命名文档的新建取消/放弃、页面刷新后恢复完整正文(含表格与代码)通过。阅读和所见即所得代码复制通过,所见即所得剪贴板文本已精确核对。 |
| 浏览器选区 PNG 与取消打开 | 实际读取 image/png 剪贴板并目视验证通过:所见即所得选中中文标题生成 1440px 宽图片;源码 374 字符选区含长代码/宽表格,末尾 XYZ 和表格末尾 END 完整可见;阅读模式图片只含选中标题,后续 pre 空黑框已移除。Ctrl+O 后取消,374 字符正文完全保持。 |
| Windows 大文档原生路径 | 第二预览 0.4.0 打开 large-v040.md(3,370,744 字节 / 1,125,924 字符 / 1,603 行),canonical 文件名正确、大纲默认展开、本地图片正常。跳到第 800 行切阅读,关闭并重启同一文档后恢复阅读模式与中段位置。 |
| Windows 原生粘贴图片与保存 | 第三预览中,源码模式粘贴系统剪贴板 PNG,生成 20,325 字节的 assets/image-1788795569593-37252-0.png 并插入相对路径,右侧源码预览显示图片。Ctrl+S 后未保存标记消失;磁盘 native-v040.md 尾部路径一致,文件为 35,610 字节。 |
| Android ARM64 APK 构建与签名 | 最终 Rust Release、Gradle Release、签名、版本 0.4.0、versionCode=4000、ARM64 均通过;与既有版本同证书,47 个源码/前端输入哈希一致。没有连接设备,真机运行与 SAF 用户路径未验证。 |
| 本轮未覆盖的用户路径 | 完整图片导出的原生交互、大文档完整草稿的异常恢复、全部选区组合及图片剪贴板保存回退未完成端到端验收;相关自动化覆盖和已实测路径见 QA 清单。 |
| 最终产物、下载与 SHA-256 | EXE、APK 及两份校验文件上传 GitHub 后重新下载,四项逐字节 SHA-256 与本地产物一致;GitHub 资产 digest 同步核对通过。大小与校验值见下表。 |
完整用户路径清单见 v0.4.0 QA 清单。
发布文件
| 文件 | 大小(字节) | SHA-256 |
|---|---|---|
rollcat-md.exe |
6,612,992 | b33f59156a4f9dd8988145c87bf035aa51aa6bb5e39035df6b454a24416f252a |
rollcat-md-android-arm64.apk |
10,995,019 | cb66ae16f97381fd0d0434fbaa80b6ffeb84794f1d29d48043655dea4df31572 |
Android 签名证书 SHA-256:09a87cd108db8bd85a68ce393fb4e91af0f15e2a1264661ab866ee1ca074d5dc,与上一版本一致。
English
v0.4.0 improves long-document navigation, resuming reading, recovery of unsaved work, and image sharing. The default content width remains 1200px, with 1600px, 2100px, and full-width options. Reading settings add 14 / 16 / 18 / 20 / 24px text and 1.5 / 1.7 / 2 line height. Defaults remain 16px and 1.5.
The toolbar now exposes Find and Outline. Outline is enabled and expanded by default, with separate controls for collapsing the panel and disabling the feature. Twenty recent documents retain individual view and position context. Token estimates are hidden by default and can be enabled; callout styling is consistent in WYSIWYG and Reader.
Document files are saved manually. Complete unsaved text is copied to local recovery drafts approximately 1.5 seconds after editing stops, or every 10 seconds during continuous editing. Up to five draft entries are retained, including complete large-document text. The unsaved prompt offers Save and Continue, Discard Changes, and Cancel. A successful complete save removes the matching draft; discarding leaves a retained copy available for recovery. Keep separate backups for long-term history.
Windows can resolve relative PNG, JPEG, GIF, and WebP images within the document's directory and subdirectories, up to 32 MiB per image. Save the document before pasting or inserting an image; attachments are written under unique names in a neighboring assets/ folder. Android supports linking the folder directly containing the document through the system directory picker. Some content providers require reopening or saving the file through the system picker first. Authorized local images can be included in image exports. Selected content can be copied as PNG, and code blocks have copy buttons.
SVG, parent-directory traversal, absolute paths, and external symbolic links are outside the supported image scope. Save As in a different directory writes the Markdown file; copy the referenced attachment folders to the new location as well. Browser permissions and clipboard support vary by environment, and remote image export remains subject to CORS. UTF-8 remains the supported text encoding. Large documents retain viewport rendering.
Preferences, recent documents, and recovery drafts live in each device's WebView application data; drafts and recent records use IndexedDB. Copying the standalone EXE does not transfer these records. Clearing application or site data can remove them.
Verification recorded on 2026-09-07 includes 183 passing frontend tests, 10 passing Rust tests, and a successful Vite production build taking 3.25 seconds. An initial Windows 0.4.0 build opened a 12,626-character / 35,534-byte document from the command line; relative local images in WYSIWYG and Reader, callout appearance, one Find match, and the three view shortcuts passed native UI checks. Browser checks covered 320 / 390 / 1280 / 2400px layouts, three themes, retained preferences, outline controls and navigation, actual 2100px content width, recovery of a 158-character document after refresh, and code copying. WYSIWYG clipboard text was checked for exact content.
Selected PNGs were read back from the actual browser clipboard as image/png and visually inspected. A selected Chinese heading in WYSIWYG produced a 1440px-wide image. A 374-character Source selection containing long code and a wide table retained the trailing XYZ and final table marker END. A Reader selection contained only the chosen heading after removing an empty black box from the following pre element. These checks revalidated the selected-image fixes for the stated selections. Cancelling the file picker opened by Ctrl+O preserved all 374 source characters after the Toast UI Mod-o shortcut conflict was fixed.
A second Windows 0.4.0 preview opened large-v040.md, containing 3,370,744 bytes, 1,125,924 characters, and 1,603 lines. Its canonical-path filename displayed correctly, the outline opened by default, and the local cat image appeared. Jumping to line 800 and switching to Reader succeeded. Closing the window terminated the process; reopening the same document restored Reader and a middle-of-document scroll position. These checks cover those specific large-document paths.
A third Windows preview successfully pasted a PNG from the system clipboard in Source mode. It created assets/image-1788795569593-37252-0.png (20,325 bytes), inserted a relative Markdown image link, and displayed the image in the source preview. After Ctrl+S, the unsaved marker disappeared. The path at the end of native-v040.md matched the editor content, and the saved file was 35,610 bytes. Other paste modes, formats, and unnamed-document cancellation paths remain separate checks.
Final Windows and Android release builds passed. The Windows EXE reports version 0.4.0 and passed startup, default-outline, Reader, and local-image checks. The ARM64 APK reports version 0.4.0/code 4000, uses the previous signing certificate, and matches the recorded source/frontend inputs. All four GitHub assets were downloaded again and their SHA-256 hashes matched the local files. No Android device was connected, so device runtime and SAF flows remain unverified. Full image-export interaction, complete large-document crash recovery, other selection combinations, and clipboard save fallback were not covered end to end in this run. See the QA checklist for the scope of each result.