Commit graph

2404 commits

Author SHA1 Message Date
xemc 7dc46bb993 feat(figma-api): add exposeInstanceSwap for real instance-swap component properties
Adds figma.exposeInstanceSwap(slots, candidates, propertyName), which
exposes one or more nested instances as an instance-swap slot — the
enclosing component (or component set, walking up past intermediate
variant members) gets an INSTANCE_SWAP property offering the given
candidates, and each slot instance is tagged to respond to it. Mirrors
Figma's "Create component property > Instance swap", letting a designer
pick which component fills a slot (e.g. an icon on a button) instead of
the slot being baked-in static content.

Exposed as the expose_instance_swap MCP/CLI/chat tool.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-29 16:30:42 +03:00
PAVEL TKACHEV d178a7fd70
feat(app): add language picker to General settings
* feat(app): add language picker to General settings

- Reuse the persisted locale setting in General settings
- Localize the setting description across supported languages
- Cover immediate switching and reload persistence

* test(app): verify persisted language selection

---------

Co-authored-by: Danila Poyarkov <dev@dannote.net>
2026-08-29 16:01:03 +03:00
Danila Poyarkov 3f70a47503
Merge pull request #596 from 0xemc/fix/create-component-drops-sizing-mode
fix(figma-api): preserve auto-layout sizing mode when converting a node to a component
2026-08-29 15:54:15 +03:00
Danila Poyarkov 33baf1eb7f style(figma-api): format component conversion test 2026-08-29 15:47:43 +03:00
Danila Poyarkov 7fdf3952a2 merge: sync component sizing fix with master 2026-08-29 15:42:24 +03:00
Danila Poyarkov cbfc93f9bc test(figma-api): cover padding after component conversion 2026-08-29 15:40:25 +03:00
Danila Poyarkov 38bee364e8
refactor(tools): organize internal CLI workflows (#600)
* refactor(tools): organize internal CLI workflows

- Group visual-oracle commands behind a Citty CLI and domain folders\n- Add imported-document visual comparison manifests and pixel-diff outputs\n- Consolidate package-quality checks behind stable check, smoke, and verify commands\n- Remove obsolete visual root aliases and compatibility scripts

* fix(tools): validate visual oracle target scope

- Validate manifest records, required strings, and optional field types\n- Reject explicit OpenPencil nodes outside the configured page

* fix(tools): validate packaged runtime exports
2026-08-29 14:42:44 +03:00
Danila Poyarkov aed927e1f9
fix(clipboard): scope cached rich fallbacks (#602)
- Clear rich memory after plain-only browser and Tauri copies\n- Bind paste-to-replace memory fallback to the current native text\n- Preserve selection when asynchronous native cuts race with selection changes
2026-08-28 16:06:32 +03:00
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
xemc 6e07041026 docs: add changelog entry for sizing-mode fix 2026-08-26 10:18:33 +10:00
xemc 1fd7990cd9 fix(figma-api): preserve auto-layout sizing mode when converting a node to a component
createComponentFromNode copied only a hand-picked list of fields onto the
new COMPONENT node, omitting primaryAxisSizing/counterAxisSizing. A HUG-sized
auto-layout frame silently reverted to FIXED sizing on conversion, so later
padding changes no longer resized the frame (itemSpacing still worked since
it doesn't affect the frame's own size).
2026-08-26 10:17:07 +10:00
フォン 88c1077071
fix(cli): use Node fs for import command
Fixes openpencil import under Node.js by replacing Bun filesystem globals with node:fs/promises. Enforces the CLI runtime boundary through lint.
2026-08-24 20:26:52 +03:00
Danila Poyarkov a0a71c349a docs: audit recent changelog entries 2026-08-24 19:46:53 +03:00
Mikel Cabezas 7a311677cc
fix(editor): harden clipboard fallbacks
Merges the contributor clipboard fallback fix with maintainer follow-ups for browser cut safety and isolated fallback tests. Selections are preserved when clipboard serialization fails, and clipboard fallback tests no longer depend on host APIs.
2026-08-24 19:16:16 +03:00
Sergio Bernal b65b1bd481
fix(chat): treat MCP results with optional isError correctly
Merges the contributor fix with maintainer follow-up coverage. MCP results now treat omitted isError as success, scope detection to mcp__ tools, and preserve generic tool error handling.
2026-08-24 18:18:02 +03:00
Danila Poyarkov 5f8a373b2b
feat(diagnostics): add local usage and diagnostics foundation
Supersedes #572. Adds local structured AI usage and diagnostics history, typed diagnostic events, localized Usage/Diagnostics settings, shared IndexedDB lifecycle, and consolidated button/dialog primitives.
2026-08-24 16:56:40 +03:00
Danila Poyarkov bb8c5c18d9
fix(editor): commit vector drags on pointer release (#586)
* fix(editor): commit vector drags on pointer release

- Commit vertex and Bézier handle edits immediately on release\n- Rebase active vector-edit state after graph commits\n- Use vector-specific input paths and cover Pen-created Bézier drags

* test: reduce visual snapshot scope

- Replace behavior screenshots with scene assertions\n- Capture renderer fixtures from bounded canvas regions\n- Remove obsolete full-viewport snapshots

* fix(vector): harden edit cancellation and endpoint remapping

- Restore temporary vector geometry on cancelled pointer drags\n- Commit Bézier handle releases consistently and guard stale handle state\n- Preserve valid endpoint indices when connecting vector vertices

* fix(vector): cancel bend drags and satisfy formatting

* fix(vector): guard stale handle references

* fix(vector): guard stale overlay handle indices

* fix(vector): validate overlay handle keys

* refactor(vector): use typed handle selection ids

* test(vector): align typed handle selection coverage
2026-08-24 16:02:27 +03:00
Danila Poyarkov f75d67ad4d
feat(app): make crash recovery configurable
* feat(app): make crash recovery configurable

- Add an enabled-by-default persisted recovery preference and General settings control
- Stop recovery writes and remove the active document snapshot when disabled
- Suppress startup recovery discovery while the preference is disabled
- Cover disabled persistence and re-enable behavior

* fix(i18n): translate recovery preferences

* fix(app): serialize recovery disable cleanup

- Block re-enabled persistence until pending snapshot removal completes
- Preserve disable generations so stale cleanup cannot reset newer recovery state
- Display runtime-overridden recovery state in Settings
- Deep-clone nested preferences before updating recovery
2026-08-21 18:58:27 +03:00
Danila Poyarkov 0f981ff2af fix(mcp): isolate Portless development routes
- Register the Vite-owned MCP child as a worktree-prefixed Portless sibling service\n- Inject HTTPS and WebSocket automation URLs into the browser instead of assuming port 7600\n- Isolate development socket and discovery files while preserving fixed-port non-Portless flows
2026-08-21 08:14:04 +03:00
Danila Poyarkov 5201404f56
Merge pull request #565 from victorwads/agent/mcp-automation-settings
feat(mcp): add local automation controls to Settings
2026-08-20 21:28:43 +03:00
Danila Poyarkov 22c98e28c8 Merge origin/master into agent/mcp-automation-settings
# Conflicts:
#	src/views/EditorView.vue
2026-08-20 18:48:44 +03:00
Danila Poyarkov 9c4d188ea4 refactor(mcp): keep disabled tools typed across boundaries
- Carry normalized tool-name arrays through app and development JSON configuration

- Serialize the legacy CSV format only at child-process environment boundaries

- Bound, validate, trim, and deduplicate development tool policy input
2026-08-20 18:44:44 +03:00
Danila Poyarkov 59023f3854
Merge pull request #550 from victorwads/victorwads/fast-pages-open-recent
feat(app): add unified files home and progressive .fig loading
2026-08-20 18:42:23 +03:00
Danila Poyarkov c3412a44fc
docs: polish localized documentation
* docs: polish localized documentation

- Rewrite Russian documentation for natural terminology and current source parity\n- Continue the Polish editorial pass across guides and SDK references\n- Refresh shared localized SDK API data imports

* docs(pl): complete editorial pass

- Rewrite the remaining advanced Vue SDK references\n- Refresh the Figma compatibility matrix against the canonical source\n- Align terminology and behavior across every Polish documentation page

* docs(de): complete editorial pass

- Rewrite German guides, automation docs, and Vue SDK references\n- Restore current AI, export, component, and variable behavior\n- Refresh the Penpot comparison and Figma compatibility matrix

* docs(es): complete editorial pass

- Rewrite Spanish guides, automation docs, and Vue SDK references\n- Restore current AI, export, component, and variable behavior\n- Refresh the Penpot comparison and Figma compatibility matrix

* docs(fr): complete editorial pass

- Rewrite French guides, automation docs, and Vue SDK references\n- Restore current AI, export, component, and variable behavior\n- Refresh the Penpot comparison and Figma compatibility matrix

* docs: correct localized terminology

- Replace unnecessary English prose with natural localized terminology\n- Derive documentation aliases from named directory roots\n- Preserve English only for identifiers, APIs, and exact product terms

* docs(it): continue editorial pass

- Rewrite Italian user guides and automation documentation\n- Update Vue SDK composables and component references\n- Restore current AI, export, component, and variable behavior

* docs(it): complete editorial pass

- Finish Italian advanced SDK and reference documentation\n- Refresh the Penpot comparison and Figma compatibility matrix\n- Replace literal machine translations with natural technical prose

* docs(pl): refine property panel terminology

* docs: refine remaining localized prose

- Replace overfitted English prose in Polish feature documentation\n- Rewrite the Russian property-list reference in natural terminology

* docs(ru): rewrite Penpot comparison naturally

- Replace remaining English prose with natural Russian\n- Preserve code identifiers and library names only where required

* docs: rewrite localized feature overviews naturally

- Replace avoidable English prose in German, Spanish, and French\n- Keep identifiers and product names unchanged

* docs(de): refine property panel terminology

* docs: refine Spanish and French SDK terminology

* docs(ru): continue full prose audit

- Rewrite homepage, setup, navigation, and guide index naturally\n- Restore missing zoom shortcuts

* docs(ru): audit user and automation guides

- Rewrite selection, collaboration, and automation prose naturally\n- Preserve API identifiers while localizing ordinary terminology

* docs(ru): audit CLI inspection and analysis

* docs(ru): audit Vue SDK overview and guides

* docs(ru): audit Vue SDK API prose

- Localize ordinary component and composable terminology\n- Preserve API symbols and code identifiers

* docs(ru): audit advanced and gradient API references

* docs(ru): finish advanced API prose audit

* docs(ru): audit JSX renderer guide

* docs(ru): audit CLI export and scripting guides

* docs(pl): audit Penpot comparison prose

* docs(pl): audit selection and automation guides

* docs(pl): audit homepage and variable guides

* docs(pl): audit vector, layers, and Pen guides

* docs(pl): audit Auto layout and shape guides

* docs(pl): audit context menu and export guides

* docs(pl): audit JSX and analysis guides

* docs(pl): audit AI Chat guide

* docs(pl): audit components and CLI inspection

* docs(pl): audit scripting and SDK overview prose

* docs(pl): audit SDK API indexes

* docs(pl): audit SDK component references

* docs(pl): audit SDK composable references

* docs(ru): refine usePosition terminology

* docs(pl): audit advanced SDK references

* docs(pl): audit Figma compatibility matrix

* docs(pl): finish residual SDK terminology audit

* docs(pl): finish component terminology audit

* docs(pl): finish SDK guide terminology audit

* docs(de): begin full user guide prose audit

* docs(de): audit navigation, Pen, and layers guides

* docs(de): audit Auto Layout, shapes, menu, and export

* docs(de): audit components, text, and vector guides

* docs(de): audit variables and automation overview

* docs(de): audit AI Chat and collaboration guides

* docs(de): audit CLI inspection, analysis, and export

* docs(de): audit scripting and JSX guides

* docs(de): audit Vue SDK overview and guides

* docs(de): audit SDK API indexes

* docs(de): audit SDK component references

* docs(de): audit SDK composable references

* docs(de): audit advanced SDK references

* docs(de): audit Penpot comparison prose

* docs(de): audit Figma compatibility reference

* docs(es): begin full user guide prose audit

* docs(es): audit document organization guides

* docs(es): audit editing workflow guides

* docs(es): audit automation and collaboration prose

* docs(es): audit CLI inspection and export guides

* docs(es): audit CLI scripting guide

* docs(es): audit JSX and feature overview prose

* docs(es): audit Penpot comparison prose

* docs(es): audit SDK overview and guides

* docs(es): begin SDK component reference audit

* docs(es): audit SDK navigation component references

* docs(es): audit SDK color and layout components

* docs(es): begin SDK composable reference audit

* docs(es): audit SDK property composable references

* docs(es): audit SDK editor composable references

* docs(es): begin advanced SDK reference audit

* docs(es): audit advanced SDK state references

* docs(es): complete advanced SDK reference audit

* docs(es): audit Figma compatibility reference

* docs(es): complete residual terminology sweep

* docs(fr): begin full prose second audit

* docs(fr): audit AI and variables prose

* docs(fr): audit core user guide prose

* docs(fr): audit editing workflow guides

* docs(fr): audit CLI and JSX prose

* docs(fr): audit Penpot comparison prose

* docs(fr): audit SDK overview and guides

* docs(fr): begin SDK API reference audit

* docs(fr): audit SDK navigation component references

* docs(fr): audit SDK color and layout components

* docs(fr): begin SDK composable reference audit

* docs(fr): audit SDK property composable references

* docs(fr): audit editor composables and advanced APIs

* docs(fr): audit advanced SDK state references

* docs(fr): complete advanced SDK reference audit

* docs(fr): audit Figma compatibility reference

* docs(fr): complete residual terminology sweep

* docs(it): begin full prose second audit

* docs(it): audit document workflow guides

* docs(it): audit editing and automation prose

* docs(it): audit CLI and JSX prose

* docs(it): audit Penpot comparison and SDK guides

* docs(it): begin SDK API reference audit

* docs(it): audit SDK component and state references

* docs(it): audit residual SDK references

* docs(it): audit Figma compatibility reference

* docs(it): complete residual terminology sweep

* docs(i18n): verify residual locale terminology
2026-08-20 18:36:50 +03:00
Danila Poyarkov 55ba4a414a docs: preserve concurrent guide changelog entries 2026-08-20 17:21:08 +03:00
Danila Poyarkov d7000b6c43 fix(app): preserve browser editor entry flow
- Keep browser root routes compatible with existing editor workflows
- Open the files workspace explicitly from browser navigation while desktop still starts on New tab
- Show storage setup guidance when the unified workspace is not configured
2026-08-20 17:20:33 +03:00
Danila Poyarkov bb5960cd62 refactor(app): polish files workspace and New tabs
- Keep New tabs provisional so opening or creating a design reuses the active tab
- Separate recent document, storage, menu, worker, and workspace responsibilities
- Add source-aware recents, responsive files UI, loading states, and localized copy
- Preserve native local Open Recent behavior while supporting remote storage history
2026-08-20 17:20:33 +03:00
Danila Poyarkov 376447a5dd Merge remote-tracking branch 'origin/master' into pr-550-push-integration
# Conflicts:
#	CHANGELOG.md
2026-08-20 17:20:25 +03:00
Danila Poyarkov fad731b3e7 fix(mcp): align runtime metadata and restart errors
- Publish explicit effective tool state while retaining disabled tools for Settings

- Classify filesystem writes as side effects and localize category labels

- Stop failed restarts and return precise development control status codes
2026-08-20 16:27:11 +03:00
Danila Poyarkov 7955207146 Merge origin/master into agent/mcp-automation-settings 2026-08-20 16:02:26 +03:00
Danila Poyarkov 9fd1e0992a fix(tools): exclude dependencies from type shape scans
- Discover only canonical TypeScript sources across workspace roots

- Ignore dependency, generated, coverage, declaration, and worktree paths

- Cover POSIX, Windows, and nested workspace install layouts
2026-08-20 15:55:48 +03:00
Danila Poyarkov e5972b0c86 docs(mcp): clarify tool effect controls
- Name categories after read-only and document-writing behavior

- Keep locale schemas and the Unreleased changelog synchronized
2026-08-20 15:55:48 +03:00
Danila Poyarkov b9bdc043f7 fix(app): harden MCP configuration controls
- Parse bounded UTF-8 development configuration and await forced child exits

- Keep native folder selection behind the Tauri boundary

- Align Settings controls with read and write effects
2026-08-20 15:55:48 +03:00
Danila Poyarkov 25d7889ab2 refactor(app): make MCP runtime lifecycle explicit
- Encapsulate app-global runtime state in a testable service

- Serialize health refresh, start, stop, and restart operations

- Validate health metadata and clean state after failures
2026-08-20 15:55:48 +03:00
Danila Poyarkov 4a8714377e refactor(mcp): model tool effects and capabilities
- Remove duplicated document-access declarations from core tools

- Replace the MCP catalog with typed descriptors, capabilities, and policy

- Emit standard MCP annotations through type-safe registration
2026-08-20 15:55:48 +03:00
Danila Poyarkov fcec37e565
Merge pull request #569 from open-pencil/guide-parity-feedback
feat(canvas): add Figma guide feedback parity
2026-08-20 15:43:13 +03:00
Danila Poyarkov dc8367921b test(canvas): cover selected frame guide scope 2026-08-20 15:17:46 +03:00
Danila Poyarkov 47026f82a0 fix(canvas): preserve frame guide measurement ownership 2026-08-20 15:08:18 +03:00
Danila Poyarkov 5eebb3eb3d fix(canvas): select guides before opening context menu 2026-08-20 14:27:35 +03:00
Danila Poyarkov 2bc89c311d feat(canvas): add Figma guide feedback parity 2026-08-20 14:02:33 +03:00
Danila Poyarkov 9f7ce64bf6
Merge pull request #562 from open-pencil/guide-authoring
feat(editor): author canvas and frame guides from rulers
2026-08-20 09:39:19 +03:00
Danila Poyarkov 5acc2235c6 fix(canvas): polish guide ruler interactions 2026-08-20 08:56:33 +03:00
Danila Poyarkov b8d052f5c4 refactor(vue): normalize canvas interaction domains 2026-08-20 08:53:13 +03:00
Danila Poyarkov 3497aef818 refactor(canvas): normalize guide domain naming 2026-08-20 08:47:33 +03:00
Danila Poyarkov 27ad48b365 refactor(canvas): separate guide and overlay pipelines 2026-08-20 08:41:16 +03:00
Danila Poyarkov 197364923b fix(canvas): render live guide drag feedback 2026-08-20 08:23:04 +03:00
Danila Poyarkov d051b26fe9 chore: add Portless development URLs 2026-08-20 08:15:54 +03:00
Danila Poyarkov 581d774d0e fix(canvas): show directional cursors for guides 2026-08-20 07:53:33 +03:00
Danila Poyarkov 23b7d92ecf feat(canvas): support guide selection and editing 2026-08-20 07:50:31 +03:00
Victor Wads 67b534609d
fix(mcp): apply Settings preferences in development
- Restart the Vite-managed MCP server with the current authentication, root, and tool settings
- Keep the development control endpoint protected by the local token
- Cover explicit no-auth and configured-root environment propagation
2026-08-20 00:56:57 -03:00