AI-native design editor. Open-source Figma alternative.
Desktop (Tauri v2)
Check desktop/Cargo.toml, desktop/capabilities/**, and desktop/tauri.conf.json before adding desktop capabilities. Release versions are also set in desktop/tauri.conf.json and desktop/Cargo.toml (tools/AGENTS.md, Releases).
- File system and shell permissions must be configured explicitly; a vague "Internal error" save failure usually means a missing permission.
- Dev tools: add or use a menu item to toggle them; do not rely on keyboard shortcuts.
desktop/src/credentials.rsstores secrets in the native system credential store; failures must surface, never fall back to browser or plaintext storage (src/AGENTS.md, Settings).- ACP and harness process changes require checking
desktop/capabilities/**. - The fs scope allows documents anywhere but denies, in the global
fs:scope, every place where a written file would run, andrequireLiteralLeadingDotkeeps hidden files out of**on every platform; a new write path must not reopen either (tests/e2e/native/fs-scope.spec.ts). The app's own cache in$APPLOCALDATAis allowed by name, as on Linux it lives under~/.local/share, which**does not reach. - A
shell:allow-spawnentry pins the whole command line: no"args": true, and a Windows.cmdshim runs through its owncmd-<name>entry with fixed/c <name> …arguments, whichresolvePlatformCommandselects (tests/engine/tauri/command.test.ts). - The Software Update window is a second webview labelled
updaterthat loadsupdater.html(src/updater.ts), never the editor'sindex.html; its own capability,desktop/capabilities/updater.json, grants only checking, installing, restarting, closing, and opening links. It owns no documents, so before a restart or a Windows install it asks the editor window overupdater:restart-requestto run the Quit approval (src/app/shell/updater/approvals.ts,tests/app/shell/updater/session.test.ts). - Never click Install in a
tauri devbuild: the updater unpacks the release next to the running binary, which there isdesktop/target/debug. desktop/generated/menu.jsonis produced bybun run generate:tauri-menufromsrc/app/shell/menu/schema.ts; do not edit or import it directly.- On Linux a menu item registers its accelerator natively only when it holds Ctrl, Alt, or Super and is not copy, cut, or paste: GTK runs window accelerators before the WebView sees the key, so plain and Shift-only keys stay with the frontend's shortcuts, which skip text fields (
menu::testsindesktop/src/menu/mod.rs). - A menu or menu entry with a
featurein the schema is built only while the frontend names that feature throughset_native_menu_features(src/app/shell/menu/features.ts);documenthides what needs an open document on Home and a New file tab. Every rebuild keeps the check states the menu had (desktop/src/menu/mod.rs). - Command items are greyed out while their editor command is unavailable: the frontend sends their ids through
set_native_menu_disabled, which updates the items in place instead of rebuilding (src/app/shell/menu/editor.ts). - Run
bun run generate:icons --target desktopbefore direct Cargo checks; native icons are generated, not committed. build_fig_fileperforms full.figexport on desktop at the level it is given, on a blocking thread, since high levels take seconds; saves that patch an opened archive compress in the web worker (packages/fig/AGENTS.md).- The embedded WebDriver plugin compiles only with the
native-testCargo feature and must never be enabled in development or production binaries. Native tests usebun run test:native(tests/AGENTS.md). - The editor opens external links through the
open_external_urlcommand, which allows onlyhttp,https, andmailto; native-test builds record them fortake_native_test_opened_urlsinstead of launching a browser. The main window is built insetupsowindow.opengoes the same way (open_new_window_externally); the shell plugin's own link handler is kept out bysrc/app/shell/external-links.ts(system::openerunit tests,tests/e2e/native/cloud-links.spec.ts). openpencil://links are parsed indesktop/src/launch/links.rsand queued indesktop/src/launch/mod.rs:openqueues files throughtake_pending_open,joinqueues validated room IDs throughtake_pending_rooms,cloudqueues Cloud invitations and shared links (UUID, hex secret,http(s)server) throughtake_pending_cloud_links; second launches forward their link arguments through the single-instance handler (launch::linksunit tests).- On Linux,
run()sets__NV_DISABLE_EXPLICIT_SYNC=1before the Tauri builder only on Wayland, with the NVIDIA driver loaded, under a WebKitGTK older than 2.54.2, and when the variable is unset: those versions commit a frame without an acquire point and the compositor disconnects the app (WebKit bug 324551). Do not add DMABUF or shared-memory overrides; they cost every NVIDIA user rendering speed for a crash this one avoids (explicit_syncunit tests). - SF Symbols are drawn by SwiftUI through the Swift package
desktop/swift/sf-symbols, linked bybuild.rson macOS; they are never bundled, served, or read from Apple's font files.sf_symbols_renderstays a synchronous command so Tauri runs it on the main thread SwiftUI needs, and both commands answer null below macOS 14, which lacks the path operations that cut badge knockouts (packages/core/tests/icons/sf-symbols/provider.test.ts). - A panic hook installed in
setupwrites the last Rust panic tolast-panic.jsonin the app data folder, andtake_last_panichands it to the next launch once, which offers it as a report in official builds; the hook calls the default hook first and never panics itself (desktop/src/system/crash.rs,src/app/reports/crash.ts).