github yuzeguitarist/Deck v1.4.4
v1.4.4 | perlīmātus

latest release: v1.4.5
one month ago

Deck


Release Notes v1.4.4

优化 / Improvements

  • 新增 LaTeX 公式渲染:横板模式的 Markdown 卡片预览与 Markdown/纯文本预览面板会按需渲染行内、块级、常见 equation/align/matrix/cases 环境以及 TeX 源中的公式块;Markdown 的「拷贝纯文本」会把公式导出为可读 Unicode 文本,同时保留行内 code 与代码块原文不被渲染;公式渲染结果增加内存缓存,减少列表卡片与预览切换时的重复计算,并保留预览面板原有滚动逻辑。

  • Added LaTeX math rendering: horizontal Markdown card previews plus Markdown/plain-text preview panels now render inline, display, common equation/align/matrix/cases environments, and formula blocks inside TeX source; Markdown “Copy Plain Text” now exports formulas as readable Unicode text while preserving inline code and code blocks verbatim; rendered formulas are cached in memory to reduce repeated work during card and preview switches, preserving the existing preview scrolling behavior.

  • 优化自动检查更新的请求调度:保留原有固定检查时段不变,在客户端为每台设备生成稳定随机延迟,将集中整点请求打散到 30 分钟窗口内,平滑后端并发峰值,降低更新服务在高峰时段的错误率。

  • Improved automatic update-check scheduling by keeping the existing check windows while assigning each device a stable randomized delay, spreading requests across a 30-minute window to smooth backend concurrency spikes and reduce peak-hour update service errors.

  • 新增卡片列表内的问卷反馈入口:当历史记录超过 99 条且处于默认全部列表时,自动在最前方展示不可聚焦、不可拖拽、不会进入搜索或标签过滤结果的反馈卡片;支持打开问卷、本次隐藏与永久隐藏,并针对横版/竖版、深色/浅色模式完成视觉适配。

  • Added an in-list survey feedback entry: once history exceeds 99 items in the default All view, Deck shows a non-focusable, non-draggable feedback card at the front of the list that never appears in search or tag-filtered results; it supports opening the survey, hiding for the session, or hiding permanently, with tuned horizontal/vertical and dark/light appearances.

  • 优化设置页「统计」页面的打开与刷新性能:统计数据上屏时避免不必要的隐式动画抖动,并在渲染前预热常用应用图标缓存,降低主线程卡顿;页面布局、图表样式与交互保持不变。

  • Improved the Settings > Statistics page responsiveness by applying statistics updates without unnecessary implicit animation and warming the top-app icon cache before rendering, reducing main-thread stalls while preserving the existing UI, charts, and interactions.

  • 优化后台数据库维护扫描:文件搜索文本回填、向量索引回填与缺失文件扫描从 OFFSET 分页改为基于 id 的 keyset 分批推进,大数据量下维护耗时更稳定,并避免越往后扫描越慢;不改变前台 UI、搜索语义或清理规则。

  • Optimized background database maintenance scans by switching file-search backfill, vector-index backfill, and missing-file checks from OFFSET pagination to id-based keyset batching, keeping large-history maintenance time stable without changing the UI, search semantics, or cleanup behavior.

  • 优化 SQLite 读写调度:新增独立只读连接与 reader 队列,让历史列表、搜索、统计和轻量读取在 WAL 模式下不再排队等待写入、迁移、checkpoint 或后台维护任务;写入与维护仍保留在 writer 串行队列中,reader 不可用时自动回退,保证行为稳定。

  • Improved SQLite read/write scheduling with a dedicated read-only connection and reader queue, allowing history lists, search, statistics, and lightweight reads to avoid waiting behind writes, migrations, checkpoints, or background maintenance in WAL mode; writes and maintenance remain serialized on the writer queue, with automatic fallback if the reader is unavailable.

  • 优化剪贴板解析与数据库写入热路径:剪贴板监听阶段只在主线程读取 NSPasteboard 快照,富文本、缩略图与类型解析移到后台执行;主表插入复用缓存的 SQLite UPSERT statement 并直接绑定 BLOB,减少重复 prepare 和大 payload 拷贝;后台语义 embedding 入库不再绕回 MainActor。

  • Improved clipboard parsing and database write hot paths: clipboard monitoring now reads only an NSPasteboard snapshot on the main thread while rich-text, thumbnail, and type parsing run in the background; main-table inserts reuse a cached SQLite UPSERT statement with direct BLOB binding to reduce repeated prepare work and large-payload copies; background semantic embedding writes no longer hop back through the MainActor.

  • 优化语义搜索与 sqlite-vec 索引路径:sqlite-vec 向量写入、恢复与查询改用原生 Float32 BLOB,避免 JSON 字符串格式化与解析;向量命中后的回表改为按候选 id 批量读取并由语义距离恢复顺序,不再引入历史时间排序;安全模式下继续禁用向量索引以保持加密语义不变。

  • Optimized semantic search and sqlite-vec indexing by storing, recovering, and querying vectors as native Float32 BLOBs instead of JSON strings; vector hits now fetch rows by candidate id and restore semantic-distance ordering without introducing timestamp sorting; security mode continues to disable vector indexing to preserve encryption semantics.

  • 优化 NL Embedding 语义搜索质量:中文内容统一使用同一 CJK word-embedding 平均向量空间,避免短中文查询与长中文记录在不同 embedding 空间中比较导致漏召回或误排序;同时增加精确/包含命中的召回与排序兜底,不引入任何内置词表或外部向量模型。

  • Improved NL Embedding semantic-search quality by keeping Chinese queries and Chinese clipboard text in one CJK word-embedding averaged vector space, avoiding missed or mis-ranked results caused by comparing short queries and longer text across different embedding spaces; exact/contains recall and ranking fallbacks were also added without built-in synonym lists or external embedding models.

  • 优化语义 embedding 回填调度:向量缓存模型升级后立即持久化 schema 版本,并将 embedding 回填作为可恢复的后台维护任务分批推进,避免启动时反复 reset 缓存、重复备份或在大历史库上长时间占用 CPU。

  • Improved semantic embedding backfill scheduling by persisting the schema version immediately after an embedding-model cache reset and treating embedding population as resumable batched maintenance, avoiding repeated cache resets, repeated backups, and long CPU spikes on large histories.

  • 优化 SQLite WAL 与读路径维护:新增 WAL idle passive checkpoint 和 journal_size_limit,在面板空闲后低优先级收敛 WAL 文件大小;列表和导出等读路径不再顺手写回 legacy unique_id 或临时标记修复,改由后台维护任务分批处理,降低滚动、搜索和导出时的写放大。

  • Improved SQLite WAL and read-path maintenance with a low-priority idle passive checkpoint plus journal_size_limit to keep WAL growth bounded after the panel becomes idle; list/export read paths no longer write legacy unique_id or temporary-flag repairs inline, moving those fixes to batched background maintenance to reduce write amplification during scrolling, search, and exports.

  • 优化安全模式下混合搜索性能:复用加密搜索降级路径已经完成的解密精确匹配结果,避免再次构建快照并重复执行 exact ranking,同时跳过对密文字段无效的 SQL LIKE 兜底查询,降低 CPU 与能耗。

  • Improved mixed-search performance in security mode by reusing decrypted exact matches from the encrypted-search fallback path, avoiding duplicate snapshot ranking and skipping ineffective SQL LIKE fallback queries against encrypted fields to reduce CPU and energy use.

  • 优化大批量导出与智能文本分析性能:导出 JSON 编码与 U+2028/U+2029 清洗移出主线程,并将清洗流程合并为单次扫描;智能文本的纯文本判定改为一次遍历完成行长、中文比例与代码特征统计,降低导出、搜索和列表滚动场景下的 CPU 占用与卡顿风险。

  • Improved large export and smart-text analysis performance by keeping JSON encoding and U+2028/U+2029 sanitization off the main thread, folding sanitization into a single scan, and using one pass to classify plain text for line length, Chinese ratio, and code markers, reducing CPU use and hitch risk during exports, search, and list scrolling.

  • 优化 LAN 文件夹 / 应用包传输的 archive 解包安全策略:允许 .app、framework 等包内常见的安全相对符号链接,同时继续拒绝绝对路径、../../ 逃逸路径、重复 archive entry,以及任何 normalize 后会指向解包根目录外的符号链接。

  • Improved LAN folder/app-bundle archive extraction security by allowing safe internal relative symlinks commonly used inside .app bundles and frameworks, while still rejecting absolute paths, ../../ escapes, duplicate archive entries, and any symlink target that normalizes outside the extraction root.

  • 优化 LAN / iOS 同步在 VPN、代理增强模式和多网卡环境下的连接策略:仅使用真实局域网 IPv4 候选地址做发现与展示,监听端接受所有可用局域网接口,直连出站只在目标 IP 与物理接口网段匹配时才约束网卡,降低 Surge、VPN 或多 LAN 切换时无法连接的概率。

  • Improved LAN / iOS sync connectivity under VPN, proxy enhanced mode, and multi-interface setups by discovering and displaying only real private LAN IPv4 candidates, accepting inbound listeners across available LAN interfaces, and constraining outbound direct connections only when the target IP matches the physical interface subnet.

  • 优化 LAN 设备记录与手动直连地址管理:规范化 IPv4 输入,自动合并重复的手动设备和历史发现设备,并清理重复记录对应的凭据与元数据,减少同一设备重复出现、端口记忆错配或旧记录干扰连接的问题。

  • Improved LAN peer and manual direct-connect management by normalizing IPv4 input, merging duplicate manual and remembered peers, and cleaning stale credentials and metadata, reducing duplicate device entries, mismatched remembered ports, and stale peer records.

  • 优化脚本插件与智能规则执行性能:脚本超时改为独立调度,避免长脚本阻塞脚本队列或异步调用方;智能规则会复用单次快照、预编译规则信息与搜索文本范围,减少批量剪贴板处理时的重复字符串解析和规则遍历开销。

  • Improved script-plugin and smart-rule execution performance by scheduling script timeouts independently so long-running scripts do not block the script queue or async callers, and by reusing per-item snapshots, compiled rule metadata, and search-text ranges to reduce repeated parsing during bulk clipboard processing.

  • 优化脚本插件内存占用:普通非网络脚本转换改为在短生命周期 JavaScriptCore jsc 子进程中执行,避免 Deck 主进程因创建 JSContext 长期保留 4GB 级 JS VM Gigacage 虚拟地址空间;网络脚本仍保留原有授权 fetch 路径。

  • Improved script-plugin memory usage by running regular non-network transforms in a short-lived JavaScriptCore jsc subprocess, keeping the 4GB-scale JS VM Gigacage virtual-memory reservation out of Deck's long-lived app process while preserving the existing authorized fetch path for network plugins.

  • 优化 AI 聊天附件内存占用:限制 AI 附件保存的完整文本长度,并避免附件型消息把同一份大文本同时写入消息正文和附件内容,降低长文档、OCR 或大文件进入 AI 对话后的内存峰值与历史会话体积。

  • Improved AI chat attachment memory usage by capping saved full attachment text and avoiding duplicate storage of the same large text in both message body and attachment content, reducing memory peaks and conversation size when long documents, OCR text, or large files are sent to AI.

  • 优化搜索框与规则选择器体验:横版搜索框宽度与规则弹窗统一到卡片节奏,规则列表增加更轻量的鼠标悬浮反馈并移除干扰性的说明提示;搜索框新增稳定的 Ctrl+U 清空支持,竖版规则弹窗保持原有停靠距离与手感。

  • Improved the search field and rule picker experience by aligning the horizontal search width and rule popup to the card rhythm, adding a subtler hover state for rule rows, removing distracting rule tooltips, adding reliable Ctrl+U clearing in the search field, and preserving the existing vertical-mode popup spacing.

  • 优化横板模式 PDF 卡片预览:使用第一页内容铺满卡片预览区,并将文件名居中叠放在底部,去掉独立 PDF 图标,让 PDF 文件在横板列表中更像连续内容预览。

  • Improved horizontal PDF card previews by filling the card preview area with the first page content, centering the filename at the bottom, and removing the separate PDF icon for a more continuous document-preview feel.

  • 优化 PDF 预览窗口底部控制:移除独立缩放工具栏,将缩放按钮移到底部信息栏时间左侧,并保留鼠标悬浮反馈,减少 PDF 内容区底部的视觉分层。

  • Improved PDF preview controls by removing the separate zoom toolbar, moving the zoom buttons to the bottom info bar beside the timestamp, and preserving hover feedback to reduce visual layering at the bottom of PDF previews.

  • 优化图片预览窗口底部信息栏:图片预览恢复为实心底栏样式,并在文件大小左侧新增「复制 OCR 文本」按钮;按钮仅在图片已有 OCR 文本时显示,复用右键菜单的复制逻辑与底栏按钮的悬浮反馈。

  • Improved the image preview window footer by restoring the solid info-bar style and adding a “Copy OCR Text” button beside the file size; the button appears only when OCR text is available and reuses the context-menu copy behavior plus the footer button hover treatment.

修复 / Fixes

  • 修复唤出 Deck 弹出面板时,SwiftUI 异步 DisplayLink 渲染线程解析动态 NSColor provider 可能触发 Swift 6 默认 MainActor 隔离断言并以 _dispatch_assert_queue_fail / EXC_BREAKPOINT 立即崩溃的问题;动态浅色/深色适配颜色现在统一通过非隔离 helper 创建,保留原有视觉效果。

  • Fixed a crash when showing the Deck panel where SwiftUI's async DisplayLink renderer could resolve dynamic NSColor providers outside Swift 6 default MainActor isolation and terminate with _dispatch_assert_queue_fail / EXC_BREAKPOINT; dynamic light/dark adaptive colors now use a shared nonisolated helper while preserving the existing appearance.

  • 修复历史列表首屏包含 PDF 文件时,QuickLook 缩略图回调在 Swift 6 默认 MainActor 隔离下可能触发 _dispatch_assert_queue_fail / EXC_BREAKPOINT,导致打开侧边栏后立即崩溃的问题;PDF 缩略图仍由 QuickLook 生成,但回调结果会先安全回到主线程再更新缓存与界面。

  • Fixed a crash when opening the sidebar with PDF file items on the first screen of history, where QuickLook thumbnail callbacks could violate Swift 6 default MainActor isolation and terminate with _dispatch_assert_queue_fail / EXC_BREAKPOINT; PDF thumbnails still use QuickLook, with results safely marshalled back to the main thread before updating cache and UI.

  • 修复开启「删除确认」后,系统确认删除弹窗出现时主面板四个圆角位置露出淡色直角的问题;删除确认保留系统 NSAlert,但避开 SwiftUI .alert 自动添加的矩形遮罩层,保持 Deck 圆角面板视觉一致。

  • Fixed pale square artifacts appearing in the four rounded corners of the main panel when Delete Confirmation was enabled and the system delete prompt appeared; the confirmation still uses the system NSAlert while avoiding the rectangular dimming layer automatically added by SwiftUI .alert.

  • 修复 LAN 接收包含符号链接的 DMG / 应用包 archive 时,界面提示接收失败但文件内容已经落盘的问题;现在 archive 会先进入事务式 staging 目录,只有解包与完整安全校验全部通过后才提交到最终位置,失败、拒收或确认面板缺失都会自动清理已落盘内容,并在启动时清理历史遗留的 staging 目录。

  • Fixed LAN receives of symlink-containing DMG/app-bundle archives where the UI could report failure while extracted files remained on disk; archives now extract into a transactional staging directory and are committed only after extraction and full safety validation succeed, with automatic cleanup on failure, rejection, or missing confirmation UI, plus startup cleanup for stale staging directories.

  • 修复 AI 聊天界面中用户消息与 AI 回复首行距离过近的问题,并统一思考圆点、流式首 Token 与普通消息的垂直间距;从「思考中」切换到首次输出时不再出现文本位置突然上跳、贴近输入框的视觉异常。

  • Fixed AI chat spacing where the assistant's first reply line could sit too close to the user's message, and unified the vertical layout for the thinking dot, first streamed token, and regular messages so the first token no longer jumps upward toward the input field.

  • 修复在「文件」标签下搜索时,FTS 过滤查询可能因 Swift 6 并发隔离检查触发 _dispatch_assert_queue_fail 并崩溃的问题;搜索结果与过滤语义保持不变。

  • Fixed a crash when searching under the Files tag where an FTS filtered query could trigger Swift 6 concurrency isolation checks and fail with _dispatch_assert_queue_fail; search results and filtering behavior are unchanged.

  • 修复安全模式启动或迁移窗口中,混合明文/密文历史数据的兼容读取会把预期内的解密探测失败记录为错误日志的问题;真正的迁移、加密文件和云同步解密失败仍会正常报错。

  • Fixed noisy security-mode startup logs where tolerant reads of mixed plaintext/encrypted history could report expected decrypt-probe failures as errors; real migration, encrypted-blob, and cloud-sync decryption failures still report normally.

  • 修复安全模式下模糊搜索、正则搜索和混合搜索无法稳定命中加密历史的问题:搜索排序使用解密后的轻量快照,并在安全模式 FTS 降级路径中保留类型与标签过滤;不改变搜索 UI 和结果展示样式。

  • Fixed fuzzy, regex, and mixed search reliability in security mode by ranking against decrypted lightweight search snapshots and preserving type/tag filters in the security-mode FTS fallback path, without changing the search UI or result presentation.

  • 修复语义 embedding 回填遇到无文本图片、二进制内容或暂时无法生成向量的历史记录时可能反复调度同一批 pending 行的问题;这些不可嵌入记录现在会写入跳过标记并继续推进,避免阻塞后续文本记录重建向量。

  • Fixed semantic embedding backfill repeatedly rescheduling the same pending rows when encountering textless images, binary items, or temporarily unembeddable records; Deck now writes skip markers for those rows and continues advancing so later text items can still rebuild embeddings.

  • 修复安全模式下后台 Keychain 解密暂时不可用时,语义 embedding 回填可能把 Base64 密文当作明文索引的问题;解密失败现在会作为可重试状态保留,避免写入不可命中的密文向量,并降低连续重试时的后台 CPU 抖动。

  • Fixed semantic embedding backfill in security mode potentially indexing Base64 ciphertext as plaintext when background Keychain decryption is temporarily unavailable; decrypt failures are now kept retryable, preventing unusable ciphertext vectors and reducing background CPU churn during repeated retries.

  • 修复复制 PNG / TIFF / JPEG 等已提供主图片数据的剪贴板内容时,仍会在主线程额外通过 NSImage(pasteboard:) 解码并重编码 PNG 的问题;现在只有主图片数据缺失时才走图片 fallback,减少大图复制时的内存峰值和 UI 卡顿。

  • Fixed an unnecessary main-thread NSImage(pasteboard:) decode and PNG re-encode when copying PNG, TIFF, JPEG, or other supported image pasteboard data that already provides primary bytes; Deck now uses the image fallback only when primary image data is missing, reducing memory spikes and UI stalls for large image copies.

  • 修复 legacy 空 unique_id 行在后台元数据回填时可能生成与当前可见条目不同 UUID 的问题;后台回填会优先复用读路径已经分配的 pending UUID,避免后续按 unique id 删除、同步或查询时命中不一致。

  • Fixed legacy rows with empty unique_id potentially receiving a different UUID during background metadata backfill than the one already assigned to the visible item; backfill now reuses the pending UUID from the read path so later delete, sync, and lookup operations by unique id remain consistent.

  • 修复缓存 UPSERT statement 在 SQLite 返回 SQLITE_SCHEMA 时可能先 finalize、随后又在 defer 中 reset / clear 同一 statement 指针的生命周期问题;现在会先完成正常 reset / clear,再释放缓存 statement 并在下一次写入时重新 prepare,避免 schema 变化场景下的未定义行为。

  • Fixed the cached UPSERT statement lifecycle when SQLite returns SQLITE_SCHEMA: Deck no longer finalizes the statement before the deferred reset / clear runs, and instead resets/clears first, finalizes the cached statement afterward, and prepares a fresh one on the next write to avoid undefined behavior during schema-change scenarios.

Don't miss a new Deck release

NewReleases is sending notifications on new releases.