release: v3.26.106 复制粘贴通道重写 + mac 图标修复 + 便利贴 1.0.8(未发布)
This commit is contained in:
1 parent
f3c16803a3
commit
d00efa1012
4 files changed
+26
-4
No files matched your search
@@ -16,6 +16,28 @@
|
||||
> 3. 核验正式地址版本 → 之后才移动 `stable` / `stable-verified-<日期>` 标签、更新本 CHANGELOG、写 GitHub Release(`gh release create`)。
|
||||
> 测试发现问题 → 改 → 再 `deploy:test`,正式环境不受影响。回滚点 `git reset --hard stable`。
|
||||
|
||||
## v3.26.106(2026-11-26)复制粘贴通道重写(mac ⌘C/⌘V 一条命令贴一切)+ mac 图标修复 + 便利贴空白行
|
||||
|
||||
**修「mac 上复制节点组时灵时不灵、⌘V 贴不上」**(用户多轮实测:复制节点组没有"已复制"提示;三种粘贴方式两处静默;焦点卡在输入框时只能看到"先点一下画布空白处")。
|
||||
根因是 mac 的 WKWebView **只在第一响应者可编辑时派发 paste 事件**,而 `Menu::default()` 的 Edit>Copy/Paste 绑的是 `copy:` / `paste:` 且 `setAutoenablesItems(false)` 永远 enabled —— 只要第一响应者认为"有东西可复制",AppKit 直接处理掉,keydown 根本到不了 JS。旧实现只有 keydown 一条复制入口,于是静默失败。
|
||||
|
||||
- **复制改由 DOM `copy` 事件驱动**(`src/clipboard-graph.js` 新增 `bindCopy`):在事件里用 `clipboardData.setData` **同步**写 `text/html`(带节点组标记)+ `text/plain`(人话摘要)。这是用户手势直接授权的通道,Chromium / WKWebView 都成,不再依赖 `navigator.clipboard.write` 那条异步链路(WKWebView 里它经常被拒,只能降级成"纯文本摘要 + 全等比对")。keydown 保留 80ms 兜底(个别不派发 `copy` 的 WebView),两者用时间戳去重;Workbench 卸载时显式摘监听,避免回首页后 ⌘C 拿已卸载的 refs 去复制旧画布。
|
||||
- **⌘V 改为 keydown 主动粘贴**(`src/clipboard-paste.js` 新增 `pasteFromKey`):指针在画布就接管,逐级降级 —— 系统剪贴板富读取(`navigator.clipboard.read`,能拿到 html 标记)→ 原生文本(Rust `clipboard_read_text`,靠 `matchPlain` 认出节点组)→ 原生图片(Rust `clipboard_read_image`)→ 应用内剪贴板。150ms 内若等到真实 `paste` 事件则让给事件通道(Windows / WebView2 行为不变),一次按键只贴一份。
|
||||
- **焦点在输入框里的三种情形分别处理**:指针在画布 → blur 并把节点组贴到指针处(原来这里只有一句"先点一下画布空白处",而点节点内的空白宿主会 `preventDefault`、焦点根本不会走);只有「N 个节点」摘要 → `preventDefault` 拦下(旧实现只提示不拦,摘要被原生粘贴打进输入框,是本次一并修掉的污染);剪贴板里带提示词全文 → 放行原生,照常把那段文字粘进输入框。
|
||||
- **节点组标记双写**:HTML 注释(Chromium 原样保留)+ `data-iwb-graph` 属性(WKWebView 写读剪贴板时会把注释整段洗掉,属性值能活)。`decode()` 两处都找,旧格式仍可读。
|
||||
- **提示可读**:未选中节点按 ⌘C 会明确说"没有可复制的节点";复制失败、粘贴失败都有指路文案;`notice` 的 err/info 5.2s 自动消失(旧实现只有 toast 会消失,错误提示会一直挂在状态栏)。
|
||||
- 门禁:`tests/clipboard-graph-test.js` 56 项(新增双标记、`writeToEvent`、`bindCopy`/`unbindCopy`),`tests/clipboard-paste-test.js` 100 项(新增 `pasteFromKey` 接管/去重、指针在画布改贴画布),`tests/clipboard-audit.spec.js` 的 TTL 用例补了"先清空系统剪贴板"前置(系统剪贴板按设计不设 TTL),第 19 条改为两种情形分别断言。
|
||||
|
||||
**修「mac 没有软件图标(Dock 空白方块)」**:v3.26.105 换图标时 `src-tauri/icons/icon.icns` 的文件头总长度字段写坏了 —— 声明 693,114 字节、实际 167,838 字节。`sips` 不做全量校验照样能解码(所以本地看图没问题),但 macOS IconServices 按声明长度解析直接失败,Dock / 访达 / 关于面板全部显示空白。用 `iconutil` 从 1024 主图重建(头部自洽,337,249 字节),并新增 `tests/icon-assets-test.js`:icns 头部长度 == 文件长度、chunk 链正好走完、必须有 1024 图块、png/ico 结构完好。**装新包后需要 `killall Dock`(或把 app 挪一次位置)让 LaunchServices 刷缓存。**
|
||||
|
||||
### 插件 sticky 1.0.8(市场单发,不改客户端包)
|
||||
|
||||
- **修「便利贴文字下面又多出一行空白」**(用户反馈:v1.0.4 修过又回来了)。`fitBody` 的高度缓存只比 `text/fontSize`,**宽度变化不重算** —— 宿主改卡片宽度的时机(拖宽节点、左右侧栏开合、首帧还没布局完 `clientWidth=0`)都会让它沿用旧行数的高度,文字少一行时正好空出一整行;`scrollHeight` 的整数取整误差(line-height 1.7×14=23.8)还会叠出半行。
|
||||
- 现在高度按「行高 × 整数行 + padding」对齐,并把 `clientWidth` 纳入缓存键;同时加 `ResizeObserver`(骨架被摘除时自我断开),宿主改宽度也能跟着重算。
|
||||
- 契约测试 `sticky/tools/harness.mjs` 新增两条断言:同一段文字宽度 160→420 高度必须变矮、高度必须落在整数行上(无半行残差);版本断言改为对齐 `package.json`,不再写死。
|
||||
|
||||
|
||||
|
||||
## v3.26.105(2026-11-26)新版全平台应用图标
|
||||
|
||||
- **全平台图标更新**:macOS / Windows 应用图标换新(深色圆角底 + 渐变 W 字标),`src-tauri/icons/` 17 个桌面图标整体替换(`icon.png` / `icon.icns` / `icon.ico` / `128x128` / `64x64` / `32x32` / `Square*Logo` / `StoreLogo`)。
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "image-workbench-web",
|
||||
"private": true,
|
||||
"version": "3.26.105",
|
||||
"version": "3.26.106",
|
||||
"description": "Browser-based node canvas image workbench",
|
||||
"scripts": {
|
||||
"build": "node scripts/build.js && node scripts/copy-plugins.js",
|
||||
@@ -10,7 +10,7 @@
|
||||
"app:build": "tauri build",
|
||||
"lint": "eslint src app.js",
|
||||
"test": "node tests/relay-task-graph-fixture-test.js && node tests/plugin-style-node-test.js && node tests/inherit-text-test.js",
|
||||
"test:unit": "node tests/result-img-doubleclick-test.js && node tests/gallery-audit-test.js && node tests/plugin-files-policy-test.js && node tests/theme-plugin-tokens-test.js && node tests/design-tokens-component-doc-test.js && node tests/theme-static-snapshot-test.js && node tests/overlay-layer-test.js && node tests/settings-scope-test.js && node tests/node-scope-test.js && node tests/appearance-v2-test.js && node tests/image-prompt-cover-test.js && node tests/unit-test.js && node tests/canvas-actions-test.js && node tests/canvas-performance-test.js && node tests/canvas-drag-performance-test.js && node tests/resize-observer-performance-test.js && node tests/node-drag-jank-test.js && node tests/edge-graph-performance-test.js && node tests/persistence-export-images-test.js && node tests/settings-hotkeys-size-presets-test.js && node tests/custom-size-validation-test.js && node tests/image-node-performance-test.js && node tests/drag-frame-performance-test.js && node tests/canvas-edge-memo-test.js && node tests/canvas-node-transform-test.js && node tests/canvas-dot-zoom-test.js && node tests/duplicate-ws-fresh-source-test.js && node tests/single-canvas-shell-test.js && node tests/navigation-layout-test.js && node tests/home-canvas-library-test.js && node tests/left-resource-layout-test.js && node tests/interface-hierarchy-test.js && node tests/three-page-layout-test.js && node tests/page-chrome-regression-test.js && node tests/task-cache-test.js && node tests/album-task-graph-test.js && node tests/generation-endpoint-test.js && node tests/storage-config-shape-test.js && node tests/generation-default-model-test.js && node tests/storage-zip-test.js && node tests/canvas-node-factory-test.js && node tests/runtime-error-test.js && node tests/runtime-lifecycle-test.js && node tests/runtime-fetch-test.js && node tests/runtime-channel-test.js && node tests/runtime-boundary-test.js && node tests/runtime-record-test.js && node tests/runtime-recovery-test.js && node tests/runtime-diagnostic-record-test.js && node tests/runtime-metrics-test.js && node tests/runtime-run-context-test.js && node tests/runtime-execution-context-test.js && node tests/storage-gc-canvas-refs-test.js && node tests/storage-health-test.js && node tests/generation-state-test.js && node tests/canvas-store-test.js && node tests/storage-result-test.js && node tests/storage-local-test.js && node tests/storage-domain-test.js && node tests/storage-runtime-test.js && node tests/storage-indexeddb-test.js && node tests/generation-scheduler-test.js && node tests/gallery-query-test.js && node tests/gallery-hydration-test.js && node tests/gallery-sync-test.js && node tests/image-blob-store-test.js && node tests/image-format-test.js && node tests/clipboard-graph-test.js && node tests/clipboard-graph-fallback-test.js && node tests/image-admit-test.js && node tests/image-dedupe-test.js && node tests/clipboard-kind-test.js && node tests/clipboard-paste-test.js && node tests/clipboard-copy-test.js && node tests/clipboard-native-test.js && node tests/paste-once-test.js && node tests/list-e2e-specs-test.js && node tests/desktop-csp-loopback-test.js && node tests/architecture-boundary-guard-test.js && node tests/plugin-host-test.js && node tests/plugin-data-test.js && node tests/plugin-loader-test.js && node tests/plugin-bundle-test.js && node tests/plugin-install-test.js && node tests/plugin-gallery-render-test.js && node tests/plugin-gallery-recovery-test.js && node tests/plugin-gallery-ux-test.js && node tests/plugin-grouplib-render-test.js && node tests/plugin-promptlib-render-test.js && node tests/image-compress-test.js && node tests/storage-fallback-indexeddb-test.js && node tests/canvas-normalize-test.js && node tests/canvas-geometry-test.js && node tests/canvas-history-test.js && node tests/canvas-ops-test.js && node tests/canvas-text-test.js && node tests/history-store-test.js && node tests/plugin-integrity-test.js && node tests/workspace-sessions-store-test.js && node tests/workspace-list-test.js && node tests/workspace-purge-test.js && node tests/provider-ping-test.js && node tests/runtime-diagnostics-hotpath-test.js && node tests/storage-log-failure-test.js && node tests/storage-convergence-test.js && node tests/swallow-wiring-test.js && node tests/workbench-logic-test.js && node tests/storage-autobackup-test.js && node tests/storage-outputs-mutate-test.js && node tests/sync-facts-guard-test.js && node tests/e2e-fixed-waits-ratchet-test.js && node tests/shell-render-behavior-test.js && node tests/canvas-meta-notice-behavior-test.js && node tests/source-text-ratchet-test.js && node tests/plugin-theme-contract-test.js && node tests/prompt-md-roundtrip-test.js && node tests/generation-results-store-test.js && node tests/out-groups-order-test.js && node tests/native-overlay-park-test.js && node tests/ui-dock-sanitize-test.js && node tests/ui-minimap-fit-test.js && node tests/ui-workbench-hooks-test.js && node tests/plugin-scale-contract-test.js && node tesLine truncated
|
||||
"test:unit": "node tests/result-img-doubleclick-test.js && node tests/gallery-audit-test.js && node tests/plugin-files-policy-test.js && node tests/theme-plugin-tokens-test.js && node tests/design-tokens-component-doc-test.js && node tests/theme-static-snapshot-test.js && node tests/overlay-layer-test.js && node tests/settings-scope-test.js && node tests/node-scope-test.js && node tests/appearance-v2-test.js && node tests/image-prompt-cover-test.js && node tests/unit-test.js && node tests/canvas-actions-test.js && node tests/canvas-performance-test.js && node tests/canvas-drag-performance-test.js && node tests/resize-observer-performance-test.js && node tests/node-drag-jank-test.js && node tests/edge-graph-performance-test.js && node tests/persistence-export-images-test.js && node tests/settings-hotkeys-size-presets-test.js && node tests/custom-size-validation-test.js && node tests/image-node-performance-test.js && node tests/drag-frame-performance-test.js && node tests/canvas-edge-memo-test.js && node tests/canvas-node-transform-test.js && node tests/canvas-dot-zoom-test.js && node tests/duplicate-ws-fresh-source-test.js && node tests/single-canvas-shell-test.js && node tests/navigation-layout-test.js && node tests/home-canvas-library-test.js && node tests/left-resource-layout-test.js && node tests/interface-hierarchy-test.js && node tests/three-page-layout-test.js && node tests/page-chrome-regression-test.js && node tests/task-cache-test.js && node tests/album-task-graph-test.js && node tests/generation-endpoint-test.js && node tests/storage-config-shape-test.js && node tests/generation-default-model-test.js && node tests/storage-zip-test.js && node tests/canvas-node-factory-test.js && node tests/runtime-error-test.js && node tests/runtime-lifecycle-test.js && node tests/runtime-fetch-test.js && node tests/runtime-channel-test.js && node tests/runtime-boundary-test.js && node tests/runtime-record-test.js && node tests/runtime-recovery-test.js && node tests/runtime-diagnostic-record-test.js && node tests/runtime-metrics-test.js && node tests/runtime-run-context-test.js && node tests/runtime-execution-context-test.js && node tests/storage-gc-canvas-refs-test.js && node tests/storage-health-test.js && node tests/generation-state-test.js && node tests/canvas-store-test.js && node tests/storage-result-test.js && node tests/storage-local-test.js && node tests/storage-domain-test.js && node tests/storage-runtime-test.js && node tests/storage-indexeddb-test.js && node tests/generation-scheduler-test.js && node tests/gallery-query-test.js && node tests/gallery-hydration-test.js && node tests/gallery-sync-test.js && node tests/image-blob-store-test.js && node tests/image-format-test.js && node tests/clipboard-graph-test.js && node tests/clipboard-graph-fallback-test.js && node tests/image-admit-test.js && node tests/image-dedupe-test.js && node tests/clipboard-kind-test.js && node tests/clipboard-paste-test.js && node tests/clipboard-copy-test.js && node tests/clipboard-native-test.js && node tests/paste-once-test.js && node tests/list-e2e-specs-test.js && node tests/desktop-csp-loopback-test.js && node tests/architecture-boundary-guard-test.js && node tests/plugin-host-test.js && node tests/plugin-data-test.js && node tests/plugin-loader-test.js && node tests/plugin-bundle-test.js && node tests/plugin-install-test.js && node tests/plugin-gallery-render-test.js && node tests/plugin-gallery-recovery-test.js && node tests/plugin-gallery-ux-test.js && node tests/plugin-grouplib-render-test.js && node tests/plugin-promptlib-render-test.js && node tests/image-compress-test.js && node tests/storage-fallback-indexeddb-test.js && node tests/canvas-normalize-test.js && node tests/canvas-geometry-test.js && node tests/canvas-history-test.js && node tests/canvas-ops-test.js && node tests/canvas-text-test.js && node tests/history-store-test.js && node tests/plugin-integrity-test.js && node tests/workspace-sessions-store-test.js && node tests/workspace-list-test.js && node tests/workspace-purge-test.js && node tests/provider-ping-test.js && node tests/runtime-diagnostics-hotpath-test.js && node tests/storage-log-failure-test.js && node tests/storage-convergence-test.js && node tests/swallow-wiring-test.js && node tests/workbench-logic-test.js && node tests/storage-autobackup-test.js && node tests/storage-outputs-mutate-test.js && node tests/sync-facts-guard-test.js && node tests/e2e-fixed-waits-ratchet-test.js && node tests/shell-render-behavior-test.js && node tests/canvas-meta-notice-behavior-test.js && node tests/source-text-ratchet-test.js && node tests/plugin-theme-contract-test.js && node tests/prompt-md-roundtrip-test.js && node tests/generation-results-store-test.js && node tests/out-groups-order-test.js && node tests/native-overlay-park-test.js && node tests/ui-dock-sanitize-test.js && node tests/ui-minimap-fit-test.js && node tests/ui-workbench-hooks-test.js && node tests/plugin-scale-contract-test.js && node tesLine truncated
|
||||
"test:diagnostics": "node tests/runtime-diagnostics-hotpath-test.js",
|
||||
"test:facts": "node tests/architecture-facts-guard-test.js && node tests/release-records-test.js",
|
||||
"plugins:gc": "node scripts/plugins-publish.mjs --gc",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "image-workbench"
|
||||
version = "3.26.105"
|
||||
version = "3.26.106"
|
||||
description = "无限画布 · 生图工作台桌面版"
|
||||
authors = ["malongan"]
|
||||
license = ""
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "image-workbench",
|
||||
"version": "3.26.105",
|
||||
"version": "3.26.106",
|
||||
"identifier": "com.malongan.imageworkbench",
|
||||
"build": {
|
||||
"frontendDist": "../dist",
|
||||
|
||||
Reference in new issue
Block a user