Skip to content

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 04 Dec 16:32
· 9 commits to main since this release

✨ 新功能与高频体验升级

  • 多选合并粘贴 & 批量删除:支持 Ctrl/Cmd+点击 与 Shift+方向键 多选条目,底部切换紧凑操作条支持一键「合并粘贴(换行)/ 合并粘贴(空格)/ 批量删除」,按 Esc 或隐窗自动退出多选。
  • 误删撤回(Undo Delete)与默认纯文本粘贴开关:删除条目后支持 30 秒 / 最近 10 批内存无损撤回(Ctrl/Cmd+Z 或点击底部 Toast 撤回,保留别名/分组/置顶态);常规设置新增「默认纯文本粘贴」(开启后 Enter 纯文本、Shift+Enter 保留格式)与「粘贴/复制后自动移至非置顶顶部」开关(#8,保持置顶 pin_order 不变)。
  • 图片预览自适应动态缩放与原图清晰度修复(#9):移除右侧图片预览固定 340×134 盒模型,随窗口/平铺 WM 可用区域动态等比缩放且不超过原图上限;列表行缩略图与右侧主预览/1:1 原图分层加载,配合独立 24 MiB LRU 与隐窗 GPU 纹理释放,彻底告别放大发糊。
  • 更多实用细节:新增防录屏/屏幕共享窗口保护(Windows WDA_EXCLUDEFROMCAPTURE / macOS NSWindowSharingNone)、全屏游戏/视频自动隐藏停靠胶囊、隐藏托盘图标开关、托盘「忽略下一次复制」、文件条目「仅复制纯路径」与失效文件弱化标注、文本右键一键清洗粘贴(去空白/单行/大小写),以及 .cbx 归档可选导出/恢复非敏感配置偏好。

🛡️ 安全、隐私与三端兼容性深度加固

  • macOS 全面稳固(#2 / #6 / #7 / #10):
    • 彻底移除 enigo(全仓零 enigo),改用线程安全 CoreGraphics 虚拟键码粘贴并显式维持 NSApplicationActivationPolicyAccessory,根治后台粘贴 HIToolbox SIGTRAP 崩溃与 Dock 残留(#2);
    • 落地 macOS .app 整包原子交换、签名校验、启动确认超时保护与失败自动回滚(#6 / PR #7);
    • 新增能力驱动 SecretStorePolicy:实时探测代码签名 TeamIdentifier,开源 ad-hoc 签名包将 history.db 主密钥一次性从 Keychain 自动迁移至 0o600 本地受保护文件,根治每次升级反复弹 Keychain 授权窗并消除启动静默退出(三端统一弹出原生错误框 + 一键定位日志目录,#10);
    • 修复 macOS RDP/虚拟机粘贴丢失 Cmd 掩码(补 0x000008 与本地键盘抑制)、全屏 Space 切屏落位、Word 延迟渲染卡死、IsSecureEventInputEnabled 安全输入框提示,以及无 Xcode CLT 时 /usr/bin/swift stub 假阳性弹窗。
  • Linux X11 / Wayland 体验全面拉齐(#5):
    • 修复 Linux AppIndicator / KSNI 托盘点击无反应(挂载原生 4 项托盘菜单并同步暂停状态)与 AppImage 开机自启写入临时 /tmp/.mount_* 失效问题(自动解析 $APPIMAGE 外壳路径);
    • 真实反映 Linux 无系统原生 OCR 状态并提供离线插件引导(#5);新增 --toggle CLI 供 Wayland 绑定系统快捷键唤起;新增终端软件自动切换 Ctrl+Shift+V、非拉丁 XKB 键盘布局物理 V 键兜底,以及基于 dlopen("libXtst.so.6") 的零 enigo 粘贴。
  • Windows 体验与稳定性加固:
    • 新增 UAC 管理员提权目标窗口探测(中止无效模拟按键并给出清晰 Toast)、透明 PNG 写回同时写入 "PNG" 与 CF_DIB 根治透明图变黑底、休眠唤醒 WM_POWERBROADCAST 原地重挂 WH_KEYBOARD_LL 自愈、开机自启托盘退避重试自愈,以及 RDP / Win11 截图工具 / LibreOffice 轻量退避读取防抢锁。
  • 核心安全与性能防线:
    • 封堵 Vault 锁屏绕过漏洞(未解锁优先渲染锁屏并清零隐藏编辑器输入框)、自动填充明文密码永不滞留剪贴板、暂停监听前置零 I/O 拦截与恢复基线同步、浏览器无痕窗口与自定义正则/高置信密钥过滤;
    • 封堵 RapidOCR 第三方镜像无 SHA-256 校验风险(硬编码官方 SHA-256 强制验签)、插件 manifest.executable 路径穿越、OCR/更新器/归档下载与解压体积上限、OCR 子进程超时防死锁、SemVer 2.0.0 预发布号排序修复(beta.10 > beta.2);
    • 新增 PNG 原始字节零解码 IHDR 直通快路径、浏览器单 <img> 壳识别、空搜索零大文本解密快路径、重复大图哈希快路径、U+FFFC/BiDi 控制符展示净化、搜索 60ms 防抖与 Enter 前同步 flush、非 ASCII Unicode 大小写折叠检索、SQLite 5s busy_timeout、串行原子配置保存与大型 Ditto.db 流式迁移。

🏗️ 11-Crate 物理隔离架构重构

  • 完成 MIT 公理设计导向的 11-Crate 物理隔离六边形架构:将 Windows / macOS / Linux 全部原生 unsafe 后端物理拆分为三端互不依赖的独立 crate(clipboardx-platform-{win,macos,linux})+ 纯安全共享基座 clipboardx-platform-shared + 纯安全门面 clipboardx-platform;拆解全部历史巨石文件,建立 14 条自动化架构公理(全仓零 #[allow(clippy::*)]、全部生产文件 <= 2,500 行零豁免、零 enigo、应用/存储层零 target_os 泄漏)。

🙏 社区致谢

感谢 @Korov 提交 PR #7(macOS .app 整包更新与回滚机制)与 #6/#8 建议,感谢 @thirteen7(#2 真机崩溃栈)、@DabengBa(#5/#9 精准源码排查)与 @UnsplashZ(#10 macOS Keychain cdhash 深度诊断)的高质量反馈!


✨ What's New & UX Upgrades (English)

  • Multi-Select Merge Paste & Batch Delete: Select multiple clips via Ctrl/Cmd+Click or Shift+Arrow and use the compact action bar to merge-paste (newline/space) or batch-delete; Esc or hiding clears selection.
  • Undo Delete & Default Plain-Text Paste: Restorable in-memory delete undo stack (10 batches / 30s TTL via Ctrl/Cmd+Z or toast button, preserving aliases/groups/pins); added "Paste plain text by default" (Enter plain / Shift+Enter formatted) and "Move to top on copy/paste" (#8, preserving pinned pin_order).
  • Dynamic Responsive Image Preview & Full-Res Clarity (#9): Removed hardcoded 340×134 fit bounds so images scale smoothly to the preview pane up to original dimensions; separated list thumbnails (thumb_ref) from full-res preview/1:1 images (blob_ref) with a dedicated 24 MiB LRU and GPU texture eviction.
  • More Daily-Driver Polish: Screen-capture protection (WDA_EXCLUDEFROMCAPTURE / NSWindowSharingNone), auto-hide docking capsule during fullscreen games/presentations, toggleable tray icon visibility, "Ignore next copy", file-entry "Copy path only" & missing-file indicator, quick text clean-and-paste actions, and optional non-sensitive AppConfig export/restore in .cbx archives.

🛡️ Security, Privacy & Cross-Platform Hardening (English)

  • macOS Overhaul (#2 / #6 / #7 / #10): Removed enigo workspace-wide in favor of thread-safe CoreGraphics key events + persistent NSApplicationActivationPolicyAccessory (#2); integrated atomic .app bundle replacement with verification, timeout, and rollback (#6 / PR #7); introduced capability-driven SecretStorePolicy probing code-signing TeamIdentifier to migrate ad-hoc builds to 0o600 .master.key without repeated Keychain prompts plus cross-platform native startup error dialogs (#10); fixed RDP Cmd mask (0x000008), dynamic full-screen Space switching, Word deferred-render hangs, IsSecureEventInputEnabled alerts, and /usr/bin/swift CLT stub false positives.
  • Linux X11 / Wayland Parity (#5): Attached native AppIndicator/KSNI tray menus for Linux click reliability; fixed AppImage autostart to register $APPIMAGE instead of ephemeral /tmp/.mount_*; surfaced accurate native OCR availability (#5); added --toggle CLI wakeup for Wayland shortcuts, automatic Ctrl+Shift+V in terminals, non-Latin XKB keycode fallback, and dlopen("libXtst.so.6") paste.
  • Windows Hardening: Added UAC elevated-target detection with clear toast guidance, transparent PNG ("PNG" + CF_DIB) writeback to fix black alpha backgrounds, WM_POWERBROADCAST WH_KEYBOARD_LL self-healing after sleep/resume, tray creation retry on boot, and read backoff for RDP / Win11 Snipping Tool / LibreOffice.
  • Core Security & Performance: Fixed Vault lock-screen bypass when an editor is open, guaranteed autofill password cleanup on clipboard restore failure or disabled restore, zero-I/O pause + resume baseline sync, private-browsing & custom regex / high-confidence secret filtering, pinned RapidOCR SHA-256 verification, plugin executable traversal blocking, bounded archive/download extraction, OCR worker timeouts, SemVer 2.0.0 prerelease ordering (beta.10 > beta.2), zero-decode PNG IHDR passthrough, single-<img> HTML detection, zero-big-text empty-search fast path, streaming Ditto.db migration, Unicode case-folding search, 60ms search debounce with pre-Enter flush, 5s SQLite busy_timeout, and serialized atomic config persistence.

🏗️ 11-Crate Physically Isolated Architecture (English)

  • Re-architected into an 11-crate strictly acyclic DAG isolating all unsafe OS code in clipboardx-platform-{win,macos,linux} behind clipboardx-platform-shared and a pure-safe clipboardx-platform facade, decomposed all monolithic source files, and locked 14 automated architectural axioms (zero production #[allow(clippy::*)], zero files over 2,500 lines, zero enigo, zero target_os leaks in app/storage).

🙏 Community Credits

Special thanks to @Korov (PR #7, #6, #8), @thirteen7 (#2), @DabengBa (#5, #9), and @UnsplashZ (#10) for their detailed reports and contributions!

Full Changelog: v0.6.0...v0.7.0