Commit graph

287 commits

Author SHA1 Message Date
Danila Poyarkov f673d5bbc1 chore: keep architecture checks standalone 2026-05-14 20:44:30 +03:00
Danila Poyarkov 8976ea7c3d chore: enforce test structure rules 2026-05-14 20:35:23 +03:00
Danila Poyarkov c80ce4c7a9 test: cover architecture lint rules 2026-05-14 19:07:23 +03:00
Danila Poyarkov d2c3b1bce8 test(editor): cover auto-layout hover targets 2026-05-14 18:28:04 +03:00
Danila Poyarkov c00356bc29 fix(demo): make auto-layout text responsive 2026-05-13 06:23:08 +03:00
Danila Poyarkov 9ab6bfa3bf fix(app): restore left panel scrolling 2026-05-13 05:47:32 +03:00
Danila Poyarkov 8cf51ffefd perf(editor): use repaint previews while resizing 2026-05-13 05:38:14 +03:00
Danila Poyarkov 1242fa7086 fix(editor): keep drag previews in sync 2026-05-13 05:34:04 +03:00
Danila Poyarkov 4e64644385 perf(editor): use repaint previews while dragging 2026-05-13 05:23:06 +03:00
Danila Poyarkov 3708b4fd1b perf(editor): avoid layout during drag moves 2026-05-13 05:15:15 +03:00
Danila Poyarkov 49620ef26b fix(vue): distinguish layer child drops 2026-05-13 05:10:29 +03:00
Danila Poyarkov 1f273f880e fix(editor): guard drill selection text editing 2026-05-13 05:07:27 +03:00
Danila Poyarkov aa9f03407a Revert "fix(editor): delay text editing after drill selection"
This reverts commit b23bb9d3e7.
2026-05-13 04:59:24 +03:00
Danila Poyarkov b23bb9d3e7 fix(editor): delay text editing after drill selection 2026-05-13 04:58:42 +03:00
Danila Poyarkov fb01bcb433 fix(editor): hide noop auto-layout drag indicators 2026-05-13 04:52:40 +03:00
Danila Poyarkov 419c77d8de fix(canvas): wait for exact font styles 2026-05-13 04:47:32 +03:00
Danila Poyarkov 08b9e56a15 fix(editor): restore auto-layout instance dragging 2026-05-13 04:47:28 +03:00
Danila Poyarkov c38778094d fix(vue): restore layer tree reordering 2026-05-13 04:47:23 +03:00
Danila Poyarkov 5fd0e60a99 fix(editor): hit test entered containers in world space 2026-05-13 04:11:19 +03:00
Danila Poyarkov 2f39ecaa4d fix(canvas): cull nested nodes in world space 2026-05-13 03:56:04 +03:00
Danila Poyarkov 66f562b52f fix(fonts): bundle Inter bold 2026-05-13 03:50:35 +03:00
Danila Poyarkov f25e5cfe0a fix(scene-graph): avoid id collisions after import 2026-05-13 03:36:28 +03:00
Danila Poyarkov 9daf260471 feat(components): render asset detail previews
- Generate PNG previews for the selected component/default variant in the details dialog
- Revoke stale preview URLs and refresh on scene changes
- Assert the rendered preview image in assets e2e coverage
2026-05-12 22:24:16 +03:00
Danila Poyarkov 0a53c91a46 feat(components): add asset details dialog
- Add a Figma-style component details dialog from local Assets
- Show preview, description, library key, documentation link, variant properties, and insert action
- Cover details metadata in the Assets panel e2e test
2026-05-12 22:16:07 +03:00
Danila Poyarkov 880fcf3d5b feat(components): surface library metadata in assets
- Show imported library badges in the local Assets panel
- Display component descriptions and documentation links from Figma metadata
- Cover library metadata rendering in the Assets panel test
2026-05-12 21:56:07 +03:00
Danila Poyarkov 66f91de825 test(kiwi): cover component metadata serialization
- Assert verified component library metadata is emitted to NodeChange fields
- Cover component property definitions and variant property specs serialization
2026-05-12 21:52:23 +03:00
Danila Poyarkov 866cabd623 feat(kiwi): preserve component library metadata
- Import Figma component keys, library keys, publish/version IDs, descriptions, links, and variant specs
- Export verified component metadata back into NodeChange fields
- Use variantPropSpecs to derive component property values after component set imports
- Cover large fixture metadata import as heavy tests
2026-05-12 21:48:42 +03:00
Danila Poyarkov 4bf161b983 fix(components): sync instances when switching variants
- Swap instance contents when changing variants instead of only updating componentId
- Recreate instance redo state without stale child IDs
- Insert assets into entered containers using local coordinates
- Fall back to Windows paths when URL parsing fails
2026-05-12 18:43:11 +03:00
Danila Poyarkov 24d3ea748f fix(components): respect default variants in assets
- Insert component set assets using explicit default variant values
- Report duplicate variant value combinations in the assets panel
- Cover default insertion and conflict warnings in Playwright
2026-05-12 18:16:51 +03:00
Danila Poyarkov 1ceabf7938 feat(components): add local assets panel
- Add a left-sidebar Assets tab for local components and component sets
- Insert component set assets as instances of the default variant
- Showcase local component set insertion in the demo
- Cover search, empty state, standalone insert, and variant switching with Playwright
2026-05-12 17:30:35 +03:00
Danila Poyarkov 23039e0b99 fix(canvas): wait for CJK fallback fonts
- Skip CJK and Arabic text until fallback font families are ready
- Re-render after async fallback font loading completes
- Add Playwright coverage for delayed CJK fallback loading
2026-05-12 16:54:55 +03:00
Danila Poyarkov a1339e845b refactor(tools): use acorn AST parser for eval wrapping
Replace hand-rolled regex heuristic with proper acorn JS parsing.
The AST correctly identifies ExpressionStatement as the last node
regardless of trailing semicolons, comments, or complex syntax.

Fixes edge cases like '42;' which the regex wrongly treated as a
statement.

Co-authored-by: stiff <v.stiff@gmail.com>
Co-authored-by: Jais Pedersen <jais@pedersens.net>
2026-05-11 12:15:38 +03:00
Danila Poyarkov 9e013e60e7 fix(mcp): fix stdio handshake and eval return values
Stdio handshake:
Server now sends { type: register, token } to WebSocket clients on
connection, so the stdio bridge receives the token immediately instead
of deadlocking while both sides wait to receive.

Eval return values (REPL-style):
Add wrapEvalCode() that detects when the last non-empty line is a value
expression and promotes it to a return statement. Bare expressions like
JSON.stringify(result) now return the value instead of undefined.
Single implementation in packages/core/src/tools/analyze/eval-wrap.ts
used by both the tool and the automation bridge.

Co-authored-by: stiff <v.stiff@gmail.com>
Co-authored-by: Jais Pedersen <jais@pedersens.net>
2026-05-11 12:05:43 +03:00
Danila Poyarkov 72614fac4c fix(editor): paste into selected container
Paste now targets the selected frame/group/component/section instead of
always placing nodes on the page root, matching Figma's behavior:

- Single container selected: paste as child
- Non-container child selected: paste as sibling in its parent
- Entered container (double-click): paste inside it
- Nothing or multiple nodes selected: paste on the page

Also applies to image paste via placeImageFiles.

Fixes #79
2026-05-07 13:56:30 +03:00
Danila Poyarkov 541c9bd13c test: move tauri helpers into domain folder
- Move tests/helpers/tauri-mocks.ts → tests/helpers/tauri/mocks.ts
- Move tests/helpers/tauri-fig-export-fixture.ts → tests/helpers/tauri/fig-export-fixture.ts
- Update all imports
2026-05-06 16:16:08 +03:00
Danila Poyarkov aad26b535e test: move prefixed splits into domain folders
- Move newly split tests under explicit domain subfolders
- Update nested helper imports after the moves
- Add a lint guard against repeating existing sibling domains as filename prefixes
2026-05-06 14:27:21 +03:00
Danila Poyarkov b9da0dcb76 chore(lint): enforce test complexity limits
- Extract color picker fill comparison helpers
- Guard derived text assertions without optional chains
- Split resize math into smaller helper functions
- Remove the remaining complexity test exceptions
2026-05-06 14:18:29 +03:00
Danila Poyarkov 13a3475026 test(layout): split auto-layout coverage
- Move auto-layout tests into focused files by layout behavior
- Preserve sizing, wrapping, text measurement, and positioning coverage
- Remove the last max-lines test exception
2026-05-06 14:10:20 +03:00
Danila Poyarkov 5e7c042352 test(scene-graph): split basic coverage
- Move scene graph behavior tests into focused files
- Share basic scene graph helper builders from basic/helpers.ts
- Remove scene graph basic from max-lines exceptions
2026-05-06 14:05:58 +03:00
Danila Poyarkov c589818a71 test(clipboard): split node import coverage
- Move clipboard node import tests into focused files by behavior
- Preserve filtering, hierarchy, styling, component, and undo coverage
- Remove import-nodes from max-lines exceptions
2026-05-06 14:01:18 +03:00
Danila Poyarkov 9ebc61d78f test(figma): split API coverage
- Move FigmaAPI tests into focused files by feature area
- Share API construction from figma/api/helpers.ts
- Remove FigmaAPI coverage from max-lines exceptions
2026-05-06 13:37:15 +03:00
Danila Poyarkov 54ccc35e3e test(fig): split legacy import coverage
- Move legacy fig import tests into focused domain files
- Share NodeChange fixture builders from legacy/helpers.ts
- Remove legacy import from max-lines exceptions
2026-05-06 13:33:42 +03:00
Danila Poyarkov 42d346ba47 test(kiwi): split serialization regression coverage
- Move Kiwi serialization fix tests into one file per regression area
- Share codec setup and Kiwi helpers from serialize-fixes/helpers.ts
- Remove serialize fixes from max-lines exceptions
2026-05-06 13:12:53 +03:00
Danila Poyarkov 24629610a4 test(render): split canvas effect coverage
- Move canvas effect renderer tests into focused files by behavior
- Share renderer and canvas mocks from effects/helpers.ts
- Remove canvas effects from max-lines exceptions
2026-05-06 13:05:51 +03:00
Danila Poyarkov 93d5370d7d test(svg): split SVG export coverage
- Move SVG builder, path, and render export tests into focused files
- Share SVG export helpers from tests/engine/svg/export/helpers.ts
- Remove svg export from max-lines exceptions
2026-05-06 12:57:54 +03:00
Danila Poyarkov 21a3337a96 chore(tests): enforce no-empty-function
- Replace remaining empty mock callbacks with explicit undefined returns
- Remove the last no-empty-function test exceptions
- Validate check and affected renderer/text tests
2026-05-06 12:40:42 +03:00
Danila Poyarkov 432f945da6 chore(tests): narrow no-empty-function exceptions
- Replace simple no-op test callbacks with explicit undefined returns
- Remove no-empty-function exceptions for autosave, stroke picker, font settings, pen, tauri, AI adapter, and undo helper tests
- Validate check plus affected engine and E2E tests
2026-05-06 12:32:54 +03:00
Danila Poyarkov bbf122a5c5 chore(tests): route store access through browser bridge
- Expose window.openPencil.getStore() instead of a direct store property
- Update E2E helpers and specs to use the bridge getter
- Add lint coverage preventing direct window.openPencil.store access
2026-05-06 12:19:39 +03:00
Danila Poyarkov 657188b097 chore(tests): enforce non-null assertion rule
- Remove remaining test non-null assertions and delete the broad test override
- Add explicit guards for canvas, design panel, auto-layout, SVG, Kiwi, hit-test, scene graph, text editor, and clipboard tests
- Validate check plus affected engine and E2E coverage
2026-05-06 11:44:18 +03:00
Danila Poyarkov 17857f912f chore(tests): guard render text and mutation lookups
- Replace non-null assertions in canvas text rendering and mutation undo tests
- Use expectDefined for CanvasKit handles and getNodeOrThrow for graph nodes
- Validate check and affected engine tests
2026-05-06 11:27:24 +03:00