openpencil/src
Danila Poyarkov 8408b56721
refactor(app): modernize browser clipboard adapter (#601)
* refactor(app): isolate system clipboard adapters

- Split browser and Tauri clipboard behavior into focused adapters\n- Inject browser clipboard capabilities into unit-testable operations\n- Remove navigator and document mutation from headless clipboard tests

* refactor(app): delegate browser clipboard fallbacks

- Use copy-to-clipboard for modern rich MIME writes and execCommand fallback\n- Keep OpenPencil-specific HTML and plain-text payload construction at the adapter boundary\n- Remove hand-rolled browser capability and selection handling

* test(clipboard): verify rich browser menu round-trip

- Exercise copy from the browser Edit menu under a user gesture\n- Verify text/html and text/plain ClipboardItem formats\n- Paste the system clipboard payload back into the canvas

* refactor(clipboard): reduce adapter surface

- Expose only command dispatch and the injectable system clipboard contract\n- Keep browser and Tauri copy/paste operations private to their adapters\n- Rename the in-memory DataTransfer fallback and share design HTML recognition

* fix(clipboard): harden format and fallback handling

- Require complete OpenPencil or Figma clipboard markers\n- Await browser writes so adapter failures resolve false\n- Write plain-only Tauri payloads as text and reject unrelated clipboard text

* fix(clipboard): reject unrelated current browser data

* fix(clipboard): bind fallbacks to copied selection

- Match cached rich HTML to the current Tauri plain-text fallback\n- Preserve nodes when selection changes during an asynchronous cut\n- Reject unrelated current browser HTML before consulting memory

* fix(clipboard): reuse the shared memory payload type

* fix(clipboard): scan design markers linearly

* fix(clipboard): distinguish unavailable and empty reads

* style(clipboard): use includes for marker closure

* test(clipboard): avoid wall-clock marker assertions
2026-08-28 14:37:42 +03:00
..
app refactor(app): modernize browser clipboard adapter (#601) 2026-08-28 14:37:42 +03:00
assets
components fix(chat): treat MCP results with optional isError correctly 2026-08-24 18:18:02 +03:00
theme feat(diagnostics): add local usage and diagnostics foundation 2026-08-24 16:56:40 +03:00
views Merge origin/master into agent/mcp-automation-settings 2026-08-20 18:48:44 +03:00
app.css feat(code): add live JSX and HTML/CSS editing (#525) 2026-08-15 09:48:42 +03:00
App.vue feat: add Figma-style variants and component libraries (#512) 2026-08-14 19:31:41 +03:00
constants.ts feat(editor): add configurable snapping and guides 2026-08-18 19:11:48 +03:00
env.d.ts fix(mcp): isolate Portless development routes 2026-08-21 08:14:04 +03:00
global.d.ts feat(app): open multiple files from the Open dialog (#552) 2026-08-18 11:30:36 +03:00
main.ts chore(tools): harden package and dependency checks 2026-07-01 12:56:45 +03:00
markdown.d.ts chore(lint): remove unsafe test casts 2026-05-06 00:42:45 +03:00
router.d.ts
router.ts refactor(app): polish files workspace and New tabs 2026-08-20 17:20:33 +03:00