Commit Graph
5568 Commits
Author SHA1 Message Date
Timo Klerx 41ee2d7e92 Merge branch 'main' of https://github.com/storytold/figcraft into codex/fig-import-confirmation
# Conflicts:
#	crates/engine/src/cmd/file/load.rs
#	docs/file-format-parity.md
2026-11-29 13:33:22 +01:00
BFlat 738a2d77e2 Merge pull request #2737 from LS254/perf/shadow-gradient
M8, #2736: a soft shadow under an opaque gradient is cast from the outline, as under an opaque colour
2026-11-29 19:30:51 +07:00
BFlat 12f8129228 Merge pull request #2533 from sarsonj/fig-import-fidelity
M3, M6: an imported iOS kit draws as in its source (blend modes, variant bindings, text, export framing, images)
2026-11-29 19:21:13 +07:00
Livio Sidler a6920f0c5d M8, #2736: the gradient card's test looks for the shadow under the card, not on it
From the review of #2737: the card is black, so the darkest pixel of the view said nothing
about a shadow.
2026-11-29 12:42:23 +01:00
Timo Klerx 3b0e091f98 Merge branch 'main' into codex/fig-import-confirmation 2026-11-29 12:36:58 +01:00
BFlat ced8949d21 Merge pull request #2729 from TKlerx/codex/fix-nightly-actions-lockfile
ci: sync the nightly macOS Actions lockfile
2026-11-29 18:36:25 +07:00
bflatastic 1cffe6e254 render: a gradient whose handles collapse onto one line casts from its pixels
Such a gradient prepares no shader and paints nothing, so its layer is not
its outline: an outline-cast shadow would show under an invisible fill.
2026-11-29 18:30:29 +07:00
Livio Sidler ff3bcfd2a6 M8, #2736: a soft shadow under an opaque gradient is cast from the outline, as under an opaque colour 2026-11-29 12:23:05 +01:00
BFlat ae35ddb4aa Merge pull request #2730 from makesomethingshit/fix/2246-variables-header-gap
Local variables: halve the Import and Export gap (#2246)
2026-11-29 18:05:09 +07:00
makesomethingshit dba6a3f5b8 Local variables: halve the Import and Export gap (#2246) 2026-11-29 19:57:06 +09:00
Timo Klerx b739dabba0 ci: sync nightly macOS Actions lockfile with main ref 2026-11-29 11:44:55 +01:00
Timo Klerx 51de552b40 fix(import): expose the initial retry dialog focus 2026-11-29 11:30:15 +01:00
Jindřich ŠaršonandClaude Opus 5.5 0a6d3220bb M3: fill_with without the mask no caller passes, and without lint allows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012eBDgsvRwsSRpWeWrzabVY
2026-11-29 10:45:42 +01:00
Jindřich ŠaršonandClaude Opus 5.5 071fe03776 Merge main: image averaging after #2673
#2673 draws an image shown at half its size or less from a filtered,
halved copy. The per-pixel area average from this branch now applies to
that copy below half size and to the image itself above it; the export
test of the average across fractional positions moves to 0.625 of the
image's size, where no copy is made (it still fails without the
average). Test fixtures build text through Shared<TextData> (#1819).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012eBDgsvRwsSRpWeWrzabVY
2026-11-29 10:44:55 +01:00
BFlat 33d4cb3cda Merge pull request #2615 from denisg0mes/selection-colors-style-picker
M7: a Selection colors row's Styles button opens the style picker
2026-11-29 15:50:05 +07:00
Denis Gomes e93985aa01 Style picker: an empty picker without + doesn't tell you to click +
A Selection colors row whose list holds other paints can't take a new
style, so the picker hides +. With no styles in the file it still said
"No styles yet. Click + to create one from the selection." It now says
"No styles yet.", a string the catalog already has.

Test: selection_colors_picker_tests::a_row_whose_list_holds_other_paints_offers_no_create
2026-11-29 02:35:39 -05:00
BFlat cda65b61e2 Merge pull request #2726 from mikaelweiss/feat/file-header-branch-menu
File header: branch and version control menu, and branch tab icon
2026-11-29 13:15:54 +07:00
Dylan M. Taylor 1a7c79e736 fix(nightly): enable Linux package_formats (including Flatpak) in signing policy (#2728) v0.18.1-nightly.20261129.46221598680.1.g1a7c79e73651 2026-11-28 22:41:44 -05:00
Mikael Weiss 37ad188df9 test: set detached branch active tab once 2026-11-28 20:30:28 -07:00
Mikael Weiss 163d94a4e3 fix: label branch header and focus owning window 2026-11-28 20:19:14 -07:00
Dylan M. Taylor 3a8a08ca74 fix(packaging): strip staged figcraft-nightly from Arch handoff and re-enable arch (#2727) 2026-11-28 22:01:28 -05:00
Mikael Weiss c58d227bab feat: add file header branch and version menu 2026-11-28 19:51:42 -07:00
Dylan M. Taylor 88c702e296 ci(nightly): omit arch format while fixing Arch package path conflict (#2725) v0.18.1-nightly.20261129.46217225370.1.g88c702e296fe 2026-11-28 21:44:52 -05:00
BFlat 01f2f347f7 Merge pull request #2719 from mikaelweiss/fix/server-kept-no-save
M9: a file joined on a server that keeps it asks for no save
2026-11-29 08:03:05 +07:00
BFlat 9926d1187a Merge pull request #2717 from brytoncooper/test/collab-dst-fault-injection
M9: add fault-injecting collab and server crash/compaction DST suites
2026-11-29 08:02:57 +07:00
BFlat 01a6c0e08d Merge pull request #2716 from brytoncooper/feat/fig-fidelity-harness-and-tail
M6: .fig import tail (table cells, connector label pill) and fidelity/visual-diff harness
2026-11-29 08:02:48 +07:00
BFlat 3cd13b93d5 Merge pull request #2715 from brytoncooper/fix/lan-tls-1131
M9: encrypt LAN-hosted sessions with ephemeral pinned TLS (#1131)
2026-11-29 08:02:40 +07:00
BFlat 50211b153c Merge pull request #2714 from Aathish-D/fix/export-preview-per-setting
M8: preview each export setting with its own options
2026-11-29 08:02:31 +07:00
BFlat c32f9cbd46 Merge pull request #2724 from storytold/web-size/web-gates
Web size: leave camera raw development and the plugin runtime out of the browser version (#2720)
2026-11-29 08:02:23 +07:00
BFlat c3b65c3552 Merge pull request #2723 from storytold/web-size/i18n-packed
Web size: compress the UI string catalogs and unpack a language on first use (#2720)
2026-11-29 08:02:15 +07:00
FredApps 1300470756 Web size: unpack the catalogs through one checked Brotli helper that refuses bytes after the stream (#2720)
Answers the review point on the unpack length check: the whole input must be consumed.
2026-11-29 00:01:46 +01:00
FredApps 9016174dbd Web size: address review: native-only gate tests, and no plugin recents in the browser version (#2720) 2026-11-28 23:42:43 +01:00
FredApps 8fe016b2aa Web size: pack the string catalogs with Brotli instead of zlib (#2720)
Brotli's best setting packs the 27 catalogs about 0.2 MB smaller; the decoder
(brotli-decompressor 6) is the one craft-metadata already builds.
2026-11-28 23:28:04 +01:00
FredApps f69cba48f1 Web size: leave camera raw development and the plugin runtime out of the browser version (#2720)
The browser version still recognises camera raw files and says they open in the desktop app
only; its pickers don't offer them. The Plugins menu, the plugin palette rows and the plugin
commands are hidden there, and running a plugin says it needs the desktop app. Native builds
are unchanged.
2026-11-28 22:57:54 +01:00
FredApps e8507bfc8c Web size: bake the UI string catalogs compressed and unpack a language when it is first read (#2720) 2026-11-28 22:31:06 +01:00
Dylan M. Taylor 6aa490aaa5 ci: pin storytold/craft-common-actions to @main universally (#2722) 2026-11-28 16:06:10 -05:00
Bryton Cooper 3208b59673 fix(collab-net): restore original write timeout after TLS accept and test post-handshake trickle 2026-11-28 13:58:18 -07:00
Dylan M. Taylor f51783cb3a ci(nightly): enable all signed Linux package formats (deb, rpm, appimage, flatpak, oci, arch) (#2721) 2026-11-28 15:42:30 -05:00
Mikael Weiss 5370cfc602 test: isolate unsynced edit guard in live_kept
Mutate the document directly via ds_mut() instead of execute() so live_edit() does not run, assert pending() == 0, and verify saved_doc stays unchanged across live_poll().
2026-11-28 13:17:21 -07:00
Denis Gomes 4e31dda79c Merge main: the row's style picker keeps library styles and Create style
Main's Selection colors Styles menu (style_items, create_form) is the
menu this branch replaces with the style picker, so the merge keeps the
picker and drops the menu, with main's focus change inside create_form.
What the menu offered stays in the picker opened from a row: this file's
paint styles and each enabled library's published ones under its name,
Create style for the row's paint (selection.createColorStyle, left out
where create_refusal refuses), colour variables, and Detach.

The picker test now also checks that a library's unpublished style is not
offered, as the menu's test did. "No color styles" goes from he.toml too,
which main added with the key.
2026-11-28 15:03:47 -05:00
Aathish ccf871d064 Keep thumbnail() scoped to slice settings and remove redundant clamp 2026-11-29 01:32:29 +05:30
Bryton Cooper 5092de9b33 test(server): ensure pending_edits leaves unflushed WAL bytes past compaction 2026-11-28 12:50:30 -07:00
Bryton Cooper f260f8b9ac fix(format): count only page-reachable layers in fidelity and preserve narrow terminal table tracks 2026-11-28 12:50:28 -07:00
Bryton Cooper 8d4b91e3dd fix(collab-net): enforce caller deadline across every TLS accept/read socket step 2026-11-28 12:50:26 -07:00
Dylan M. Taylor 072194e23c ci(nightly): update required gate job name to artcraft-k8s-main (#2718) 2026-11-28 14:40:27 -05:00
Aathish 21a4b7e9d2 M8: preview each export setting with its own Ignore overlapping layers option 2026-11-29 01:05:41 +05:30
Bryton CooperandClaude Opus 5.5 1157a843f8 fig: snap table cells to their grid, pill fallback connector labels, add a fidelity harness
Import tail (docs/gaps.md Gap 1), as FigCraft-side passes over the mapped
REST JSON in crates/format/src/fig/map.rs (the craft-fig mapper is pinned
and unchanged):

- A connector label without a saved snapshot gets a white, fully rounded
  stand-in pill centred under it, padded by the font size, within the layer
  budget (labels past it stay bare under the mapper's original note).
- TABLE cells are put back on the table's grid from their own geometry:
  offsets within 2 px share a track, a sizeless or misaligned cell takes its
  row and column, and no two cells overlap. Fills, strokes and text are kept.
  Rotated, non-finite, colliding or oversized tables keep their saved bounds
  with a warning. No row or column fields of the file are read.
- The new import notes are counted like the mapper's (`note (×n)`) and
  have English keys in crates/ui-egui/locales/en.toml.
- Vector-region style and variable links were already resolved with a
  fall-back to the region's own paint; no change.

Fidelity harness (Gap 3), no new dependencies:

- fig::fidelity: compare_documents (layer counts, box L-infinity error,
  text/fill/stroke/opacity match rates, warnings) and compare_rgba (SSD,
  RMSE, PSNR, luminance SSIM, channels past a tolerance), with JSON and
  Markdown scorecards.
- fidelity_tests: metric properties, a built-in corpus that round-trips
  through .fig with every layer matched and no new warnings, and an ignored
  FIGCRAFT_FIG_CORPUS runner for local real files.
- render: a multi-layer scene drawn before and after a .fig round trip is
  compared with compare_rgba (SSIM > 0.99; measured identical).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:53:20 -07:00
Bryton CooperandClaude Opus 5.5 33b4b54e48 test(collab,server): seeded fault-injection and crash/compaction DST suites
collab (dst_fault_tests, 32 seeds): asymmetric partitions where a legacy
and a current client are cut off while the rest push the server past its
log, mid-flight drops with offline edits queued, one-way link stalls, and
per-user undo/redo mixed with layer, style, variable, comment, component
instance, main component and page edits. Every seed must catch up from
the log, a compressed snapshot and a plain snapshot, and end converged
and valid with monotonic sequence numbers, no undo violations, and no
remembered-deleted id live in the document.

Sim gains additive hooks: set_version (reconnect as an older app), stall
(one-way, order-keeping delay) and per-kind catch-up counters.

figcraft-server (dst_crash_tests, 24 seeds): the real Store with small
compact_after, clients acked only after a clean flush (as the hub does),
crashes before a flush, mid-flush with the log cut inside the new
records, and after a flush before acks, plus everyone-leaves idle/park.
After each restart the file is exactly the server's state at some seq no
earlier than the last durable point or anything a client heard; torn
tails are reported and later appends survive; clients resume with their
ids, lose no queue and converge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:44:05 -07:00
Bryton CooperandClaude Opus 5.5 37ff872305 collab-net: serve pinned TLS for app sessions hosted on the network (#1131)
An app hosting a live session for other machines sent the session token
in the clear over plain ws://. Such a host now serves TLS with an
ephemeral self-signed Ed25519 certificate (DER written by hand with ring,
no new crates), and its invite links pin the certificate's SHA-256
(`cert=`, URL-safe base64): figcraft://join?server=wss://…&cert=… and
wss://…/?cert=…

- tls: the shared session is a rustls::Connection (client or server),
  keeping the split reader/writer locking; `accept` answers a server
  handshake by the hello deadline; `handshake_pinned` uses a verifier
  that compares the end-entity certificate's SHA-256 in constant time
  and still checks the TLS 1.2/1.3 handshake signature, refusing any
  other certificate before the Hello with a clear reason.
- invite: Endpoint::cert (None for Endpoint::plain), Endpoint::pinned;
  a malformed pin, one on ws://, or two that disagree is an error that
  never echoes the link. The pin stays out of the WebSocket request URL.
  An automation allowlist entry allows only its own pin.
- host/hub: HostConfig::tls, Host::cert_sha256, Host::endpoint; the hub
  carries the server config to each connection. Hosting::serve (the
  server) is unchanged.
- link: NetLink::host serves TLS for non-loopback binds without a join
  code. Join-code (short) shares stay plain ws://: a 20-symbol code has
  no room for the pin, and its joiners share the token with the link.
- web: the browser refuses a pinned link with a clear reason.

Tests: pinned join and edit sync both ways, a plain client against a
TLS host, a host presenting another certificate (refused, not admitted),
the request carrying neither token nor pin, link round trips and
malformed cert= values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:43:29 -07:00
BFlat 0bc56174a7 Merge pull request #2711 from Aathish-D/fix/2329-multi-selection-box
M8, #2329: page-aligned multi-selection box and single rotation centre
2026-11-29 01:25:01 +07:00