Skip to content

fix(canvas): paste copied nodes across browser tabs - #689

Merged
FayeSpica merged 8 commits into
ThinkFlowLab:mainfrom
FayeSpica:fix/canvas-cross-tab-copy
Dec 4, 2026
Merged

FayeSpica merged 8 commits into
ThinkFlowLab:mainfrom
FayeSpica:fix/canvas-cross-tab-copy

Conversation

@FayeSpica

@FayeSpica FayeSpica commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Make copied canvas nodes pasteable in a second browser tab. The previous clipboard lived in the source tab, so the destination stayed empty. Refs #474.

What changed

Verification

Test plan

  • node tests/browser/cross_canvas_paste.mjs
  • node tests/browser/canvas_toolbar_topbar.mjs
  • node tests/browser/paste_undo.mjs
  • node tests/browser/canvas_clipboard_order.mjs
  • npm test
  • npm run build, npm run check:i18n, npm run check:browser-manifest, npm run check:browser-locale
  • npm run prepare:runtime --prefix apps/desktop, npm test --prefix apps/desktop with OPENDIRECTOR_DESKTOP_RUNTIME set, and node apps/desktop/scripts/smoke.mjs <macOS-app-executable>. Install the rebuilt wheel into a fresh virtual environment and run python scripts/verify_install.py --python <venv-python>.

Test results

  • Cross-canvas paste and both cross-tab paste entry points passed in Chromium on macOS. The same browser regression timed out on 83b142f0. The merged head passed the browser regression again. Four copied nodes rendered after the source closed and again after the destination reloaded. The saved assets matched the source fingerprints.

  • The merged toolbar test passed locally at all four locale and zoom settings. Its original 50% drag hit the left rail on both main and the first PR run.

  • Consecutive pastes, separate undo steps, and rapid undo/redo passed.

  • The ordering regression passed with the original media read held open. The earlier candidate timed out.

  • All 1,114 frontend tests passed on fb87ef01.

  • Build, i18n, browser manifest, browser locale, and 19 focused canvas tests passed on the merged head. The browser test used English and Chinese with isolated project storage and a model fixture. No real providers were called.

  • Bundled macOS runtime preparation passed, including dependency consistency and all eight desktop tests with the bundled Host. The signed local macOS app bundle passed the UI smoke test. A Windows x64 resolver dry run selected the same locked FastAPI 0.143.2 and OpenTelemetry API 1.45.1. The incompatible pair returned HTTP 500 in an isolated FastAPI reproduction. A fresh install of the rebuilt wheel resolved FastAPI 0.165.1 with OpenTelemetry API 1.45.3 and passed the project’s no-Node installed-wheel verification.

Before · After reload · Recording

The recording and screenshots show fb87ef01774c6c83d8e974c50ae9ded2a4052228. The toolbar fixture and desktop packaging follow-ups preserve the recorded browser behavior. The isolated GitHub browser job passed 35/35 on db2dbf58. Review base 08aaad5f23421d34a807e7a792e521823939ccd9 and head d6997f4b002c3d6aac7e04b905d236ae78489b79. Independent candidate review scored 93/100 with no publication blockers. The Windows installer passed on 0dfecc2c with the shared lock. Final hosted Release checks remain pending.

Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
@FayeSpica FayeSpica added type:bug Something is broken area:canvas Canvas, nodes and direct manipulation labels Dec 4, 2026
Signed-off-by: Weiming Liao <liaowm5@gmail.com>

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WITHHOLD db2dbf5 Refs #474

前后截图和录屏已下载、解码并看过:目标标签页刷新后 4 个图片节点仍在。核对了跨项目素材登记、同项目引用保留、旧 copy 晚到的测试;演示绑定 fb87ef01,后续只改 toolbar 测试/CI 说明。它证明的是同源浏览器跨标签页,不等于 #474 的桌面/外部 app 剪贴板互通。

同版 Windows 安装包 smoke 在 Welcome 导入与拖放保存失败,日志另有 publication lock timeout。先核对同基线是否复现,不直接归因给剪贴板。Toolbar 修复和 #686 重复,建议由单独 PR 落地,别绑两条验收。

Ran: 静态走查、查看附件和 CI 日志;未本地跑浏览器。当前 88/100(非批准):范围 2、正确性 3、验证 2、证据 3、简洁性 3。

English: Cross-tab evidence is good. Windows packaged smoke still fails on Welcome import/drop; separate the unrelated toolbar fixture fix.

Dot,代表 @david6666666。

@FayeSpica
FayeSpica merged commit 104cd9e into ThinkFlowLab:main Dec 4, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:canvas Canvas, nodes and direct manipulation type:bug Something is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants