Commit Graph

2688 Commits

Author SHA1 Message Date
BFlat 6e49078e64 Merge pull request #2980 from jianzhichun/host-data-control
Web host mode: data-control on the canvas installs window.figcraft
2026-12-03 20:51:43 +07:00
BFlat 4c1d4414f3 Merge pull request #2969 from denisg0mes/align-grid-double-click
M4: a double-click on an alignment cell switches between an auto gap and that cell
2026-12-03 19:49:33 +07:00
BFlat df0ff96454 Merge pull request #2979 from storytold/fix/2967-paste-replace-clipboard-read
M4: Paste to replace reads the clipboard without holding up the window, and replaces nothing when it can't (#2967)
2026-12-03 19:05:00 +07:00
bflatastic 67f2df9dcf Merge main into #2969 2026-12-03 19:02:15 +07:00
BFlat 958a8b51c8 Merge pull request #2970 from denisg0mes/bound-paint-chip-opens-picker
M4: a click on a paint's bound variable opens a picker to change it
2026-12-03 18:55:33 +07:00
BFlat 4dbb357f5a Merge pull request #2976 from storytold/bug/399-2973-design-panel-on-a-mixed-fil
M1: + on a mixed fill or stroke selection replaces it with one shared paint (#2973)
2026-12-03 18:23:19 +07:00
bflatastic 1bc31376d4 docs: parity log for the Paste to replace clipboard read (#2967) 2026-12-03 18:12:58 +07:00
bflatastic 6e6a23961e M4: Paste to replace treats a clipboard it can't read as a failed read, on the desktop and in the browser (#2967) 2026-12-03 18:12:40 +07:00
bflatastic a9df5ad780 M4: Paste to replace reads the clipboard without holding up the window, in the browser too (#2967) 2026-12-03 18:12:40 +07:00
jianzhichun 1c5fb25244 Web host mode: data-control on the canvas installs window.figcraft
A page that runs the app in its own document cannot always add ?control to its URL. data-control means the same, like data-save=managed
means ?save=managed. query::control takes it as a second argument; nothing changes without the attribute or the query entry.

Refs #2977
2026-12-03 11:12:15 +00:00
bflatastic a7bc3030c8 Merge main into #2969 2026-12-03 18:10:37 +07:00
bflatastic dbd3eb817f Merge remote-tracking branch 'origin/main' into pr/2970-395
# Conflicts:
#	docs/ui-parity.md
2026-12-03 18:08:38 +07:00
BFlat 06b001bec9 M4: paste keeps a layer's place in another frame, Paste to replace takes SVG, pen clicks and line gradients (#2967) (#2975)
* M4: gradient handles on a straight line show where their stops paint (#2967)

* M4: a snapped pen click that wobbles pulls out no handle (#2967)

* M4: paste into another frame keeps the place the layers had in theirs (#2967)

* M4: Paste to replace takes SVG another app put on the clipboard (#2967)

* docs: parity log for #2967
2026-12-03 18:07:27 +07:00
BFlat ff74c0b5b8 Merge pull request #2972 from denisg0mes/warn-unreadable-library
M4: the style and variable pickers say when a library isn't connected
2026-12-03 17:44:24 +07:00
bflatastic 0efa8a6b70 M1: + on a mixed fill or stroke selection replaces it with one shared paint (#2973)
fill.add and stroke.add take `replace`: the new paint takes the place of
every paint on each layer, their bindings going with them, and every layer
gets the same default (the first layer's). The Design panel's + passes it
when the selection's paints are mixed and opens the picker on that paint,
so it edits the whole selection at once. One undo step restores the old
paints.
2026-12-03 17:22:52 +07:00
bflatastic 1ea7ef55e2 Binding a paint colour through another key replaces its binding
`fill` and `fills/0/color` name the same paint colour, but variable.bind
added the new key beside the old one, so after the style picker changed a
variable bound through the indexed key, a detach brought the old one back.

Test: paint_reorder_tests::binding_a_paint_through_another_key_replaces_its_binding.
2026-12-03 17:20:32 +07:00
Denis Gomes a25dcda304 M4: the style and variable pickers say when a library isn't connected
A library enabled in a file that couldn't be read (its file no longer
publishing a library, gone, or holding another library now) was left out
of the style and variable pickers without a word. Its styles and variables
weren't listed and the one a layer used wasn't marked, so it looked as if
the file had lost them; only the Assets panel's library list said why.

Both pickers now open with a line per such library above the list:
"<library> isn't connected, so its styles and variables aren't listed:
<reason>", the reason being the one the Assets panel gives. It is drawn in
the error colour and is a label for screen readers, so the colour isn't
the only sign. A library not read yet says nothing, since it is on its way.

Tests: unconnected_library_tests (2).
2026-12-03 02:45:33 -05:00
Denis Gomes 3e3bfc72d1 M4: a click on a paint's bound variable opens a picker to change it
A fill or stroke whose colour is bound to a variable showed the variable's
name in a chip that only had a tooltip, so changing it to another meant
detaching it first or opening the section's Styles menu. The chip is now a
button (a combo box for screen readers). For the only paint of its list it
opens the style picker the section's Styles button opens, which lists
styles and colour variables; for one of several paints it opens the
variable picker for that paint, since the style picker acts on the whole
list; for the page background it opens the variable picker.

Neither picker marked the variable in use, so the one to change from was
not shown. Both now put a check on it (and mark it selected for screen
readers): the variable picker for the field it binds, the style picker for
the first paint of its slot or a Selection colors row's paints. A library
variable is matched by the copy this document made of it. Both also open
scrolled to it, and the style picker to the style in use: with styles
listed first, a variable in use sat far below the top the list opened at.
The scroll is instant (an animated one would still be moving when the
picker shows) and waits for the popup's shown pass, since its first pass
only measures it.

Tests: bound_paint_chip_tests (3), and the library variable in
selection_colors_picker_tests::the_rows_styles_button_opens_the_style_picker_with_search_and_library_names.
2026-12-03 02:35:50 -05:00
Denis Gomes 00811b55b7 M9: a file put on a server keeps its published library when its tab is saved
A file with a published library put on a server (Publish to server) lost
the library in its tab. The server's copy leaves a published library out
(Replica::new clears it), and the tab took that copy when the file arrived
back from the server, and again with every confirmed batch, undo and redo.
Saving the tab to its file then wrote the file without its library, so
every file using it lost its link ("has no published library") and its
styles and variables were no longer listed or marked in their pickers.

The copy a tab takes now keeps the published library the tab had
(with_own_library, at the welcome, at confirmed batches and at undo and
redo). The shared file still leaves it out: a library goes to a server
on its own (Publish library to server).

Test: live_library_tests::a_file_put_on_a_server_keeps_its_published_library_when_saved.
2026-12-03 02:26:26 -05:00
Denis Gomes 79ada01760 M4: a double-click on an alignment cell switches between an auto gap and that cell
A double-click on a cell of the auto layout alignment grid did what a click
does, so going from Space between to items packed at one point, or back,
meant opening the Auto gap menu. A double-click now switches: with an auto
gap (between, around or evenly) the items pack at the cell, main and cross;
packed items spread out with space between, at the cell's cross alignment.
A click still aligns at the cell, an auto gap keeping its mode, and grid
layouts are left as they were.

The double-click's second click is also a click, so the double-click is
handled first and the click only when it isn't one: two commands in one
frame would read the same layout and the second would undo the first.

Tests: align_grid_double_click_tests (3).
2026-12-03 01:29:16 -05:00
BFlat 3b75473a0f Merge pull request #2966 from storytold/feat/384-1563-feature-request-add-adobe-x
M4: a selected text has a font size handle on the Move tool (#1563)
2026-12-03 13:20:13 +07:00
BFlat 100f2414bb Merge pull request #2678 from brytoncooper/perf/format-compact-mirrors
perf(format): elide mirrored instance fields and deduplicate vectors in .figcraft (#1819)
2026-12-03 13:16:39 +07:00
BFlat 2e5302260d Merge pull request #2964 from davidmann4/feat/agents-shared-link
MCP: agents in the open window on the shared AgentLink and Agents page
2026-12-03 13:11:44 +07:00
bflatastic 220e61a7fe fix(format): keep every text and kind field on compact full layers
The compact decoder routed kind fields through a hand-written key list that
missed TextData::word_break, so a text layer's word break was dropped when a
file used mirrors or had a \u escape. Hand every unclaimed key to NodeKind's
own deserializer instead, and note the compact layout in the parity doc.
2026-12-03 12:04:36 +07:00
bflatastic 37fe1946b4 M4: the text size drag counts from the press and keeps whole pixels at a run's limit (#1563) 2026-12-03 11:54:00 +07:00
BFlat 5360fd0786 Merge pull request #2953 from FredApps/web-size/video-desktop-only
Web size: leave video fills out of the browser version (#2720)
2026-12-03 11:29:51 +07:00
bflatastic d5cf394743 M4: a selected text has a font size handle on the Move tool (#1563)
A round handle on the middle of a selected text's bottom edge scales the text about its top-left corner as the bottom edge follows the pointer: down makes it bigger, up smaller. It reuses the Scale tool's scaling, so the pixel line height and letter spacing keep their proportion, the font size lands on whole pixels from 1 to 5000, a press without a drag changes nothing, and a drag is one undo step with a Font size readout.
2026-12-03 11:07:59 +07:00
David Mann f22cac0de4 MCP: agents in the open window on the shared AgentLink and Agents page
The window now runs craft_automation's AgentLink and AgentSwitch for the
agents channel (token, challenge handshake, connection file, retry,
stop on switch-off) and forwards its requests into FigCraft's control
queue, each confined to the agent folders as before; FigCraft's own copy
of that code is gone. Preferences offer the shared Agents page (AI
agents..., with the suite's AI-MCP flag) over Prefs::agents, changed by
the new pref.agents command, which an agent's confined request can't
use. figcraft-cli mcp reads the saved settings (folders, When FigCraft
is closed), takes --when-closed, signs in to the window with the
challenge handshake, deprecates --attach and gets the agent_folders tool
(control method agent.folders). The --control server is stopped on exit.

Closes #2963.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 05:02:17 +01:00
FredApps 532c39865c Merge branch 'main' into web-size/video-desktop-only 2026-12-03 10:23:13 +07:00
bflatastic 48ba8b81ac M4: Chinese text draws in one design when its CJK family is missing (#1223)
A missing CJK family (Noto Sans SC) draws in an installed family of the
language its name ends with (SC, TC, HK, JP, KR), and a text's ideographs
take the one fallback face with the most of a span's, so a Japanese face
no longer draws some of a Chinese label's ideographs and a Chinese face
the rest.
2026-12-03 09:57:26 +07:00
BFlat b3a29e98fa Merge pull request #2924 from storytold/bug/281-1180-bug-report-figcraft-stylus
M1: a pen on a Wayland session opens the window through XWayland, so it draws (#1180)
2026-12-03 09:51:02 +07:00
BFlat fb7d241103 fix(render): touching rectangles leave no hairline where they meet (#544) (#2927)
* fix(render): touching rectangles leave no hairline where they meet (#544)

* fix(render): snap a box side only where neighbours meet its whole length (#544)

A side moved when any part of it touched a sibling, so a long box beside
a short one lost the exact coverage of the part touching nothing. Edges
that differed by under 1/4096 unit also counted as shared, closing
sub-pixel gaps at high zoom.

Now a side snaps only when sibling sides within a sixteenth of a device
pixel cover its whole length. Sides that match round to the nearest
pixel alike; a short side against a longer one rounds outward over it
and the longer one stays exact.

* fix(render): round a short side outward only over opaque boxes (#544)

A short side meeting part of a longer one rounds outward over it, so
the shared pixel strip is drawn by both boxes. With a translucent fill
or node opacity that strip showed darker. It now rounds outward only
when the box and every neighbour on that line are opaque and normally
blended; otherwise that side keeps its exact edge.

* fix(render): sides that meet round from one shared line (#544)

Sides within the tolerance of each other counted as shared but each
rounded its own position, so a pair straddling a half pixel landed on
different whole pixels and left a one-pixel gap. Matching sides now all
round the same line, the lowest of their positions.

* fix(render): tiny layers in the zoomed-out preview snap shared sides too (#544)

Rectangles under two device pixels skip splat_fills and go straight to
splat_subtree, so a block of them still showed a lighter seam far
zoomed out. splat_subtree now fills the snapped box as well, except
under a translucent parent, whose opacity it applies to each layer on
its own.

* fix(render): leave layers the editor draws itself out of shared edges (#544)

A sibling in the render's skip list isn't drawn, so a box beside it
kept its exact edge rather than snapping to meet it.
2026-12-03 09:49:53 +07:00
BFlat c4a627fb2e M9: web: a workspace page publishes every new file to its server (#2119, part) (#2958)
A browser page that names its figcraft-server and says <meta name="figcraft-workspace" content="on"> opens on Home > Online and publishes every file made or opened there to that server once, through collab.publish, so with the server's team_publish each new design is on the team list at once and every edit is kept there. A file already on a server is never republished as a copy; a refused publish leaves the file local with the server's reason. Docs: packaging/web/README.md, docs/server.md, docs/collaboration-parity.md.
2026-12-03 07:19:53 +07:00
BFlat 89eea4d09d Merge pull request #2922 from storytold/feat/255-2502-feat-cli-let-a-confined-ins
M9: the confined desktop app reaches the servers --automation-allow-server names (#2502)
2026-12-03 07:15:53 +07:00
bflatastic e794660324 M1: a pen on a Wayland session opens the window through XWayland, so it draws (#1180) 2026-12-03 06:41:45 +07:00
BFlat a86154580f Merge pull request #2918 from storytold/bug/254-316-bug-report-intermittent-grap
M1, #316: the window draws on the power-saving GPU on every start
2026-12-03 06:33:57 +07:00
BFlat 11d12696d8 Merge pull request #2956 from elliotttate/perf/2955-image-cache
perf(render): pages of a large image-heavy file stop decoding their images again on every zoom (#2955)
2026-12-03 06:32:56 +07:00
bflatastic cb3377431a M9: a confined session reconnects to an allowed server (#2502) 2026-12-03 06:31:50 +07:00
BFlat 0c772d2bfa Merge pull request #2919 from storytold/bug/264-1402-online-publishing-fails-pub
fix(server): a public server fills by bytes, and a full file count says the server is full (#1402)
2026-12-03 06:02:17 +07:00
bflatastic d7900bf0f0 Merge remote-tracking branch 'origin/main' into pr/2956-367
# Conflicts:
#	crates/render/src/images.rs
2026-12-03 05:49:41 +07:00
bflatastic d279522ea5 M1, #316: a failed start tries the high-performance GPU next
Every start asked for the power-saving GPU, so when its driver failed
before the first frame, every retry took the same GPU. The second attempt
is now the first backends again on the high-performance GPU, as the
first start was before.
2026-12-03 05:46:30 +07:00
bflatastic d467e64fc8 M1, #316: the window draws on the power-saving GPU on every start
eframe asks wgpu for the high-performance GPU, which took the NVIDIA GPU
of a laptop with Intel and NVIDIA graphics; under nouveau it covered the
window in repeated patterns. The canvas is drawn on the processor and the
GPU only shows the window, so every start now asks for the power-saving
GPU, as only the fallback start did. WGPU_POWER_PREF still chooses.
2026-12-03 05:37:49 +07:00
BFlat e7f3e11469 Merge pull request #2948 from storytold/feat/337-2946-add-a-notification-center-w
M1: a bell in the tab bar keeps the session's messages, with unread and copy (#2946)
2026-12-03 05:36:50 +07:00
bflatastic 2bd8d6f2b3 fix(server): install.sh adds max_files to settings written before it (#1402) 2026-12-03 05:14:43 +07:00
BFlat 69ca66bfdd Merge pull request #2925 from storytold/feat/291-1013-feature-request-figcraft-ad
M6: a layer with a video fill shows a video mark in the layers panel (#1013)
2026-12-03 05:09:27 +07:00
bflatastic 0fa36e7c6a Merge remote-tracking branch 'origin/main' into pr/2948-341
# Conflicts:
#	ROADMAP.md
#	crates/ui-egui/locales/en.toml
2026-12-03 05:06:41 +07:00
BFlat ccf064fe29 Merge pull request #2954 from storytold/bug/360-2952-child-vector-paths-do-not-s
M6: an imported SVG's drawing scales with its frame (#2952)
2026-12-03 05:02:07 +07:00
BFlat f24d8de022 M9: a live change that takes longer than the idle timeout to upload no longer drops the connection (#1382) (#2926)
* M9: a live change that takes longer than the idle timeout to upload no longer drops the connection (#1382)

* M9: the slow-upload test holds the uplink up instead of trickling it, so Linux's send buffers don't end the upload early; the grace after an upload ends once the host is heard from (#1382)

* M9: the host's silence is excused for an idle period after an upload ends, even when the reader's timeout fires just after it (#1382)

* M9: every upload, however short, excuses the host's silence for an idle period after it, once per silence (#1382)
2026-12-03 05:00:55 +07:00
bflatastic 23c3430f42 docs: #2955 timings match the PR's final measurements 2026-12-03 04:57:34 +07:00
elliotttate be04080442 perf(render): pages of a large image-heavy file stop decoding their images again on every zoom (#2955)
The decoded-image cache held 256 copies whatever their size, fewer than one
page of such a file shows, so a render dropped copies it needed again. Image
adjustments ran per pixel at full size after every decode, and a copy at a new
size, or a shadow's opacity check, decoded the image again.

- The cache holds up to 4096 copies within its unchanged 512 MB budget.
- Adjustments are looked up in a table of the colours an image has met (the
  same results).
- A canvas copy at a smaller size is averaged down from a larger cached copy;
  exports reuse only the full decode, so their pixels are unchanged.
- An image's opacity is remembered with its full size after one look.

Tests: image_reuse_tests; timings: real_file_bench_tests (FIGCRAFT_BENCH_FILE).
2026-12-02 16:26:57 -05:00