Commit Graph
1968 Commits
Author SHA1 Message Date
aiongg cff215a107 Merge #1273 2026-10-25 02:21:07 +00:00
aiongg 996d96580e Merge #1293 2026-10-25 02:21:07 +00:00
dotCooCoo 6e86e26d14 M9: the hello deadline refuses a connection even when a read times out early
On Windows a socket's read timeout counts whole milliseconds, so a read
bounded by the hello deadline can time out a moment before it.
`next_message` then took the timeout for a closed connection: the client
got no "no hello in time" refusal, and the socket closed only after the
2 s linger. `Duplex::read` now reads again until the deadline has passed.

Tests:
- `connections_without_a_hello_are_told_why_they_end` (new): twelve
  connections that never say hello each get the refusal. Failed 5 of 10
  runs without the fix.
- `pre_hello_lifetime` notes the end of the stream on a thread of its own
  instead of reading one message per 300 ms poke, where pongs queued
  ahead of the close delayed it.
- `quiet_guests_stay_and_silent_connections_are_dropped`: the guest takes
  only the host's keepalive. Its 600 ms idle timeout also bounded the wait
  for the welcome.
- `two_files_are_hosted_and_joined_independently`: the two joins race, so
  the file whose welcome arrived last is in front. The test checks that,
  then brings B to the front.
- `a_local_share_is_joined_by_its_code_and_edits_sync`: once the share
  stops, another program's host can take the freed port and refuse the
  code.
2026-10-24 19:00:42 -07:00
Dylan M. TaylorandClaude Sonnet 5.5 9f78875338 security: linear vector import, stroking and rounding, validation, and cyclic dev snapshots (#1306)
* security: linear vector import, stroking and rounding, validation and a cycle check for dev snapshots

Closing a subpath, rounding corners and chaining stroke runs each rescanned the whole
network per step, and Document::validate searched a parent's children per child. They now
update only the current subpath's last segment, rebuild each region loop in one pass, walk
per-vertex adjacency lists, and check edges against a once-built index. A dev snapshot whose
layers contain a cycle under the root is refused instead of reconstructed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(doc): address review findings for snapshot children and 2-segment rounded loops

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 21:17:36 -04:00
skylartaylor 99d66401d6 EGUI037: port FigCraft lifecycle, capture and text input to egui 0.37
Preserve current main and pin the reviewed fork dependency family.
Qualify bundled and system-font configurations, plugins and regression tests.
2026-10-25 02:31:42 +02:00
dotCooCoo 4f0649ad52 M7: the export settings name Ignore overlapping layers and offer Include bounding box for text layers only
The export setting's advanced options name the contentsOnly option
"Ignore overlapping layers" and offer Include bounding box only when
every selected layer is a text layer. A setting that already has Include
bounding box on still shows the option, so it can be turned off, and the
export still applies it. The saved keys and the contentsOnly and
includeBoundingBox params of export.add, export.update and file.export
are unchanged.

Every catalog's "Contents only" row becomes an "Ignore overlapping
layers" row.
2026-10-24 17:21:42 -07:00
dotCooCoo 9c20d06abd M7: with Contents only on, a slice in a frame or group exports only that container
A slice exported every layer of its page that showed in its area, whatever
its Contents only setting said. With Contents only on (the default), a slice
inside a frame or group now exports only that frame or group and the layers
in it. With it off, or for a slice on the page or in a section, the slice
exports everything in its area as before. The Export section's preview of a
slice follows its first export setting in the same way.
2026-10-24 15:53:33 -07:00
dotCooCoo ae57bf84d0 M5: a notice before a prototype's Open link leaves for a website
The player opened a prototype's Open link at once, also from an After
delay trigger with no click. The help center's Prototype actions page
says that the viewer is told they are leaving before an external
website opens, with a checkbox that skips this page on the current
device.

An Open link to an http or https address now shows a notice with the
link, Open link, Cancel and "Don't show this again". Open link opens
it; Cancel, the close button or Escape drops it. While the notice
shows, the prototype takes no keys, and the presenter's C, Shift+C and
F keys do nothing. When Open link is pressed with the box ticked, the
desktop app saves the choice with its preferences; the web build keeps
it until the page reloads. proto.linkNotice {show} turns the notice on
or off. A mail link opens at once, as before, also while the notice
shows. A second link to a website that fires while the notice shows is
dropped.
2026-10-24 14:10:41 -07:00
dotCooCoo 0978b44385 M4: text on a path takes a fill binding made through fills
The bindings that move with the path's fills and effects are now found with list_binding, which reads `fills` as the first fill's color, as style_sets in cmd/styles.rs does.
2026-10-24 14:02:50 -07:00
dotCooCoo 2c38768872 M6: a layer drag or eye and padlock sweep that ends in Dev Mode changes nothing
A drag or sweep started in Design and released after switching to Dev Mode leaves the layers as they were and shows the Dev Mode note.
2026-10-24 14:01:22 -07:00
Marco Arnulfo f4d3f796d6 Dialogs start in the folder of the last file picked (fixes #1290) 2026-10-24 23:00:08 +02:00
dotCooCoo e46825b1cb M4: Text on a path checks masks only for layers that give a candidate
The hover search now recurses into each child first and looks up its mask only when the child added a candidate, as layers_at in crates/doc/src/geometry.rs does.
2026-10-24 13:51:38 -07:00
dotCooCoo 949d6c2830 M4: text on a path keeps its effects when the path's effect style has none
A path linked to an effect style with no effects gave the text an empty effect list and the style link. The text now takes the path's effects only when there are any.
2026-10-24 13:51:32 -07:00
dotCooCoo 98d061df10 M4: text put on a path takes the path's fill and effects
text.onPath, and the Design panel's Put text on path button that runs
it, kept the text layer's own fill and effects when the text went onto
a path. The help center's Guide to text says that the vector object's
fill and effects are transferred to the text layer.

The text now takes the path layer's fills, with their fill style and
variable bindings, when one of them shows, and the path layer's effects,
with their effect style and bindings, when it has any. The text's own
bindings on those fields are dropped. When the path has no visible fill
or no effects, the text keeps its own.
2026-10-24 12:37:59 -07:00
Mojtaba Jafarzadeh 241b349d7d Merge branch 'main' of https://github.com/storytold/figcraft into fix/share-key-and-large-file-publish
# Conflicts:
#	contributors/people.toml
2026-10-24 22:50:16 +03:30
Mojtaba JafarzadehandClaude 726700aa2a contributors: add Mojtaba Jafarzadeh's real name
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-24 22:35:07 +03:30
Mojtaba JafarzadehandClaude 9a006175c8 ui: server key field in the Share popover
A server with a key rejects publishes without one, but Preferences' server
address never holds a key. Add a "Server key" field to the Share popover's
Advanced section and pass it to collab.share so a keyed server can be used
from the popover without the Publish dialog.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-24 22:35:07 +03:30
Mojtaba JafarzadehandClaude 2a08ad3244 collab-net: wait longer for one-shot server replies
Publishing uploads a whole file, and a large project on a slow link takes
the server several minutes to receive and answer. The one-shot request
connections (hosting, the publish upload, a library, a plugin directory)
waited the session idle timeout (45s), so a large publish timed out with
"no answer from the server" before the server finished. Add a dedicated
request_reply_timeout (5m) for these connections, keeping the session idle
timeout unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-24 22:35:05 +03:30
NetterSilverandClaude Haiku 5.5 42fbe8f00c Skip zero-length segments when finding arrowhead direction
Found while testing crates/pathops/src/lib.rs:352 (path_end, used by arrowhead)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 18:52:03 +00:00
dotCooCoo d8900e1c16 M4: the Text on a path tool
Text went onto a path only with the Design panel's Put text on path
button (a text layer and a path selected together) or with text.onPath.
The Text on a path tool, in the Text flyout of the toolbar
(tool.textOnPath), shows the I-beam over a shape's or vector's path, and
a click there puts new, empty text on the path, starting at the click,
and starts typing. The text takes the path layer's place, transform,
box, constraints and effects, and its fills when one of them shows; the
path layer is removed. Ending the edit with nothing typed puts the path
back with no undo step.

The tool measures the distance on the page, so a layer scaled more one
way than the other, or shown smaller, is reached where it shows. Shapes
in front whose outline is away from the click do not hide a path behind
them, and paths that a mask or a clipping frame hides at the click are
skipped, as are locked layers and layers inside instances.

A double-click into a text layer that was just made no longer makes it
count as an existing layer, so leaving it empty records no undo step,
with this tool and with the Text tool.
2026-10-24 11:37:47 -07:00
NetterSilverandClaude Haiku 5.5 d9a1de91d3 Fix code export printing whole numbers of 2^63 or more as i64::MAX
Found while testing crates/engine/src/codegen.rs:112 (num)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 17:39:10 +00:00
dotCooCoo 27fc3cec81 Docs: list each file-format status topic once
The status line of docs/file-format-parity.md repeated eight topics,
from SVG/PDF export depth refusal (#208) to "last major". Each topic is
now listed once, and the boards entry closes its parenthesis.
2026-10-24 10:34:29 -07:00
NetterSilverandClaude Haiku 5.5 544a29c93b Keep style runs disjoint when inserting text at a run boundary
Found while testing crates/doc/src/text.rs:592 (TextData::replace_range, with normalize at :573)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 17:17:22 +00:00
AganzeFelicite c743f8ec1e Merge remote-tracking branch 'upstream/main' into fix/adobe-fonts-macos-298
# Conflicts:
#	ROADMAP.md
#	crates/text/src/fontdb.rs
#	docs/roadmap.md
2026-10-24 18:20:00 +02:00
dotCooCoo 954f9036da Docs: parity rows for mouse-trigger delays, outline options and missing fonts
Three parity rows still listed work that has landed on main. The
prototyping Triggers row listed delays on mouse enter, leave, down and
up as missing; they landed on 2026-10-13. Canvas & navigation's
remaining work in target-app-parity listed outline mode's Include
hidden layers and Include object bounds, which View > Outlines has.
The file-format Fonts row said missing fonts give warnings only; the
desktop app lists them in the Missing fonts window, and replacing them
is still missing.

Each file gets its status line and a revision-history row. The
percentages and hours are unchanged.
2026-10-24 09:19:45 -07:00
watchakorn-18k d1d3b3a86c M8: group the copy commands under Copy as in the layer context menu
Copy as CSS, SVG, PNG and Copy link to selection move into a Copy as
submenu, placed under Paste to replace, instead of four flat rows near
the bottom of the menu.
2026-10-24 23:12:11 +07:00
watchakorn-18k 09b28f9b2d M8: Copy link to selection in the layer context menu
Edit > Copy as > Copy link to selection (edit.copyLink) was only in the main
menu. Add it to the right-click menu on a layer, after Copy as PNG, labelled
with the command's own translated label.

The command now says "Link copied" when it copies, and copies nothing when
no layer is selected (it used to put figcraft://node/0 on the clipboard).
2026-10-24 22:34:35 +07:00
dotCooCoo ac399dbe73 M6: Dev Mode says why when a page or layer drag is refused
Page rows and layer rows take drags in Dev Mode again. A drag on either leaves the order as it was and shows the Dev Mode note, as a double click or the row menu already does.
2026-10-24 08:34:13 -07:00
dotCooCoo 41fe7d95d8 M1: the iOS button next to Corner smoothing sets 60%
The Corner smoothing row showed "iOS: 60%" as plain text. The help
page on corner radius and smoothing says to click iOS to set corner
smoothing to 60%. The row now has an iOS button that sets
cornerSmoothing to 0.6 on the selection in one undo step, with the
hover text "Set corner smoothing to 60%".
2026-10-24 08:01:53 -07:00
dotCooCoo 6fa00af2be Docs: components parity status line for the text style variables 2026-10-24 07:32:51 -07:00
dotCooCoo 811d599960 M4: corner smoothing on polygons and stars
Polygon and star outlines did not use their corner smoothing: the value
was stored, imported and exported, but `shape_path` drew their corners
as plain circular arcs, and the Design panel showed the Corner
smoothing field only for rectangles and frames. Rounded polygon and
star corners now take smoothing the way rectangle corners do. Each
corner keeps a circular arc over the unsmoothed part of its turn and
eases into both edges, and it starts (1 + smoothing) times the plain
corner's length from the vertex. When a smoothed corner does not fit
in half of its shorter edge, smoothing is reduced first, then the
radius, as for rectangles. The Individual corners button opens the
panel for polygons and stars too, with the Corner smoothing row and no
field per corner.
2026-10-24 07:22:36 -07:00
dotCooCoo 268c0ead11 M3: apply variables to a text layer's font family and font style
The Design panel's font family and font style menus offered no way to
bind a string variable; these bindings could be made only by commands
such as variable.bind. Each menu now starts with Apply variable, which
opens the variable picker on string variables for the selected text
layers. A bound family or style shows its variable's chip in place of
the menu. A click on the chip picks another variable, and its detach
button unbinds it. While a text is being edited (a caret or selected
characters), the menus have no Apply variable item and show the plain
dropdown. A pick applies to the selected characters, or to the whole
layer when no characters are selected, as before.
2026-10-24 06:08:17 -07:00
dotCooCoo 9f280cb2e0 M3: style variable pickers offer only variables scoped to the field
The variable picker opened from a style's field listed every variable of
the field's type, and the Fill and Stroke style picker's Color variables
listed every color variable, whatever their scopes. Both now offer only
variables scoped to the property, as the Design panel's pickers do. A
paint style's colors take variables scoped to a fill or to strokes, an
effect style's fields take effect variables, and a text style's fields
take the variables of their font property. Layout grid fields still take
any number variable. style.bind still binds a variable outside its
scopes, as variable.bind does.
2026-10-24 05:24:51 -07:00
NetterSilverandClaude Haiku 5.5 598a4a2867 Measure distribute span to the group's outermost edge
Found while testing crates/engine/src/cmd/arrange.rs:210 (distribute, also used by arrange.packH/packV)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 11:51:08 +00:00
dotCooCoo 337f9d72e0 M3: bind variables to a text style's fields from the style editor
The style editor bound variables to paint colors, shadow colors, blur
radii and grid sizes, but a text style's fields took variables only
through style.bind. The font and font style menus now start with Apply
variable, which opens the picker on string variables, and the size, line
height and letter spacing fields show a variable button on hover for
number variables, as the Design panel's number fields do. A bound field
shows its variable's chip in place of the value, as in the Design
panel. A click on the chip picks another variable, and its detach
button unbinds it.
2026-10-24 04:11:03 -07:00
Ridzzz0Alam 2baeff3452 M1: dash limit counts the pattern restarting at each subpath (#1060)
kurbo restarts the dash pattern at every MoveTo, so many short subpaths
with a pattern of tiny dashes before a long gap made ~1M dashes (5M path
elements) while the length-based estimate allowed them. stroke_center
now adds one pattern's length per subpath to the estimate: an upper
bound on the dashes kurbo makes.

Test: each_subpath_restarting_the_dash_pattern_counts_toward_the_limit
(5M elements before).

Reported by CodeRabbit on #1278.
2026-10-24 12:44:55 +02:00
Ridzzz0Alam 494387a6a8 M1: a dash pattern too fine for its path strokes solid (#1060)
stroke_center handed any dash pattern to kurbo::stroke, which makes one
outline per dash: a 0.01/0.01 pattern on a 10,000-unit line made 2.5M
path elements, and a long line with a tiny pattern ran out of memory.

The variable width stroke already drew solid past MAX_DASHES (20,000);
that estimate is now width::dashes_fit and stroke_center uses it too, so
both strokes follow one rule. The path length is only measured for
dashed strokes.

Test: a_dash_pattern_too_fine_for_its_path_strokes_solid (2.5M elements
on the old code).
2026-10-24 12:13:40 +02:00
dotCooCoo 29ab17c222 M6: Dev Mode refuses edits from dropped files, the Pages list and the Assets panel
In Dev Mode the menus, shortcuts, clipboard, canvas and layers panel
refuse design edits, but an image or SVG dropped on the canvas was
still imported. The Pages list still added, renamed, reordered,
duplicated and deleted pages. The Assets panel still placed instances,
swapped them on an Alt-drop, applied styles, changed Hide when
publishing, accepted library updates and added, removed or swapped
libraries.

All of these now go through dev_mode_refuses with the command they
would run, and show its note. A dropped document still opens as a file
of its own, and the drop overlay shows the note instead of "Drop to
import". A click in the Pages list still opens a page, and page rows
take no drags in Dev Mode.
2026-10-24 02:57:11 -07:00
Ridzzz0Alam 1cb5f403fc M1: a section's title draws above the labels of frames inside it (#1150)
boards() listed a section before its contents, so the label of a frame
near the section's top-left was painted over the section's title pill,
and label_at (last label wins) gave clicks on the pill to that frame.
A section now comes after everything inside it: its pill draws on top
and takes the click.

Test: a_sections_pill_is_above_the_labels_of_frames_inside_it (fails on
the old order).
2026-10-24 11:52:57 +02:00
skylartaylor 9825a4926a M2.1: migrate FigCraft to egui 0.37 and reconcile current main 2026-10-24 11:43:04 +02:00
Ridzzz0Alam 4da6a11bad M1: render bounds stop at the depth the renderer draws (#1062)
world_render_bounds and children_render_bounds recursed once per level
with no limit, so a crafted chain of ~20,000 nested groups overflowed the
stack and aborted the app on PNG/JPG/WebP export, rasterize, copy as PNG
and thumbnails. A stack overflow is an abort, not a panic, so the guard
can't catch it.

The walk now carries a depth and stops descending at 256, the depth
draw_layer draws to (MAX_EXPORT_DEPTH): bounds match what is drawn and
shallower trees are unchanged.

Test: render_bounds_stop_where_drawing_stops_on_very_deep_chains (aborts
on the old code).
2026-10-24 11:26:27 +02:00
NetterSilverandClaude Opus 5.5 10702311f3 Require a per-client secret to resume a collab client id (#1193)
Fixes #1054

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 05:26:27 -04:00
NetterSilverandClaude Opus 5.5 a80df8ed18 Count scalar kiwi fields against the decoded-value budget (#1188)
Fixes #1057

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 05:26:06 -04:00
NetterSilverandClaude Opus 5.5 35f5faa2e6 Check SVG nesting depth after DTD entity expansion (#1177)
Fixes #1081

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 05:25:43 -04:00
NetterSilverandClaude Haiku 5.5 8ab0de2690 Keep wrong join-code streak when a correct code is tried (#1174)
Fixes #1088

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-24 05:25:17 -04:00
NetterSilverandClaude Haiku 5.5 7bc594632d Cap layout.setTrack track count at MAX_TRACKS (#1168)
Fixes #1098

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-24 05:24:53 -04:00
NetterSilverandClaude Opus 5.5 9c0d1c19fe Restore the clipboard when a command fails and is rolled back (#1167)
Fixes #1100

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 05:24:29 -04:00
NetterSilverandClaude Haiku 5.5 8864e42dce Clear plugin settings when a plugin id is re-registered (#1159)
Fixes #1116

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-24 05:24:05 -04:00
NetterSilverandClaude Haiku 5.5 98298a3519 Validate image member names when reading .figcraft archives (#1148)
Fixes #1122

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-24 05:23:43 -04:00
NetterSilverandClaude Opus 5.5 7df328d1ca Clip Inside/Outside strokes by the shape's even-odd fill rule (#1253)
Found while testing crates/pathops/src/lib.rs:326-333 (stroke_outline_of, StrokeAlign::Inside and Outside arms calling binary(), which uses FillRule::NonZero at :82)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 05:23:23 -04:00