Commit Graph
386 Commits
Author SHA1 Message Date
bflatastic 1c5f6f60d0 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/ui-parity.md
2026-11-27 14:40:03 +07:00
BFlat 6f8e98054b Merge pull request #2626 from daplo/fix/macos-screenshot-paste
fix(macos): paste the image file copied in Finder
2026-11-27 14:10:19 +07:00
bflatastic 3590abc9ff Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/ui-parity.md
2026-11-27 14:06:34 +07:00
FredApps 3b9bf7ffb5 figcraft-cli: test perf, plugin publish --key and mcp --attach failures in-process 2026-11-26 23:05:03 +01:00
FredApps 8d50b20c64 figcraft-cli: follow RFC-0018 (run(args,out,err), typed errors, env flags, --in-place, man pages and completions) 2026-11-26 22:34:19 +01:00
skylar taylor-barrick f8927bb266 Nightly: stop blocking a refused launch on macOS (#2638)
Nightly launch fix under Skylar's Exec 454: the Launcher's trailing `--` no longer reaches the file list where that applied, and a refused launch no longer blocks on macOS (the reason goes to stderr and the app exits 2).
2026-11-26 00:46:40 -06:00
aiongg 28508386a7 Repin craft-libs to storytold next 8fa4db64a9 and egui to b9770908e 2026-11-25 19:15:34 +00:00
aiongg d85ac773a2 Repin craft-libs to storytold next aa401985d 2026-11-25 15:50:38 +00:00
daplo c93f5e36ad fix(macos): paste the image file copied in Finder 2026-11-25 15:39:23 +01:00
aiongg e1b9366831 Repin craft-libs to storytold next d1bdf8e5da 2026-11-25 13:53:48 +00:00
aiongg 4df035f596 Merge main into the minimal port
Conflicts: crates/ui-egui/src/dialogs/updates_ui.rs (main's optional updater for the Nightly, applied to the port's DialogHost update flow: tick and show skip when there is no updater).
2026-11-25 06:35:58 +00:00
aiongg 45856da3b9 Repin craft-libs to storytold next 16001e7210 and egui to storytold b15ffe9bfc 2026-11-25 06:31:16 +00:00
Dylan M. Taylor ef2a9eeefc packaging(linux): support co-installable nightly packages (#2603)
Linux nightly packaging by @dylanmtaylor, with the per-app Nightly flavor commits stacked on his branch.

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-24 18:55:17 -06:00
Denis Gomes 09553289ba Desktop: load the preferences before opening the files named on the command line
The files named on the command line opened before the preferences were
read, so file.open saw no kept views: such a file opened fitted instead
of where it was left. It also put the file at the top of the recent
files, and the preferences read just after replaced that list.
2026-11-24 18:59:18 -05:00
aiongg 77a4c9480a Repin craft-libs; IME click test reads the runtime's reset request; whole-point number label wrap 2026-11-24 21:05:39 +00:00
aiongg e393abe47f Pin craft-libs next-host-input ea3b99e892 2026-11-24 18:43:24 +00:00
aiongg 3ddb9d46ec Tests: the runtime in the test windows that draw FigCraft's UI
Each such window installs the runtime headless and hands it FigCraft's
frame input before each frame, as the shells do; the main window's
close tests run its close path.
2026-11-24 18:40:53 +00:00
aiongg 51473c7e17 Host FigCraft's egui UI on craft-libs next's runtime
The runtime is installed in the desktop and web app creators, with its
frame input (theme mode, interface scale, direction, FigCraft's F6) in
raw_input_hook, the main window's close decision in its close path, and
before_ui first in the desktop ui. The window's Escape returns to egui
first in each window's frame, and the canvas is the window's document
canvas, so FigCraft's keys reach its own handlers as before.

The update dialogs run on a DialogHost, fonts load through
craft_ui::fonts::load, the interface scale is the runtime's, and the
searchable header menus are app-local. egui's ComboBox is the combo box
on next.
2026-11-24 18:40:53 +00:00
aiongg efeb1b9a54 minimal-port repin: 39 edits (revs 38, features 1) 2026-11-24 18:25:44 +00:00
Denis Gomes 6247922621 M5: a file opens again where it was left
A file always opened on the page saved in it, fitted to its content, so
coming back to a file meant finding the place again. Figma opens a file
where you were.

Closing a file's tab or quitting now keeps the page it showed and each
page's view (centre and zoom) in the preferences, by path, for the last
100 files left. Opening the file shows that page at its view, and the
canvas keeps the view instead of fitting the page when it first gets its
size (DocState::fit_when_sized). A page the file no longer has, a divider
or a view the canvas can't show is left out.

Keeping the view in the file was rejected: it would come back only after a
save, and looking around would make the file unsaved. The preferences are
per machine, so another computer opens the file fitted.
2026-11-24 03:01:16 -05:00
Denis Gomes f9964e14ae Desktop: reopen the files open at quit instead of starting in a new file
The desktop app started in a new, empty file on every launch, and with a
control port open (FIGCRAFT_CONTROL_PORT set for an attached agent) even
the Start on the Home screen preference was overridden, so the files you
worked in had to be found and opened again each time.

Quitting now keeps the paths of the open tabs' files, in tab order, and the
one in front (Prefs::open_files, Prefs::front_file); the next start opens
them again and brings that one forward, as Figma's desktop app reopens its
tabs. Files without a path (new, imported, joined live) and branch tabs are
left out. A file named on the command line stays in front, a recovered
copy keeps its one tab (file.open switches to an open path), a file gone
since is skipped, and one that won't open is reported like a file named on
the command line.

With nothing to reopen the window starts on the Home screen; only with a
control port open does it still start in a new file (#874: control callers
expect a document). Start on the Home screen now means Home instead of the
reopened files.

The list is written at quit only, with the other preferences. Keeping it on
every tab change would cover a crash too, but a crash already brings back
the unsaved files through recovery copies, and the list from the last quit
is a fair fallback for the rest.
2026-11-24 03:00:57 -05:00
FredApps 5c50561fcd Dependencies: align craft-libs at merged SVG writer ea9407b3 (#2514) 2026-11-20 06:39:35 +07:00
.CooCoo 260fd4d8ef Dependencies: take craft-libs main at 453b0da782 (#2412)
* Dependencies: take craft-libs main at 3af2280ee3

Every craft-libs crate in the workspace now comes from one commit,
3af2280ee3434a2c860012df2f440652621c2c81. They were on five revisions:
e11f9d9a, d13ac58a, 976eb51c, e9829954 (craft-update) and fd5e2fef
(craft-web-api and craft-web-host). Cargo.lock now holds one craft-zip
instead of two.

No FigCraft code changes. The new craft-font-store adds cap-primitives
and its dependencies to Cargo.lock.

* Dependencies: drop pin comments the craft-libs move made untrue

craft-update now uses the same craft-libs rev as the other crates, and
craft-window comes from craft-libs main. Remove the comment that says
craft-update is pinned separately and the comment that says craft-window
is pinned to an unmerged branch.

* Tests: look up craft-fig with cargo metadata filtered to the host

The i18n key test finds the craft-fig sources with `cargo metadata
--offline`. Since craft-font-store depends on cap-primitives, the graph
holds winx, which only Windows uses. Without a platform filter, cargo
metadata needs every platform's sources and failed on Linux CI with
"failed to download `winx v0.36.4`". The query now passes
`--filter-platform` with the host triple from `rustc -vV`.

* Dependencies: take craft-libs main at 453b0da782

Every craft-libs crate in the workspace moves from 3af2280ee3 to
craft-libs main at 453b0da782, and craft-sketch moves from ff142b3ad5
to the same commit. Cargo.lock now holds one craft-figma-rest and one
craft-zip instead of two of each; no other package changes.

* Dependencies: drop the design-file pin comment that no longer holds

craft-penpot, listed above the design-file crates, uses the same
craft-zip as craft-fig and craft-figcraft-format, and every craft-libs
crate is now on one rev, so the comment's reason for a separate rev is
removed.
2026-11-18 15:22:39 -05:00
FredApps 23e5877e6b Wait for style layers to clear, and cover a full asset-peak cap
inserts_and_detaches_count_per_style_and_variable_in_the_period returned
as soon as detachments reached 2, then asserted layers == 0. Asset-action
reports can arrive before the usage snapshot, so CI saw layers still at 1.
The wait now requires both.

Sonar on the same-repo vehicle (#2451) evaluated the coverage gate at
79.74% of 232 new lines (one line under 80%). A unit test covers grow's
branch that drops a new key once peaks are already at MAX_REPORTED.

Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-18 19:38:54 +07:00
FredApps 9e45db6885 Keep asset-action peaks when usage rows evict, and report every count
CodeRabbit's majors on #1735: evicting a file from the capped usage list
dropped asset_peaks, so a later identical report was counted twice.
Retention now includes asset_updated, and the file just heard from is
kept even when timestamps tie. The document keeps up to 1000 asset
counts, but each wire message is still capped at 250, so reports are
sent in batches an older server will accept.

Tests: evicting_capped_usage_rows_keeps_asset_peaks_so_a_repeat_report_is_not_counted_twice
and asset_action_reports_cover_every_count_past_the_message_cap.

Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-18 19:38:54 +07:00
bflatastic b63368e39c M3: a style or variable applied or detached inside an instance counts nothing
counting_links compared library_links, which walked every node, so applying or
detaching a library style or variable on an instance or a layer in it counted,
while duplicating that instance counts only its component. library_links now
walks the pages and skips instances with what they hold, as count_inserted does.
Test: library_asset_counts_tests::applying_and_detaching_inside_an_instance_counts_nothing
(an instance, its layer, a nested instance and its layer). The server test waits
for the detachments too, not only the insertions.
2026-11-18 19:38:54 +07:00
bflatastic e4bc567855 M3: library analytics count insertions and detachments of styles and variables
Applying a style or variable, or copying or duplicating content that uses it,
inserts it; the Detach button detaches it; an instance counts as its component
alone. Show usage and library.usage give them over the chosen period.
2026-11-18 19:38:54 +07:00
BFlat bf29f7731e Merge pull request #2391 from MMexicann/patch-3
fix: escape Windows device names in generated exports
2026-11-17 18:25:15 +07:00
BFlat 16cc237a7a Merge pull request #2390 from MMexicann/patch-2
cli: reject malformed attach address components
2026-11-17 18:23:06 +07:00
Mex b7b4773639 M0.9: cover printable post-parse CLI diagnostics
Cover control-bearing missing-file failures and invalid connect-publish extensions through the binary, retaining exit codes 1 and 2 and no stdout.
2026-11-15 19:53:28 +01:00
Mex 6b272dc857 M0.9: reuse printable diagnostic text at the CLI boundary
Expose the existing plain helper within the crate so final CLI errors use exactly the same escaping rule as file and script diagnostics.
2026-11-15 19:52:54 +01:00
Mex fff48fc441 M0.9: escape terminal controls in CLI operation errors
Apply the existing printable-text rule at the final Usage and Failed error output boundary, preserving exit codes and the help footer.
2026-11-15 19:52:03 +01:00
Mex 14bdeff591 fix: check device names after filename length limits
Cap generated CLI names before device-name escaping, then cap again so the prefix fits both limits. Cover character and byte truncation boundaries.
2026-11-15 16:30:31 +01:00
Mex 8244acce2d cli: escape device names in generated export filenames
Use the shared device-name escaping rule for generated CLI export basenames, before existing length caps.
2026-11-15 15:58:13 +01:00
Mex ea8c630821 cli: reject malformed attach address components
Validate a nonempty host and a u16 port before attempting attachment. Preserve valid address spelling and bare-port behavior.
2026-11-15 15:34:15 +01:00
Dylan M. Taylor d5cdba8d3b Isolate concurrent font integration tests 2026-11-13 15:57:06 +00:00
NetterSilverandClaude Opus 5.5 7b34dbab00 Keep library links working when the project folder is moved or cloned (#2132)
Fixes #2122

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 01:48:30 +01:00
.CooCoo 40360c4a2a Fix main: clippy on Rust 1.100 stops at shortcuts.rs and the CLI script tests (#2316)
Rust 1.100 marks `ExitCode` as must-use and extends `needless_bool`,
so `cargo clippy --workspace --all-targets -- -D warnings` fails on main:

- `crates/ui-egui/src/shortcuts.rs`: the end of `key_event` returns the
  condition directly instead of `if ... { return true; } false`.
- `apps/figcraft-cli/src/files.rs`: three script tests now assert the exit
  code that `run_script` returns (`SUCCESS` for the two scripts that run,
  1 for the script whose step fails) instead of dropping it.
2026-11-13 01:38:53 +01:00
BFlat fd2fed1f58 Merge pull request #2071 from helenkwok/web/page-api-timeouts
figcraft-web: inspect and openFile time out like the other window.figcraft functions
2026-11-12 10:12:24 +07:00
BFlat cc03f7216d Merge pull request #2236 from TrevorBrown-dev/fix/windows-frame-offset-1343
M10: Windows: the window no longer draws below a hidden caption (#1343)
2026-11-12 10:03:50 +07:00
Oleksii SukholitaandOleksii Sukholita 74698fa89f M7: links open in the browser in the desktop app, What's new on the update prompt among them (#2216)
The desktop app built eframe without its `links` feature, so egui-winit dropped every
`ctx.open_url` with only a log warning: the update prompt's What's new link and Download
button, the About and Credits links, Terms in Live and the link in the Dev Mode panel did
nothing on click. The feature adds no crate: `webbrowser` is already a dependency of the app.
DeckCraft's desktop app builds eframe with it too.

`links_in_the_interface_open_in_the_browser` fails without the feature.

Co-authored-by: Oleksii Sukholita <oleksii.sukholita@gmail.com>
2026-11-11 20:23:45 +01:00
Trevor BrownandClaude Sonnet 5.5 97ceeca35e M10: Windows: the window no longer draws below a hidden caption (#1343)
FigCraft draws its own title bar on Windows and opens undecorated windows, but winit 0.30 still gives them WS_CAPTION | WS_BORDER. On some systems the desktop compositor reserves that caption, so the content is drawn about 30 px low (a black band above it) while clicks keep the client coordinates and land above what is drawn. Fixes #1343; the same report as #1422 and #2233.

A per-frame step (apps/figcraft/src/window_frame.rs, run from raw_input_hook) clears WS_CAPTION and WS_BORDER from every winit window of the process (the main window and the other windows alike), keeps WS_THICKFRAME and the window buttons so edge resizing and snap work, and calls SetWindowPos(SWP_FRAMECHANGED) only when a style changed. It uses safe winsafe calls (no unsafe), Windows only; other platforms and the browser are unchanged. The maximize-to-work-area trim of DesignCraft's fix is left for a later change.

Ports the fix of DesignCraft #2139 and PhotoCraft #2401. Tests: the style arithmetic (caption and border cleared, thick frame and buttons kept, a clean style unchanged) and the per-frame hook (runs every frame, a no-op when unset).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
2026-11-10 20:55:23 -05:00
skylar taylor-barrick 3839fe4a0c Naming: use Developer Mode instead of Figma's Dev Mode (#2135)
Figma holds a US registration for DEV MODE (US 7574348). Display text only: the view.devMode label, Inspect tab, shortcut row, refusal messages, CLI help, docs and all locale catalogs now say Developer Mode. Command ids, preference keys and saved fields are unchanged; "Dev Mode" stays a search alias in the Actions palette. Adds a naming guard test.
2026-11-09 06:24:44 +01:00
dotCooCoo 892cda8e34 Updates: the updater reports installing, ready, installed and failed, and installs at exit
craft-update moves to a craft-libs branch that merges storytold/craft-libs#687 and #696.

- The check result window shows for every status but idle and stays
  closed while the startup prompt is open, so the first start after an
  update reports that it installed or why it failed. Restart to Update
  calls Updater::restart_to_update.
- on_exit calls Updater::start_pending_update before the process ends,
  which starts the install of an update waiting for the app to close.
2026-11-08 13:32:01 -08:00
Helen Kwok d252d35f27 figcraft-web: inspect and openFile go through craft-web-api, so they time out and cancel like the other functions
inspect is docInspect under its earlier name, and openFile calls the crate's execute with file.open, so a call the app does not answer within 30 seconds rejects and a request the app has not started is cancelled.
2026-11-07 15:30:01 +08:00
BFlat 05e1bcebf8 Merge pull request #2061 from storytold/carry/1952
fix(cli,ui): escape control characters in document and plugin text sent to the terminal
2026-11-07 13:13:29 +08:00
BFlat 5cbc8207fd Merge pull request #2065 from helenkwok/web/page-api
figcraft-web: window.figcraft takes its request functions from craft-web-api
2026-11-07 13:03:10 +08:00
bflatastic 7bfeb5674d CLI: test what info and a failed script print 2026-11-07 11:39:17 +07:00
bflatastic bfae850ab1 Merge remote-tracking branch 'origin/main' into carry/1952 2026-11-07 11:37:12 +07:00
bflatastic a864c9beac Merge main into #1997 2026-11-07 10:50:56 +07:00