Commit Graph
1442 Commits
Author SHA1 Message Date
bflatastic 3c73045088 #705: cap what a client buffers from a server at 1 GiB; warn the operator about files over 64 MiB when open and over what the app opens 2026-10-17 16:11:59 +07:00
BFlat 753d073f1b Merge pull request #728 from storytold/community/batch-10
Community batch 10: .fig import and file handling (12 PRs)
2026-10-17 16:09:50 +07:00
bflatastic 7da7ed226e Merge main into #705 2026-10-17 16:08:08 +07:00
bflatastic e095ef1fe1 #652: note that a file stamped in the future is re-read until the clock passes it 2026-10-17 16:08:01 +07:00
bflatastic 7d67d13b62 Merge main into #687 2026-10-17 16:06:44 +07:00
bflatastic 93fc6fd082 Merge main into #670 2026-10-17 16:06:30 +07:00
bflatastic 1503f0743c #675: cap the offending value echoed in id/ids errors 2026-10-17 16:06:26 +07:00
bflatastic b377fab0a5 Merge main into #652 2026-10-17 16:05:22 +07:00
bflatastic 7bf814f6b4 Merge main into #675 2026-10-17 16:03:45 +07:00
bflatastic 6f0e14a271 #673: read the failed step with get() instead of indexing 2026-10-17 16:03:41 +07:00
bflatastic 990e621ec4 Merge main into #672 2026-10-17 16:02:41 +07:00
bflatastic 5e2913db34 #679: leave the progress docs to the maintainer 2026-10-17 15:59:52 +07:00
bflatastic 415722439a Merge main into #679 2026-10-17 15:59:40 +07:00
bflatastic b3a2891c2e Merge main into #673 2026-10-17 15:58:31 +07:00
bflatastic 54bb194531 Merge main into #671 2026-10-17 15:58:30 +07:00
bflatastic 5ea5590673 #680: move the page clipboard test to its own module, check the error id 2026-10-17 15:58:24 +07:00
bflatastic 01ce23ca76 #680: page refusal names the calling command (edit.copy / edit.cut) 2026-10-17 15:58:23 +07:00
bflatastic 5b963dce08 Merge main into #667 2026-10-17 15:57:01 +07:00
bflatastic abfc0071f1 Merge main into #680 2026-10-17 15:55:55 +07:00
bflatastic 7de7dbc991 Merge main into #625 2026-10-17 15:53:28 +07:00
bflatastic 84dc9c4f22 Merge fix/524 into batch 10 (#524's rebased head; batch already has its content) 2026-10-17 15:52:39 +07:00
bflatastic f6bfd6953f Merge #524's rebased head (the batch carries the reviewed resolution) 2026-10-17 15:52:18 +07:00
bflatastic da76c806cc Merge main into #668 2026-10-17 15:51:37 +07:00
bflatastic ff418eaaac Merge main into #621 2026-10-17 15:49:16 +07:00
Jorrevdb b044038857 UI: submenu hover fixes (stale state, safe triangle, hover delay) 2026-10-17 10:49:01 +02:00
bflatastic 32266dcd93 #624: open the picker only for a shared paint list (mixed-selection guard) 2026-10-17 15:49:01 +07:00
bflatastic cd8a88733f Merge main into #655 2026-10-17 15:48:00 +07:00
bflatastic a6b35f32e0 Merge fix/all-f3 (9 editor PRs) 2026-10-17 15:47:01 +07:00
bflatastic efe4911eb0 Merge main into #624 2026-10-17 15:42:48 +07:00
Andrii VolkovandClaude Opus 5.5 58d891f63d fix(format): one kiwi value per compressed canvas byte
One value per two bytes of the compressed canvas was too tight for a
public design system: a 39.5 MB canvas holding 29.7 million values got
a budget of 19.7 million (reported in #701). Real files hold 0.37 to 0.75
values per compressed byte; the budget is now one per byte, at least the
old 20 million and at most 128 million. A small file still gets main's
20 million, however far it unpacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YQxjkNSUJhTkTfY74aNeki
2026-10-17 11:29:41 +03:00
Andrii VolkovandClaude Opus 5.5 62ade9b9ad fix(format): reopen large documents once saved
`document.json` was read under the 512 MB cap for any archive member, so a
large imported document saved but didn't open again: 900 000 layers save
as a 1.48 GB document.json, packed into 244 MB. It may now unpack to 16
times its packed size (counted up to the archive's own size), within
512 MB and 4 GB; images and other members keep 512 MB. A small archive
still can't unpack into gigabytes.

That saved file reopens in 13 s with a 5.9 GB peak.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YQxjkNSUJhTkTfY74aNeki
2026-10-17 11:29:41 +03:00
Andrii VolkovandClaude Opus 5.5 330f80fcf5 fix(format): open large .fig files
A real 705 MB .fig file (401 644 nodes, 894 004 layers once instances are
expanded) didn't open: "message: too many values". Lifting that cap alone
made it import only its first 200 000 layers, and lifting that one took
41 GB of memory.

The global caps stay as they are. The .fig import gets budgets from the
size of its compressed canvas instead (counted up to the file's own size),
not from the message it unpacks to, since chunks inflate up to 512 MB:
- the kiwi value budget is one value per 2 bytes of the canvas, at least
  the old 20 million (kiwi is only read for .fig files);
- the layer cap is one layer per 32 bytes of the canvas, at least the REST
  import's 200 000 and at most 2 000 000. A small or crafted file can't
  expand its instances into millions of layers, however far it unpacks; the
  REST JSON import keeps 200 000.

Memory:
- The mapper no longer passes the document through `json!`, which serialises
  its arguments: the whole tree was deep-copied twice.
- Vector networks are built once per distinct network and handed to the REST
  importer beside the JSON (`vectorNetworkRef`), not written into it as JSON
  objects for every instance that shows them.
- Decoded kiwi objects are trimmed, and each import stage's input is dropped
  as soon as the next stage is built.

On that file: peak footprint 41 GB -> 11.3 GB, 67 s -> 25 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YQxjkNSUJhTkTfY74aNeki
2026-10-17 11:29:41 +03:00
bflatastic da5fe1359b Merge fix/524 into batch 10 2026-10-17 15:26:46 +07:00
bflatastic 546c09b3ba Merge fix/all-f2 into batch 10 2026-10-17 15:26:45 +07:00
bflatastic 2fe28bf0a0 Merge fix/707 2026-10-17 15:20:40 +07:00
bflatastic d7da6555f1 Merge fix/654 2026-10-17 15:20:38 +07:00
bflatastic c6ad0bd55d Merge fix/657 2026-10-17 15:20:37 +07:00
bflatastic 2446ed8ddb Merge fix/713 2026-10-17 15:20:35 +07:00
bflatastic 8d97b16e90 Merge fix/691 2026-10-17 15:20:34 +07:00
bflatastic e4d06b2f63 Merge fix/717 2026-10-17 15:20:33 +07:00
bflatastic 6b88e2ea64 Merge fix/718 2026-10-17 15:20:31 +07:00
bflatastic 62308e247e Merge fix/666 2026-10-17 15:20:30 +07:00
bflatastic 3a8e6e2860 #707: search every command, ranked; a highlight for Enter; recents from the palette only
- A search covers every command again (the engine's and the UI's own), grouped by
  menu where one lists it and under Other otherwise, best matches first (prefix,
  then shortest), at most 60. Without a query the menus' items show as before.
- Up and Down move a visible highlight (the pointer moves it too); Enter runs
  the highlighted row, not an invisible first one.
- Only runs from the palette are kept as Recents; menus, shortcuts and context
  menus no longer write the preferences. Recents match the translated label.
- The Plugins menu's items (run last, manage, import) show with the plugins.
- The search keeps its hint, so every catalog keeps its translation.
- The panel sits above the toolbar pill's own rect (toolbar::pill_rect); one
  set_palette/toggle_palette opens it from every entry point.
- Clippy: needless borrows in the toolbar.
2026-10-17 15:20:08 +07:00
bflatastic 45b154e40b #707: drop the unrelated .gitignore line and the parity doc edit 2026-10-17 15:20:08 +07:00
bflatastic 5fcf82abfc Merge #524's latest commit (same budget as the fix above)
# Conflicts:
#	crates/format/src/fig/kiwi.rs
#	crates/format/src/fig/tests.rs
2026-10-17 15:19:59 +07:00
bflatastic 58923a22e8 Merge fix/647 2026-10-17 15:11:24 +07:00
bflatastic 426217327b #647: text copied in another app after a design paste pastes as text again 2026-10-17 15:11:23 +07:00
bflatastic 946004f0d6 Merge main into #707 2026-10-17 15:08:01 +07:00
bflatastic bbfc408ab8 #654: leave the roadmap to the maintainers' docs PR 2026-10-17 15:06:47 +07:00
bflatastic 00e6fc1d59 Merge main into #654
# Conflicts:
#	ROADMAP.md
2026-10-17 15:06:46 +07:00