Commit graph

307 commits

Author SHA1 Message Date
Danila Poyarkov 7a02ee2c62
feat(editor): model split canvas panes (#519)
* refactor(editor): separate canvas view state

- Classify shared and view-local editor state explicitly

- Let canvas surfaces render supplied view state and report their viewport

- Preserve the existing one-canvas behavior by default

* fix(canvas): preserve loading render state

* feat(editor): model split canvas panes

- Add pure recursive split-tree operations with validated sizes

- Add explicit pane registry and independent view-state cloning

- Cap visible panes and cover close and split behavior

* refactor(editor): group state ownership modules

- Move shared and view state into the editor state namespace

- Model the partition with explicit interfaces and default factories

- Derive runtime view keys from the default view object

* feat(editor): model split canvas panes

- Add pure recursive split-tree operations with validated sizes

- Add explicit pane registry and independent view-state cloning

- Cap visible panes and cover close and split behavior

* feat(editor): add split canvas views

- Render recursive pane layouts with Reka UI splitters and pane-local headers
- Route canvas input, selection, viewport state, and close actions to the active pane
- Repaint every canvas during shared document previews and cover split lifecycle in tests

* fix(editor): clean up inactive pane interactions

- Cancel drag, padding preview, and text editing state when pane focus changes
- Remove duplicate changelog entries introduced while updating master
2026-08-15 10:31:52 +03:00
Danila Poyarkov 6193b6da7e
feat(code): add live JSX and HTML/CSS editing (#525)
* feat(code): isolate Design JSX execution

- Transform JSX with the existing Sucrase dependency and execute it in a disposable opaque-origin iframe worker

- Block ambient network capabilities and enforce source, timeout, output, depth, and element limits

- Validate that only bounded plain structured data returns to the application

* feat(code): add editable Design JSX

- Add a lazy CodeMirror editor with JSX syntax support, completion, diagnostics, and bounded scrolling

- Convert validated sandbox output into trusted Design JSX helpers before rendering

- Apply or insert JSX as one undoable graph transaction while preserving dirty drafts

* feat(code): localize JSX editor actions

- Add translated-message fallbacks for editing, applying, inserting, and draft state

- Document the editable JSX workflow in the unreleased changelog

* fix(code): satisfy typed sandbox validation

- Keep the sandbox document terminator literal and preserve optional selection handling under type-aware lint

* test(code): resolve sandbox probes through app aliases

* fix(code): bound sandbox results before cloning

- Enforce string, array, object, depth, element, and byte limits inside the disposable worker

- Retain host-side validation as a second structured-data boundary

* fix(code): keep JSX and HTML editing modes separate

- Switch generated Tailwind output back to OpenPencil JSX before editing

- Close the JSX editor when opening HTML/CSS import and avoid stacking both editors

* feat(code): support authored Design JSX programs

- Allow local constants, function components, arrays, conditionals, fragments, and multiple roots

- Preserve replacement positions for multiple selected roots and reject mixed-parent or locked selections

- Cover multi-root undo, redo, and all-or-nothing rollback

* feat(code): add explicit JSX view mode

- Let authors leave CodeMirror without applying a draft

- Keep the editable surface and HTML/CSS importer mutually exclusive

* feat(code): diagnose unknown JSX vocabulary

- Warn on OpenPencil elements and properties that are absent from the canonical schema

- Surface diagnostics inline through CodeMirror lint markers

* test(code): accept WebKit isolation diagnostics

- Cover the sandbox architecture against Playwright WebKit

- Accept engine-specific wording while preserving the same unavailable-window assertion

* refactor(code): consolidate Design JSX vocabulary

- Drive renderer warnings, completion, and diagnostics from one supported-property schema

- Recognize locally declared components and add focused schema and transform tests

- Replace CodeMirror basicSetup with an explicit feature set and remove the umbrella package

* fix(code): support Design JSX variable helpers

* refactor(code): unify JSX sandbox validation

* fix(code): account for complete sandbox output

* fix(code): preserve locked JSX descendants

* fix(code): preserve JSX sibling order

* fix(code): recompute JSX parent layouts

* feat(code): add live code previews

* test(code): centralize graph assertions

* fix(code): harden live preview sessions

* docs: describe live code editing

* fix(code): update editor accessibility labels

* fix(code): use theme-aware error colors

* fix(dev): stop Vite disconnect error loops

* fix(code): clarify live preview status

* fix(ui): avoid tooltip attribute warnings

* test(code): assert semantic preview status

* refactor(code): remove obsolete editor messages

* fix(code): harden preview concurrency and isolation

* fix(code): cancel stale reset previews
2026-08-15 09:48:42 +03:00
Danila Poyarkov 29ed07bcc4
refactor(editor): separate canvas view state (#518)
* refactor(editor): separate canvas view state

- Classify shared and view-local editor state explicitly

- Let canvas surfaces render supplied view state and report their viewport

- Preserve the existing one-canvas behavior by default

* fix(canvas): preserve loading render state

* refactor(editor): group state ownership modules

- Move shared and view state into the editor state namespace

- Model the partition with explicit interfaces and default factories

- Derive runtime view keys from the default view object
2026-08-14 21:24:01 +03:00
Danila Poyarkov f781c48eaa
fix(canvas): pan horizontally with Shift+wheel (#523)
- Convert primarily vertical Shift+wheel input to horizontal panning
- Preserve native horizontal trackpad deltas instead of swapping both axes
- Keep Ctrl and Meta wheel gestures on the existing zoom path
2026-08-14 20:58:28 +03:00
Danila Poyarkov 39bc4d2eb1
feat(acp): add reusable MCP connections (#516)
* feat(acp): add reusable MCP connections

- Store named Streamable HTTP connections separately from model providers
- Keep bearer tokens in the credential manager and resolve them per ACP session
- Add localized settings, validation, documentation, and focused coverage

* test(acp): harden MCP connection workflow

- Label credential inputs and confirm destructive connection removal
- Exercise MCP server delivery through an in-memory ACP session
- Extend the browser smoke test to cover accessible input and confirmation flows

* fix(acp): validate MCP connection lifecycle

- Keep non-browser storage initialization in memory and restore the German model copy
- Reject persisted name collisions and invalid draft IDs
- Preserve connections on credential failures and require credentials before enablement
2026-08-14 20:08:45 +03:00
Danila Poyarkov b93ffea073
feat: add Figma-style variants and component libraries (#512)
Closes #239
2026-08-14 19:31:41 +03:00
Danila Poyarkov c2103ef722
feat(canvas): measure distances between layers (#515)
* feat(canvas): measure distances between layers

- Show temporary Figma-style guides while Option or Alt is held

- Support deep nested targets with Command or Control plus Alt

- Measure transformed world bounds and container padding

* fix(canvas): anchor diagonal measurement guides

- Join diagonal distances at the nearest object corners

- Separate horizontal and vertical value badges

- Crop visual coverage tightly around the measurement overlay

* fix(canvas): cover measurement edge cases

- Draw transformed target outlines and center value pills on guides

- Suppress conflicting hover overlays during measurement mode

- Cover containment, overlap, multi-selection, rotation, and fractional gaps

* fix(canvas): suppress conflicting measurement overlays

- Hide auto-layout hover visuals while distance measurements render

- Assert fractional measurement geometry with numeric tolerance
2026-08-14 18:18:55 +03:00
Danila Poyarkov 2c064c5a79 chore: align adapted checks with current conventions
- Preserve uppercase acronym casing in package tooling and CSS helpers

- Keep selector escaping without restoring removed test ID prop APIs

Co-authored-by: Joseph Cumines <joeycumines@gmail.com>
2026-08-13 20:33:10 +03:00
Danila Poyarkov 6a888ea692 fix(vue): escape test selectors outside browsers
- Fall back to standards-compatible CSS identifier escaping when CSS.escape is unavailable

Co-authored-by: Joseph Cumines <joeycumines@gmail.com>
2026-08-13 20:33:10 +03:00
Danila Poyarkov 1eb1f38c78 feat(text): surface missing font substitutions
- Track loaded font provenance and aggregate page-level face fidelity, including synthesized styles and active Inter substitutions
- Add a localized warning banner with retry and affected-layer actions
- Expose get_font_status through the Figma API and MCP tool registry
2026-08-13 18:33:10 +03:00
Danila Poyarkov 7b8e5fbfbe fix(app): harden document recovery lifecycle
- Serialize recovery cleanup with active snapshot writes

- Preserve version ordering across autosave, restore, and cleanup

- Fall back to memory when IndexedDB operations fail
2026-08-13 17:22:59 +03:00
Danila Poyarkov 37912d92a7 feat(app): recover unsaved documents
- Persist debounced FIG snapshots for source-less documents in IndexedDB

- Restore or discard orphaned snapshots from the editor startup dialog

- Clear recovery data after successful saves and explicit tab closure
2026-08-13 17:22:59 +03:00
Danila Poyarkov 3a2c8afc3e fix(ai): harden failure diagnostics
- Redact and bound provider error details in copied logs

- Avoid repeat toasts after locale changes

- Show reasoning effort only for supported providers
2026-08-13 15:03:12 +03:00
Danila Poyarkov 9e93884e7f fix(ai): surface silent provider failures
- Report credit and output-limit failures through localized toasts and debug logs

- Persist optional provider-specific reasoning effort on model profiles

- Classify insufficient-credit connection tests and cover failure diagnostics
2026-08-13 15:03:12 +03:00
Danila Poyarkov 51ab21571a fix(i18n): translate remaining app surfaces
- Localize import, collaboration, settings, color, font, and accessibility text across supported locales

- Synchronize the document language through reactive Unhead attributes

- Translate connection failures, browser fallbacks, notifications, and save prompts
2026-08-11 22:19:40 +03:00
Danila Poyarkov a6842fde47 fix(vue): discard stale workspace results 2026-08-10 22:47:00 +03:00
Danila Poyarkov b21509cc8d fix(storage): isolate workspace refresh state
- Discard stale provider refreshes and queued previews

- Guard malformed deflate data and listener failures

- Start periodic refresh without an immediate callback
2026-08-10 22:30:54 +03:00
Danila Poyarkov c2bcb21fcf fix(vue): preserve workspace item types 2026-08-10 21:18:36 +03:00
Danila Poyarkov 6d9aeea28b refactor(vue): split workspace preview lifecycle 2026-08-10 20:42:56 +03:00
Danila Poyarkov 4fe27dd1e6 fix(storage): harden workspace previews
- Validate ranged thumbnail payloads and S3 bounds

- Invalidate stale previews and expose loading errors

- Document the public document workspace composable
2026-08-10 20:02:58 +03:00
Danila Poyarkov dde7376bd3 feat(storage): show workspace document previews
- Load embedded Figma thumbnails through bounded S3 byte-range requests

- Add a headless Vue workspace composable with lazy previews and refresh lifecycle

- Cache local previews and refresh the workspace after saves and synchronization
2026-08-10 17:21:36 +03:00
Danila Poyarkov 7f91594d0c refactor: standardize acronym casing
- Rename first-party API, RPC, JSON, CORS, SVG, JSX, and related identifiers to preserve acronym casing
- Keep upstream and serialized boundary names unchanged
- Add a lint guardrail and migration notes for exported APIs
2026-08-10 15:48:16 +03:00
Danila Poyarkov 4986fb8b54 fix(ai): simplify model configuration
- Separate model, connection, and advanced settings

- Resolve capabilities and output limits from provider catalogs

- Keep custom model compatibility declarations explicit
2026-08-10 12:55:35 +03:00
Danila Poyarkov 751195891f Release v0.14.0 2026-08-10 11:40:44 +03:00
Danila Poyarkov 005f1bcdfa
Merge branch 'master' into polish-pr-455 2026-08-05 17:03:52 +03:00
Danila Poyarkov 7a3a8bf53f refactor(chat): polish model profile switching
- Centralize design-profile eligibility for the selector, role assignment, fallback, and tests
- Keep built-in provider model selection intact while switching saved custom profiles
- Add localized accessible labeling and constrain long profile names
2026-08-05 15:44:27 +03:00
Danila Poyarkov 0982ac513d fix(i18n): clarify Russian workspace menu label 2026-08-03 20:41:26 +03:00
Danila Poyarkov 79aa6ba5dd refactor(app): move storage workspace navigation into File menu
- Replace the full-width editor header action with a shared browser and native menu command
- Localize the destination and cover menu schema and browser navigation
2026-08-03 17:42:39 +03:00
Rob Coenen d85e2ec5e1 feat(app): add a Back to workspace button to the editor header
Once a document is opened from the storage workspace there is no way back
to it: the only in-app route is Settings -> Cloud storage -> Open workspace,
and the desktop shell has no browser back at all.

Add an explicit button in the shared header row (rendered on both web and
Tauri, unlike the File/Edit menubar below it) that routes to /storage. It is
a fixed destination rather than history navigation, so it behaves the same
on both platforms.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-03 17:18:16 +03:00
Danila Poyarkov de8578c435
feat(app): expand Figma menu and selection parity (#459)
- Add Figma-style object, component, selection, view, settings, and browser Move to Page actions
- Add undoable z-order, transformed distribution, inverse selection, and single/bulk rename behavior
- Keep browser and native menus, shortcuts, generated schema, localization, and documentation aligned
2026-08-03 00:23:05 +03:00
Danila Poyarkov 7e8feb998a fix(canvas): import dropped SVG files
- Parse dropped SVGs through the shared XML-backed import pipeline
- Preserve transforms, gradients, viewport alignment, and reusable shapes
- Place mixed image drops in one ordered undoable transaction
- Cover file filtering, atomic placement, undo, and browser drops

Co-authored-by: Rob Coenen <753704+rcoenen@users.noreply.github.com>
2026-07-29 15:20:06 +03:00
Danila Poyarkov cb2c4aa3d3 fix(vector): edit vectors from opened files
- Resolve the active graph at action time and map edit geometry through full world transforms
- Regenerate live path fills and discard stale imported stroke outlines after edits
- Preserve fill and stroke geometry through resize previews, undo, and redo
- Cover graph replacement, nested transforms, edit history, resizing, and CanvasKit output

Co-authored-by: Rob Coenen <753704+rcoenen@users.noreply.github.com>
2026-07-28 12:30:21 +03:00
Danila Poyarkov e257af0e0a fix(i18n): respect browser locale priority
- Match regional language tags to supported base locales in preference order

- Preserve exact regional matches and English fallback

- Cover the reported locale sequence and unsupported variants
2026-07-28 03:19:32 +03:00
Danila Poyarkov fc8bccac7f
perf(fig): speed up large page switches (#428)
* perf(fig): scope lazy page population work

- Limit override propagation and clone indexing to active page nodes
- Reuse clone membership sets instead of rebuilding them per subtree
- Coalesce Layers tree structural rebuilds during population
- Add a regression test that rejects document-wide scans

* fix(fig): preserve global override propagation

- Keep fill and child-placement propagation across clone lineages
- Retain scoped work only for passes proven independent of inactive pages
- Cover the two required global propagation scans

* perf(fig): finish scoped population review

- Stream active override candidates without temporary arrays
- Scope fallback clone maps when no lineage index is supplied
- Skip stale queued Layers tree rebuilds after synchronous refreshes
2026-07-28 00:12:53 +03:00
Danila Poyarkov a6940bcab8 feat(app): convert image layers to vectors
- Add secure Recraft and fal.ai clients with centralized credentials and Media settings

- Replace image rectangles with editable vector frames in one undoable operation

- Bound desktop proxy responses, timeouts, and redirects for provider downloads

- Cover provider parsing, placement, settings, context-menu visibility, and undo

Co-authored-by: Rob Coenen <753704+rcoenen@users.noreply.github.com>
2026-07-27 16:22:05 +03:00
Danila Poyarkov 49b2d49e40 fix(storage): preserve durable sync work
- Resume persisted outbox jobs at startup without dropping writes when credentials are unavailable

- Serialize IndexedDB revisions and guard sync completion against concurrent saves

- Reconcile tombstones without reviving deleted documents and bound S3 metadata requests

- Require explicit CORS configuration instead of overwriting bucket rules during connection tests

- Keep ACP agents exclusive to the Design role and normalize invalid model limits
2026-07-26 23:43:38 +03:00
Danila Poyarkov e56727c22c feat(ai): configure reusable model profiles
- Separate provider connections, model profiles, capabilities, and role assignments

- Replace role-specific forms with a reusable model library and assignment table

- Resolve credentials lazily per connection and preserve existing Design settings

- Route Design chat through the assigned profile while exposing Review, Fast, and Vision runtimes
2026-07-26 22:53:45 +03:00
Danila Poyarkov ca80b0e787 feat(app): add storage workspace
- List local and remote documents from an explicit storage workspace route

- Open remote .fig documents into deduplicated storage-bound editor tabs

- Create locally durable documents only after storage configuration is complete

- Cover unconfigured guidance and mocked S3 document opening end to end

Co-authored-by: Rob Coenen <753704+rcoenen@users.noreply.github.com>
2026-07-26 15:06:01 +03:00
Danila Poyarkov bac1b79a6b feat(app): add storage integration settings
- Add schema-driven S3 preferences and status-only credential controls to unified Settings

- Keep storage preferences persistent while secrets remain in the selected credential backend

- Include storage credentials when browser persistence changes and test session behavior

Co-authored-by: Rob Coenen <753704+rcoenen@users.noreply.github.com>
2026-07-26 14:39:24 +03:00
Danila Poyarkov 266f85a73c feat(app): unify integration settings
- Open one Settings dialog for AI providers, agents, and media credentials

- Resolve secrets only when requests start and keep settings on status-only credential APIs

- Make browser persistence explicit and default fresh web sessions to memory

- Move provider controls into the settings domain and cover setup, reload, and clearing
2026-07-26 14:07:48 +03:00
Danila Poyarkov 0071c32544 feat(vue): add responsive property grids
- Add a headless PropertyGrid primitive with themed app composition

- Keep composite paint details full-width and show remove actions consistently

- Tighten color picker and Design-panel field sizing without clipping values
2026-07-26 12:42:50 +03:00
Danila Poyarkov c9cadf6fdd fix(ui): expose auto-layout flow choices 2026-07-26 11:15:57 +03:00
Danila Poyarkov 80750e65fc fix(ui): align layout sections with Figma 2026-07-26 10:52:48 +03:00
Danila Poyarkov 57eb59769d
feat(components): match Figma asset browsing (#424)
* feat(components): match Figma asset browsing

- Add thumbnail grid and list views grouped by source page
- Support component drag insertion and main-component navigation
- Keep asset previews working across document pages
- Cover views, context actions, and drag-to-canvas behavior

* fix(components): remove redundant Assets heading

* fix(components): render crisp asset thumbnails

- Render preview images at twice their display dimensions
- Preserve the existing grid and list thumbnail sizes

* fix(render): exclude ancestors from selection exports

- Reparent selected export roots directly under the extracted page
- Preserve absolute positions without drawing ancestor backgrounds
- Cover transparent selection export around nested components

* fix(components): address Assets panel review

- Handle thumbnail export failures without stale previews
- Share page lookup and thumbnail sizing across asset views
- Make list actions keyboard accessible and honor requested export pages
2026-07-26 01:18:27 +03:00
Luca Candela 18899ff13c
feat(editor): add Figma-style frame presets (#418)
Add frame preset creation and resizing with constraint-aware layout, undo/redo, toolbar flyouts, localization, documentation, and regression coverage.
2026-07-26 00:05:57 +03:00
Danila Poyarkov a9c44afc20 refactor(properties): static section titles and headerless font-feature toggles
- Section titles are no longer collapsible triggers — they render as static
  text like Figma, so clicking a section header no longer collapses it
- Drop the 'Font features' group title; ligature/kerning toggles sit
  directly in the Typography flow
- Update panel specs and snapshots for always-expanded sections
2026-07-20 22:11:45 +03:00
Danila Poyarkov f3fbc94abf feat(text): create text boxes by dragging 2026-07-20 21:22:30 +03:00
Danila Poyarkov 6a0009b25c refactor(typography): prioritize formatting and de-jargon font features 2026-07-20 21:22:30 +03:00
Danila Poyarkov d06a8a7049 fix(i18n): translate layout grid controls 2026-07-20 16:07:05 +03:00
Danila Poyarkov efa784a039 feat(layout): layout-grid editor section
Add a Layout grid section for frames/components with pattern (columns/rows/
grid), count, gutter/section size, and margin, plus visibility and remove
actions. The canvas already rendered layout grids from imported files; this
wires creation and editing through the standard panel list pattern with
undo support and icon+tooltip pattern options.
2026-07-20 15:09:28 +03:00