341 Commits
Author SHA1 Message Date
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
bflatastic 01096b90f1 Merge main into #1997 2026-11-07 10:50:30 +07:00
BFlat 5e5f95122d Merge pull request #1934 from storytold/fix/sec-recovery-note-private
fix(figcraft): write the recovery copy's online note owner-only
2026-11-07 11:37:52 +08:00
BFlat 9a9daeea76 Merge pull request #1979 from storytold/fix/sec-refusals-no-compaction
fix(server): a refused batch counts toward a log's size, not toward a snapshot rewrite
2026-11-07 10:55:41 +08:00
bflatastic 8802f3fd49 CLI: test that plain escapes controls only 2026-11-07 08:56:32 +07:00
bflatastic 680ec56c89 CLI: escape control characters only, so quotes and Windows paths print as they are 2026-11-07 08:02:06 +07:00
Helen Kwok 78502eea6a figcraft-web: window.figcraft takes its request functions from craft-web-api
request, execute, commands and screenshot move onto the shared crate (storytold/craft-libs#413): a timeout on every call, one data field for the screenshot's PNG, and docInspect and uiInspect beside them. A call the page gave up on cancels its request if the app has not started it, so the app skips it. openFile, captureDownloads, files, readFile and inspect stay FigCraft's own, on the same object.
2026-11-07 08:12:59 +08:00
Filip StrajnarandClaude Opus 5.5 b779e46d47 M9: a local view-only share's url is the view URL, not the edit URL
The previous fix made a local share's `link` follow the code shown, but its
top-level `url`, the session's WebSocket URL, still carried the edit token:
`collab.join {link: url}` from a view-only share joined with edit access and
the edit reached the host. The link layer now hands over the view way in as a
link and its URL (`SessionInfo::view`, a `WayIn`, in place of `view_link`), and
`collab.peers` gives a local share's `link` and `url` from the way in for the
code shown (`Live::invite`). Online shares are unchanged.

Regression test: `code_tests::a_local_view_share_s_link_and_url_only_let_people_look`
joins through the `link` and then the `url` over loopback; both are welcomed as
viewers whose edits never reach the host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LvG6E2VLhC9d5v8VSsf4ng
2026-11-06 19:12:40 +01:00
Filip Strajnar a2be6632eb M9: share a file on the local network read-only, with a view-only code
The session the app hosts for a local network share now has two secrets:
the edit code and a view-only code (same address and port, a 44-bit secret
of its own). Whoever joins with the view code is welcomed as a viewer: they
see every change and presence, the app makes the file read-only for them,
and the session refuses their batches, as a server does for view links.

Share > Local network offers Can edit / Can view before sharing starts (the
edit code then never shows) and while sharing. collab.share {via: "local",
access: "view"} does the same; share in collab.peers lists both codes and
links. There is still no comment code on the local network.

Next::Stop boxes its event: SessionInfo grew past clippy's
large_enum_variant threshold, and it only ever carries a status or an end.

Tests: loopback_tests::a_view_token_lets_people_look_and_not_edit,
code_tests::a_local_view_code_lets_people_look_and_not_edit,
live_share_tests::a_local_share_can_start_for_looking_only, and the local
share tests that asserted edit-only codes. Docs: collab-protocol.md,
collaboration-parity.md.
2026-11-06 17:03:21 +01:00
Helen Kwok 05db36303f figcraft-web: a Save of a host-opened document goes out under the host's file name
In page host mode a plain Save of a .figcraft the host opened used the document's internal name, so the host got a different file name with saveAs true instead of an update to the file it opened. Services gains host_file(); Save uses it for a .figcraft host file, Save As keeps the document name, and a missing, .json or .fig host file stays a Save As.
2026-11-05 17:51:41 +08:00
Helen Kwok cb9a63807e figcraft-web: speak the host messages through craft-web-host
The transports, the message types and the origin checks come from the shared crate (storytold/craft-libs#420); FigCraft keeps what is its own: which saved files become the document, the open size limit and the author.
2026-11-05 17:50:57 +08:00
Helen Kwok e83eeeb925 figcraft-web: carry the host bridge over the current startup code (one web-sys entry, one app construction, host files drained into the open queue); roadmap header merged 2026-11-05 16:43:01 +08:00
Helen Kwok 51bbc2b1a7 figcraft-web: a host-opened file is the document's file; a failed save hand-over changes nothing 2026-11-05 16:43:01 +08:00
Helen Kwok fc3679047e feat(web): a host bridge for embedding pages, ?host=parent and data-host="page" (#1356)
A page that embeds the web build can hand it a file and get every save back instead of a browser download, and hears about unsaved changes: ?host=parent for a same-origin iframe (postMessage, the protocol the GridCraft, PdfCraft, WordCraft and CADCraft bridges use) and data-host="page" on the canvas for a page that loads the module into its own document (non-bubbling CustomEvents on the canvas). The bridge holds a Transport (Parent or Page) with one send; the pure rules are unit-tested; the hosting guide documents both modes.
2026-11-05 16:43:01 +08:00
fluid-cheyandClaude Opus 5.5 fccaa43101 M9: a joined live session keeps reconnecting and says when it's disconnected
A session you joined could end for reasons that pass, or after about 85 s of
retries, and its tab then looked like an unsaved local file. Work done there
reached no one, with only a 3 s toast to say so.

A live connection now reconnects until you leave, pausing a minute after each
12 attempts. Only refusals that are for good stop it, so "too many messages",
"busy" and the like retry. Messages queued while offline go out paced so a long
queue can't trip the server's rate limit. A session that ended stays on its tab:
the tab shows a red mark and a strip across the canvas offers Retry now or Try
again, Save a copy and Dismiss. Joining again uses the same tab, and what changed
offline opens beside it as an unsaved copy. A session that gets out of step
joins again by itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 12:17:25 -07:00
Dylan M. Taylor 25d2a201a9 fix(server): clean a published file's name when it is taken from the file (#1978) 2026-11-03 23:49:12 -05:00
Dylan M. Taylor 6d1b5da863 fix: create test and benchmark temp directories fresh, never adopt an existing one (#1977) 2026-11-03 23:48:46 -05:00
Dylan M. Taylor e9ec7564c2 fix(server): a refused batch counts toward a log's size, not toward a snapshot rewrite 2026-11-04 04:07:45 +00:00
Dylan M. Taylor 4682c9dd75 fix(cli,ui): escape control characters in document and plugin text sent to the terminal 2026-11-03 18:03:47 +00:00
Dylan M. Taylor 1ff0da1841 fix(figcraft): write the recovery copy's online note owner-only
The .online note beside a recovery copy holds the secret the client resumes
its identity with, but it was written with the default mode while the copy
itself was created 0600. Both now go through one owner-only writer, which
also narrows a note that already existed.
2026-11-03 04:26:03 +00:00
AxylumandCédric Legrand dea8d8eb3a fix(cli): M2.1: scope dead-code expectation (#1816)
Co-authored-by: Cédric Legrand <cedric@legrand-tech.fr>
2026-11-01 23:49:30 -05:00
BFlat e2f04b33e0 M11: a tap on a plugin panel's button keeps what was typed in its fields (#1732) 2026-10-31 10:13:01 +07:00
BFlat 87254913af M3: library analytics list how each style and variable is used (#1730)
* M3: library analytics list how each style and variable is used

A file reports how many of its layers use each of a team library's styles and
variables, and Show usage lists them by a Type choice with their layers and
files. Layers in instances count for their component. Also ignores plugins/target.

* M3: the style analytics test waits for the instance report too
2026-10-31 09:13:08 +07:00
BFlat 3837b08a71 M8: a damaged image is refused with a reason instead of showing as an empty box (#1724)
* M8: a damaged image is refused with a reason instead of showing as an empty box (#1474)

* M8: replacing an image refuses a damaged file too
2026-10-31 07:22:44 +07:00
BFlat 943c20f934 M1: images copied elsewhere paste on the desktop and in the browser (#492) (#1723)
The desktop shell swallows a plain Cmd/Ctrl+V, press and release, and sends an
image paste event; FigCraft ignored it and waited for a release that no longer
comes. The browser's paste event gives eframe only text, so the page now reads
the image from it, under the same limits.
2026-10-31 07:07:09 +07:00
BFlat 920aafb805 M1: the colour picker's Image tab has a placeholder, a preview and takes a dropped file (#1682) (#1713)
Choosing Image shows a checkered placeholder and Upload from computer instead of a dialog at once; an image paint shows its asset preview. A file dropped on the open picker replaces the image, keeping the fill mode, crop, position and adjustments (image.replace, one undo step; paths capped as image.place's). The browser's file picker reaches the tab too. Also fixes a race in library_detach_tests.
2026-10-31 06:32:59 +07:00
BFlat f0ceb46dcb M8: Show in folder works in the Flatpak build and selects the file on Linux (#1701) (#1711)
* M8: Show in folder works in the Flatpak build and selects the file on Linux (#1701)

* M8: Show in folder's fallback path is tested on Linux
2026-10-31 05:44:29 +07:00
BFlat 2d784c363d M3: library analytics count insertions and show them over time (#1704)
Gap 10: a file counts the library instances it places, creates, pastes or duplicates and reports them like its detaches. The server counts what a file's totals grow past their highest in the current week and keeps a year of weeks (actions.json). library.usage {days} and Show usage give insertions and detachments over the past 30 days, 90 days or year. New variants are appended; an older server refuses them and Show usage says so.
2026-10-31 04:13:14 +07:00
BFlat 437d052396 M8: a control request can set its own timeout, up to 10 minutes (#1696) (#1706)
A request line can carry timeoutMs beside id and method, capped at 600,000 ms; without it the wait stays 60 s and older apps ignore the field. figcraft-cli mcp --attach PORT --timeout SECONDS sends it with every request and reads the answers that much longer. A timeout's message says how long the request waited.
2026-10-31 03:41:56 +07:00
BFlat 760aece238 M5: an Open link action can open in place of the prototype, with Open in new tab off (#1685) 2026-10-31 02:37:54 +07:00
BFlat 54a0c6954b M9: a live session's welcome sends the document compressed to clients that read it (#1665) (#1693) 2026-10-31 01:51:12 +07:00
BFlat b6499a295c M8: a control request that times out says whether it was applied (#1673) (#1692)
The UI starts a request through its gate (a new Running state) just before running it and never runs one the transport already cancelled. At the timeout the reply says it was dropped and not applied, or that it is still running and will take effect; a reply that just made it is delivered. Only screenshots and input blame the window.
2026-10-31 01:37:09 +07:00
bflatastic 497e2d020f Merge main into #1678 2026-10-30 23:51:41 +07:00
Patrick Wozniak d015436b13 M9: team links the list no longer hands out are removed at startup; a team link is made before the list changes 2026-10-30 17:39:36 +01:00
BFlat be6a7af25f M3: team library analytics count detached instances (#1668)
* M3: team library analytics count detached instances

Detaching an instance of a library component counts it in the file (libraries.detached, saved with it, capped). The background library check reports the counts after its fetch (ReportDetached); the server keeps them per file beside the file's usage report in usage.json (same caps) and answers Detached with them. Show usage and library.usage list detaches per component and per file (detached, detachesKnown). The new request and reply variants are appended, so every older library message keeps its bytes; an older server refuses the new requests, which the app ignores. Gap 10.

* M3: the detach test waits for the instance count too (the two arrive in separate reports)
2026-10-30 23:29:18 +07:00
Patrick Wozniak 2d23f95673 M9: Home ▸ Online shows the server's team list, and its files open by links without a secret (desktop and browser) 2026-10-30 17:10:12 +01:00
Patrick Wozniak 4b4b2bfd00 M9: a team list on figcraft-server: the files shared now, joined without a token (team_files) 2026-10-30 17:09:07 +01:00
BFlat 139d5e94a9 Server tests: rate limits measured at a clock the tests hold still (#1662)
downloads_have_a_share_per_address failed once under a full gate: its 40 library fetches could take long enough for the address's download share, measured against Instant::now() and refilling 1 MiB a second, to refill one more. Store::clock() is now what every rate limit the store checks reads: the clock, or in test builds a time the test holds it at (a #[cfg(test)] field). The hardening, download burst and admin budget tests hold it still; the admin test is back to its exact budget (#1564 had allowed for refilling). Found flaking in gates.
2026-10-30 21:42:49 +07:00
BFlat 84e5278209 M6: figcraft-cli connect publish publishes code connect mappings to a design file (#1643)
* M6: figcraft-cli connect publish publishes code connect mappings to a design file

figcraft-cli connect publish <file.figcraft> [--mappings figcraft.connect.json] [--dry-run] links each entry's component or set by name through codeConnect.import, warns about and skips links that don't fit, saves the file in place through the engine's file.save, and exits 1 when nothing links. Gap 16.

* M6: the generated man pages include connect and connect publish
2026-10-30 16:31:25 +07:00
bflatastic 10a778930b Merge main into #1615 2026-10-30 13:50:49 +07:00
BFlat c47177498d M8: every file a command reads by path is a regular file within a cap (#1114) (#1625) 2026-10-30 13:48:26 +07:00
bflatastic 9ae8c2e377 Merge main into #1615 2026-10-30 13:20:02 +07:00
bflatastic cabbb138da Merge main into #1614 2026-10-30 13:04:48 +07:00
bflatastic f11cad01b8 Merge main into #1615 2026-10-30 13:03:09 +07:00
BFlat f1eaf3fcb4 M8: cap the people a client keeps track of and the deleted ids a session remembers (#1622)
* M8: cap the people a client keeps track of and the deleted ids a session remembers (#1121)

A hostile host or server could grow a client's presence, seen-peers and who-is-here lists without bound, and a session's deleted-id set only grew. Clients keep at most MAX_PEERS (4,096) others, leaving newcomers out with a warning; max_people is at most that; a session remembers at most 262,144 deleted ids, the lowest forgotten first.

* M8: a max_people above what clients track is lowered with a warning, not refused (#1121)

Refusing it would stop a server whose existing config says more from starting after an upgrade. Config::people() lowers max_people to MAX_PEERS for the core's limits, and the startup warnings name the configured and the used value.

* M8: the live welcome's handling in its own function (Sonar S3776)
2026-10-30 12:33:29 +07:00
Dylan M. Taylor 0b7528b76d Update prompt shows the app icon and accent color instead of a letter (#1612)
UPDATE_APP (native builds; craft-update is a native-only dependency) carries our 128 px icon and accent (#02da96, its colour in ArtCraft Launcher). The updater, the self-update
helper and craft-update's startup prompt all get them through crate::UPDATE_APP; the
prompt draws the icon, the accent and "by ArtCraft" (craft-update's default developer).

craft-update is pinned to storytold/craft-libs main at 1065653e7 (#434).
2026-10-30 01:28:14 -04:00