From d6bb4dfd6064a24fa2bfa5aa5dba0f8a595cd215 Mon Sep 17 00:00:00 2001 From: Tanish Manku Date: Sat, 21 Nov 2026 13:51:26 -0700 Subject: [PATCH] docs(adr): ADR 0128, the work allowance and frames that say what they left out; roadmap, parity, changelog and credits for P-002, P-011 and P-012 (M8) --- AUTHORS.md | 9 +- CHANGELOG.md | 30 +++++ ...-and-frames-that-say-what-they-left-out.md | 119 ++++++++++++++++++ docs/mcp.md | 9 ++ docs/parity.md | 2 +- docs/roadmap.md | 19 ++- 6 files changed, 172 insertions(+), 16 deletions(-) create mode 100644 docs/adr/0128-one-work-allowance-and-frames-that-say-what-they-left-out.md diff --git a/AUTHORS.md b/AUTHORS.md index c14cf24f..844f3861 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -9,10 +9,10 @@ People who have contributed to AniCraft. The repository starts from one initial * mypenc: skew in Free Transform (#176). * Davit Matchakhelidze (devius): Georgian in the interface, with Noto Sans Georgian (#160). * Mex (MMexicann): SVG path data, `Math.round` and `Math.min`/`max` signed zeros, affine inverses, documentation; preset files with a byte-order mark, oversized indices, CLI numbers, guide anchors and the Windows build scripts. -* NetterSilver (Silvertree2010): shape tweens that morph a raw shape's line with its fill, dash patterns, colour, easing and script-string parsing; an XFL nested-group regression test; eight-point ovals, smooth anchors that stay smooth when a segment is bent, and non-finite numbers in transforms, paths, scripts and saved files. +* NetterSilver (Silvertree2010): shape tweens that morph a raw shape's line with its fill, dash patterns, colour, easing and script-string parsing; an XFL nested-group regression test; eight-point ovals, smooth anchors that stay smooth when a segment is bent, and non-finite numbers in transforms, paths, scripts and saved files; the length of very large vectors, a hex colour form that keeps alpha, and a test for SVG path numbers past `f32` (#142, #233, #130). * Mex (MMexicann): SVG path data, `Math.round` and `Math.min`/`max` signed zeros, affine inverses, documentation. * NetterSilver (Silvertree2010): shape tweens that morph a raw shape's line with its fill, dash patterns, colour, easing and script-string parsing; an XFL nested-group regression test; Trace Bitmap and Convert to Bitmap (#489). -* jayzed80: flipped scales in Properties, CLI subcommand help and frame numbering; copy, cut and paste keys on the stage. +* jayzed80: flipped scales in Properties, CLI subcommand help and frame numbering; copy, cut and paste keys on the stage; shape-tween outlines at junctions, with dashes and width profiles, and along a motion guide (#238). * Efe Şahinbaş (MacallanTheRoot): the MCP render caption. * nocturney: localisation tests (Hebrew plurals, the product name). * Vincent Agerbech (va-moviestarplanet): XFL group placement. @@ -24,6 +24,7 @@ People who have contributed to AniCraft. The repository starts from one initial * Oskar Raszkiewicz (oskarraszkiewicz): the macOS menu row. * Wilder Ccasa (Call4han): fitting the stage by double-clicking the Hand tool (#457). * Dylan M. Taylor (dylanmtaylor): no caller-chosen ffmpeg over serve and MCP, bounded request lines, safer XFL folder reads. -* Agapenor (Agapenordev): XFL folder paths with backslashes, the frame limit on loaded documents, the report behind the evaluation allowance. +* Agapenor (Agapenordev): XFL folder paths with backslashes, the frame limit on loaded documents, the report behind the evaluation allowance and what it counts as work (#13). * rcoenen: Animate's shape hints (`morphHintsList`), default text line spacing and default dash gap, from files Animate saved. -* Hagai Baram (hrb9): the Hebrew fallback face, `iw` read as Hebrew, and right-to-left language detection (#486). +* Hagai Baram (hrb9): the Hebrew fallback face, `iw` read as Hebrew, and right-to-left language detection, private-use tags included (#486). +* FredApps: a test that linked artwork survives SVG export and re-import (#500). diff --git a/CHANGELOG.md b/CHANGELOG.md index b416e0e2..9f3c7437 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,36 @@ ## Unreleased +* **Documents too large to draw, shape-tween outlines on a guide, and small fixes from outside** + (M8, backlog P-002, P-011 and P-012; ADR 0128). + * **Security: no nesting of symbols hangs AniCraft.** The allowance of work one frame has + (a million elements) now also counts the layers looked at, the size of each outline and + how far into a long library a symbol is, so a file can multiply none of them by nesting. + **Test Movie** has an allowance for each step: it used to look at every element of up to + 10,000 instances after every change, and give every button a whole frame's allowance at + every move of the pointer (ideas from Agapenor's #13). + * **A frame with artwork left out says so.** The status bar tells you once ("This frame + holds more artwork than AniCraft draws at once…"), Test Movie's Output panel says why a + step stopped, and the commands that write frames (PNG, SVG, sequences, sprite sheet, GIF, + animated PNG and WebP, video) add `"left_out": true` and a `"warning"` to their result + instead of passing a partial picture off as the whole one. `anicraft-cli info` and the MCP + `anicraft_render` caption say it too. + * **Shape tweens along a motion guide keep their outlines** (jayzed80, #238). A raw shape's + line pieces used to follow the guide one by one and cross the fill. Each piece now rides + with the fill it edges, also when both keyframes have as many pieces; an edge two fills + share goes with the lower fill. Outlines are no longer joined through a point where three + or more lines meet, dashed and variable-width outlines keep their pieces, and a piece + selected on a keyframe stays selected through the tween. + * **Colours:** the Eyedropper's result names the colour it picked with its opacity + (`#rrggbbaa`); `Rgba::to_hex_alpha` is the hex form that reads back as the same colour, + and `to_hex` stays six digits for the exporters (NetterSilver, #233). + * **Never crash:** the length of a vector with components past 1.8e19 is no longer infinite, + so its direction is no longer lost (NetterSilver, #142; taken only out of range, so drawing + costs the same); a private-use language tag such as `x-Arab` is not read as right-to-left + (Hagai Baram, #486). + * **Tests:** SVG path numbers past `f32` are refused (NetterSilver, #130); linked artwork + survives SVG export and re-import with its link sanitised (FredApps, #500). + * **Reliability fixes from the November principal-engineer review** (M8, `docs/reviews/2026-11-principal-review.md`). * **Save is flushed to the disk** before the new file replaces the old one, as the diff --git a/docs/adr/0128-one-work-allowance-and-frames-that-say-what-they-left-out.md b/docs/adr/0128-one-work-allowance-and-frames-that-say-what-they-left-out.md new file mode 100644 index 00000000..14265d37 --- /dev/null +++ b/docs/adr/0128-one-work-allowance-and-frames-that-say-what-they-left-out.md @@ -0,0 +1,119 @@ +# ADR 0128: One allowance of work for a frame and for a player step, and frames that say what they left out + +* Status: accepted (2026-11-21) +* Relates to: `docs/roadmap.md` (P-002), ADR 0024 (the player), ADR 0125 (the backlog), outside + pull request #13, AGENTS.md rule 15 + +## Context + +A symbol may hold instances of other symbols, 32 deep (`MAX_SYMBOL_DEPTH`). That cap stops a +library that refers to itself in a cycle. It does not stop one that doubles: 32 symbols, each +holding two instances of the next, are 2^32 shapes. The editor can't build that by accident, but +a damaged or hostile `.anicraft` or `.fla` can hold it, and "never crash" covers such files. + +Pull request #497 gave one evaluation, and one bounds query, an allowance of 1,000,000 element +visits (`MAX_EVAL_ELEMENTS`). Outside pull request #13 had proposed a budget first and went +further in what it counted. Looking at `main` after #497, four things were still open. + +1. **Work that is not an element visit.** A timeline's layers are looked at on every visit of + its symbol and cost nothing, so a symbol with thousands of empty layers multiplied by + nesting. An outline of a million commands is measured once per bounds query of each instance. + A symbol is found by walking the library, so a library of a hundred thousand symbols + multiplied every lookup. +2. **The player's step.** Test Movie rebuilds the instance tree after every change in a step + (up to 10,000 actions) and evaluates every interactive instance for every pointer event (up + to 256), each with a whole frame's allowance of its own. The tree was capped at 10,000 + instances but looked at every plain element of every one of them for nothing. +3. **Nobody was told.** A frame cut short drew in part and looked like lost artwork. An export + wrote the partial picture and reported success. +4. **Outside PR #13** conflicted with all of it and needed a decision. + +## Decision + +### 1. One unit of work, and what costs more than one + +The allowance stays 1,000,000 units for one evaluation or one bounds query. A unit is one +element or one layer looked at. Two things cost more: + +* a shape costs one more unit for every 256 commands of its outline + (`PATH_COMMANDS_PER_UNIT`), where it is drawn and where it is measured; +* finding a symbol costs one more unit for every 1,024 library entries passed on the way + (`LIBRARY_ENTRIES_PER_UNIT`). + +An ordinary document pays nothing extra: outlines are tens of commands and libraries hundreds of +symbols, and the heaviest benchmark scene (50,000 shapes) uses a twentieth of the allowance. +Once the allowance is spent nothing more is taken from it, so the cut is clean: what was reached +is drawn, the rest is not. + +#13 charged one unit for every library entry passed. That bounds the same hostile case, but an +honest document with 2,000 symbols and 5,000 instances would spend ten times the allowance on +lookups alone and lose artwork. Dividing by 1,024 keeps the bound (a lookup in a library of +100,000 symbols costs about 100 units, so at most 10,000 of them happen) and leaves honest +documents whole. A map from id to symbol would remove the cost altogether; it is a larger change +to the document model and is not needed for the bound. + +### 2. A player step has an allowance of its own + +`MAX_WORK_PER_STEP` is four frames' worth (4,000,000 units). Every rebuild of the instance +tree and every hit test in one `step`, `start` or `input` takes from it, in the same units: the +tree pays for each layer and each element it looks at, and hit tests evaluate from the step's +allowance instead of a fresh one each. When it is spent the step stops as it does when its +action or fuel budget is spent, with one line in the Output panel: + +> Stopped this frame early: the movie holds more than one frame may look at, so some instances +> and buttons were left out (symbols nested in themselves?) + +The queries the shell makes between steps (`tree`, `hit`, `field_at`, `hit_overlay`) each have +one frame's allowance for everything they do; `hit_overlay` used to give every button its own. + +Four frames, not one, because an honest step does look at the movie several times: after a +`gotoAndPlay`, after a button changes state, for a pointer that moved. A movie that needs more +than four full passes in one step is one no machine plays in time. + +### 3. A list that was cut short says so, and so does whoever shows or writes it + +`DisplayList::left_out` is set by every evaluation whose allowance ran out, and kept when lists +are appended (onion skins, the hit-area overlay). It is a plain field of the result: +`evaluate` stays a pure function of the document and the frame. + +* **The stage** says once, in the status bar, as an error that stays: "This frame holds more + artwork than AniCraft draws at once, so some of it is left out. Nothing is lost: look for + symbols nested many times over." It says it again only after a frame that was whole. The + check is skipped while playing, where it would cost an evaluation every frame; the frame + playback stops on is checked. +* **Commands** that write frames still write them, and add `"left_out": true` and a + `"warning"` to their result: `file.export_png`, `file.export_svg`, + `file.export_png_sequence`, `file.export_svg_sequence`, `file.export_sprite_sheet`, + `file.export_gif`, `file.export_apng`, `file.export_webp`, `file.export_video`. A result + without the keys is a whole frame, so nothing that reads results today changes. + `anicraft-cli info` reports it for the frame shown, and the MCP `render` tool says it in the + picture's caption. +* An export is not refused. A partial picture with a warning is more use to someone repairing a + damaged file than no picture, and the warning is in the result an agent or a script reads. + +### 4. What was taken from #13, and what was not + +Taken, as ideas, into the allowance `main` already had: counting layers, symbol lookups and +outline commands, and making exhaustion something a caller can see. Its author is credited in +`AUTHORS.md` and the changelog. + +Not taken: its commits (they rewrite the same functions #497 rewrote, from a base two hundred +commits old); the per-entry lookup charge (above); a public budget type that callers pass in +(no caller outside `anicraft-doc` needs to share one, and the player does it inside the crate); +charging both keyframes of a tween before interpolating (the tweened elements are charged when +they are visited, outline included, which bounds how often the work repeats); and refusing +**Paste** at a point when the clipboard's bounds were cut short (the paste still lands, offset by +the bounds of what was reached, which is the same partial answer every other bounds query gives). + +## Consequences + +* A hostile document costs a bounded amount everywhere it is looked at: about 0.1 s for a frame + or a bounds query and under 0.3 s for a whole player step in a debug build on the development + machine (the tests that build such documents run in 0.07 s to 0.31 s). +* Ordinary documents are unchanged. Evaluating the 50,000-shape stress scene takes 11.7 ms a + frame with the change and 11.9 ms without (release build, best of three; the machine's noise + is larger than the difference). +* `DisplayList` has one more public field. Code that builds one field by field names it. +* Not yet: the same note from the Lottie and HTML exporters and from exporter plug-ins (they + walk the document their own way), a notice inside the Test Movie window when the picture + (and not the step) is cut short, and a count of how much was left out. diff --git a/docs/mcp.md b/docs/mcp.md index c0ddb6fe..256febe9 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -117,6 +117,15 @@ saved command's file) or `{"steps": [{"cmd", "params"}]}` runs the steps as one unlike `anicraft_run_script` a failing step leaves the document as it was. `macro.history` and `macro.save` turn the session's undo steps into a saved command. +## A frame with artwork left out + +A document can hold more than AniCraft draws in one frame (symbols nested many times over, as +in a damaged file): the frame is then drawn in part +([ADR 0128](adr/0128-one-work-allowance-and-frames-that-say-what-they-left-out.md)). The commands +that write frames still write it, and their result has `"left_out": true` and a `"warning"`; +`anicraft_render` says so in the picture's caption, and the document's state has the two keys +for the frame shown. A result without them is a whole frame. + ## Safety * Everything runs through the engine's commands, so params are checked and every edit can be diff --git a/docs/parity.md b/docs/parity.md index 3c898ae4..4580d7df 100644 --- a/docs/parity.md +++ b/docs/parity.md @@ -276,7 +276,7 @@ not this table, says what matters most. | Motion presets: save a tween, apply it elsewhere | **missing** | P-041. | | Copy and paste motion; paste properties | **missing** | P-041. | | 3D properties in a motion tween | **missing** | With the 3D tools (P-044). | -| Shape tweens | **done** | Open: strokes that should follow their fills (outside PR [#238](https://github.com/storytold/anicraft/issues/238), P-011). | +| Shape tweens | **done** | A raw shape's outline morphs with its fill, whatever the number of sides, and rides a motion guide with the fill it edges (an edge two fills share goes with the lower one). | | Shape hints | **done** | [ADR 0023](adr/0023-shape-hints.md). [#82](https://github.com/storytold/anicraft/issues/82) can close. Missing: hints inside a symbol edited in place. | | Shape tween blend (distributive, angular) | **partial** | One blend; no choice?. | | Keep area while tweening | **ours** | [ADR 0115](adr/0115-pen-parity-and-keep-area-tweens.md). | diff --git a/docs/roadmap.md b/docs/roadmap.md index 427deb4a..d4ae6fad 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -44,7 +44,6 @@ the changelog. | Id | Goal | Parity area | Size | Needs | Lane | |---|---|---|---|---|---| | P-001 | AniCraft starts on every supported machine: the launch failures on Windows and Linux graphics drivers ([#164](https://github.com/storytold/anicraft/issues/164), [#158](https://github.com/storytold/anicraft/issues/158), [#207](https://github.com/storytold/anicraft/issues/207), [#268](https://github.com/storytold/anicraft/issues/268), [#421](https://github.com/storytold/anicraft/issues/421), [#342](https://github.com/storytold/anicraft/issues/342); duplicates [#488](https://github.com/storytold/anicraft/issues/488), [#448](https://github.com/storytold/anicraft/issues/448), [#412](https://github.com/storytold/anicraft/issues/412), [#313](https://github.com/storytold/anicraft/issues/313), [#286](https://github.com/storytold/anicraft/issues/286), [#285](https://github.com/storytold/anicraft/issues/285)) each end in a window or a message that says what to do | Preferences, platforms | M | reports' logs | platform | -| P-002 | Nested symbols can't exhaust memory or hang: a work budget on evaluation and bounds (outside PR [#13](https://github.com/storytold/anicraft/issues/13)) | Symbols | S | | doc | | P-003 | A long Brush stroke never freezes the app ([#519](https://github.com/storytold/anicraft/issues/519)): bound the trace and fit, keep the stage responsive while it merges | Tools | M | | stage | | P-004 | Memory and frame time stay flat: 900 MB for a 24-frame move in the web build ([#314](https://github.com/storytold/anicraft/issues/314)), stutter when zoomed in ([#477](https://github.com/storytold/anicraft/issues/477)); a budget test for each | Workspace | M | | render | | P-005 | Free Transform works everywhere: rotation on Windows and FreeBSD ([#479](https://github.com/storytold/anicraft/issues/479)), handles on a skewed symbol ([#117](https://github.com/storytold/anicraft/issues/117)); decide [#193](https://github.com/storytold/anicraft/issues/193) (see outside PR [#218](https://github.com/storytold/anicraft/issues/218)) and write the rule in the guide | Tools | M | | stage | @@ -53,8 +52,6 @@ the changelog. | P-008 | Text reads right: mixed directions (outside PR [#39](https://github.com/storytold/anicraft/issues/39)), then letters from a fallback face (outside PR [#40](https://github.com/storytold/anicraft/issues/40)) | Text | M | [#39](https://github.com/storytold/anicraft/issues/39) before [#40](https://github.com/storytold/anicraft/issues/40) | text | | P-009 | Timeline bugs: a click on the playhead acts on every layer ([#195](https://github.com/storytold/anicraft/issues/195), outside PR [#222](https://github.com/storytold/anicraft/issues/222)), several layers selected with Ctrl and Shift ([#512](https://github.com/storytold/anicraft/issues/512)), the layer count over the header icons ([#523](https://github.com/storytold/anicraft/issues/523)), the mask edge drawn in the layer colour ([#429](https://github.com/storytold/anicraft/issues/429)) | Timeline, layers | S each | | timeline | | P-010 | Panel bugs: empty space in the Movie Explorer ([#513](https://github.com/storytold/anicraft/issues/513)), a side dock that grows under the pointer ([#159](https://github.com/storytold/anicraft/issues/159)), fill and stroke squares that don't answer ([#246](https://github.com/storytold/anicraft/issues/246)), the flicker in [#255](https://github.com/storytold/anicraft/issues/255) | Workspace | S each | | shell | -| P-011 | Shape tweens morph a raw shape's outline with its fill (outside PR [#238](https://github.com/storytold/anicraft/issues/238)) | Tweens | S | | doc | -| P-012 | Small hardening fixes from outside: overflow in `Vec2::length` ([#142](https://github.com/storytold/anicraft/issues/142)), alpha kept by `Rgba::to_hex` ([#233](https://github.com/storytold/anicraft/issues/233)), a test for path numbers past `f32` ([#130](https://github.com/storytold/anicraft/issues/130)), private-use language tags ([#486](https://github.com/storytold/anicraft/issues/486)), a test of SVG link sanitising ([#500](https://github.com/storytold/anicraft/issues/500)) | (robustness) | S each | | several | | P-013 | No hairline between merged curved fills ([#182](https://github.com/storytold/anicraft/issues/182)) | Drawing model | M | | geom | | P-014 | Pen pressure on every desktop: Linux Wayland (outside PR [#320](https://github.com/storytold/anicraft/issues/320)), reports from tablets ([#290](https://github.com/storytold/anicraft/issues/290)) | Tools | M | a tablet to test with | platform | | P-015 | Verified by hand on real machines: the Mac checklist of [ADR 0062](adr/0062-test-movie-window-and-macos-document-opening.md), a hybrid-GPU laptop, passes with Narrator, VoiceOver and Orca ([ADR 0064](adr/0064-accessibility-second-pass.md)), launcher icons on Fedora ([#348](https://github.com/storytold/anicraft/issues/348)) | Accessibility, platforms | M | the machines; the person | platform | @@ -142,16 +139,16 @@ As of 2026-11-20 (27 open): | PR | What | Id | State | What it still needs, or what happened | |---|---|---|---|---| -| [#13](https://github.com/storytold/anicraft/issues/13) | Bound the work of evaluating nested symbols | P-002 | **planned** | Its two review findings are answered. Needs a rebase (it conflicts), its roadmap edit dropped for a changelog entry, and the principal-engineer review. First in line. | +| [#13](https://github.com/storytold/anicraft/issues/13) | Bound the work of evaluating nested symbols | (done) | **superseded by** | The P-002 change ([ADR 0128](adr/0128-one-work-allowance-and-frames-that-say-what-they-left-out.md)), which took its ideas into the allowance `main` already had: layers, symbol lookups and outline sizes count as work, and a frame that ran out says so. Its commits were not merged: they rewrite what [#497](https://github.com/storytold/anicraft/issues/497) rewrote, and its charge of one unit per library entry would cut honest documents with large libraries. Credited in `AUTHORS.md`. | | [#39](https://github.com/storytold/anicraft/issues/39) | Text that mixes directions | P-008 | **planned** | Re-reviewed clean; changes were requested earlier, so it needs a fresh review at the rebased head, and the licence of any new crate checked against `standards/licences.md`. Before [#40](https://github.com/storytold/anicraft/issues/40). | | [#40](https://github.com/storytold/anicraft/issues/40) | Letters from a fallback face | P-008 | **planned** | Builds on [#39](https://github.com/storytold/anicraft/issues/39); rebase onto it once [#39](https://github.com/storytold/anicraft/issues/39) is in. | | [#222](https://github.com/storytold/anicraft/issues/222) | A click on the playhead makes the frame keys act on every layer | P-009 | **planned** | Mergeable and green. Needs a check by hand of the ruler click with a screenshot, since no reviewer ran it. | -| [#238](https://github.com/storytold/anicraft/issues/238) | Morph a shape's stroke with its fill | P-011 | **planned** | Its first fix is on `main`; the rest handles guided tweens and dashed outlines. Needs the open design question answered with pictures: which fill an outline belongs to when outlines join. | -| [#142](https://github.com/storytold/anicraft/issues/142) | `Vec2::length` overflow | P-012 | **planned** | Needs a measured cost: `hypot` is slower than the multiply and `length` is on hot paths. If it shows, scale only inside `normalized`. | -| [#233](https://github.com/storytold/anicraft/issues/233) | Keep alpha in `Rgba::to_hex` | P-012 | **planned** | Needs a rebase and an audit of every caller: SVG, HTML and Lottie writers expect six digits and carry alpha themselves. | -| [#130](https://github.com/storytold/anicraft/issues/130) | Reject SVG path numbers past `f32` | P-012 | **planned** | Now a test only; ready after a rebase check. | -| [#486](https://github.com/storytold/anicraft/issues/486) | Hebrew font, `iw`, right-to-left preparation | P-012, P-034 | **planned** | Most of it came in with [#496](https://github.com/storytold/anicraft/issues/496). What is left (private-use tags are not right-to-left) is small and ready. | -| [#500](https://github.com/storytold/anicraft/issues/500) | A test of SVG link sanitising and re-import | P-012 | **planned** | A draft. Ready when its author marks it so. | +| [#238](https://github.com/storytold/anicraft/issues/238) | Morph a shape's stroke with its fill | (done) | **superseded by** | Merged with its commits in the P-011 change. The design question is answered with pictures there: a stroke run belongs to the fill whose edge its middle lies on, and an edge two fills share goes with the lower one. On top of it, a guided shape tween now joins the runs even when both keys have as many. | +| [#142](https://github.com/storytold/anicraft/issues/142) | `Vec2::length` overflow | (done) | **superseded by** | Merged with its commit in the P-012 change, then narrowed after measuring: `hypot` alone cost 1.9 ns against 0.83 ns a call, so it is taken only where the squares leave `f32` (0.85 ns, the same results in range). | +| [#233](https://github.com/storytold/anicraft/issues/233) | Keep alpha in `Rgba::to_hex` | (done) | **superseded by** | Merged with its commit in the P-012 change, as a function of its own: `to_hex` keeps its six digits for the SVG, HTML and Lottie writers (as merged, the four callers that add their own alpha digits would have written ten), and `to_hex_alpha` is the form that reads back. The Eyedropper's result uses it. | +| [#130](https://github.com/storytold/anicraft/issues/130) | Reject SVG path numbers past `f32` | (done) | **superseded by** | Merged with its commit in the P-012 change (the test). | +| [#486](https://github.com/storytold/anicraft/issues/486) | Hebrew font, `iw`, right-to-left preparation | (done) | **superseded by** | The rest (private-use tags are not right-to-left) is merged with its commits in the P-012 change; the Hebrew face and `iw` came in with [#496](https://github.com/storytold/anicraft/issues/496). P-034 stays open for laying out right to left. | +| [#500](https://github.com/storytold/anicraft/issues/500) | A test of SVG link sanitising and re-import | (done) | **superseded by** | Merged with its commits in the P-012 change, without the two lines it only reformatted. It is the one test that linked artwork survives export and re-import. | | [#320](https://github.com/storytold/anicraft/issues/320) | Pen pressure on Linux Wayland | P-014 | **planned** | Needs a rebase, platform code kept in `src/platform.rs` with no `unsafe`, the licences of its X11 crates checked, and a test by hand with a tablet. | | [#336](https://github.com/storytold/anicraft/issues/336) | Raw pressure-sensitive ink | P-028 | **planned** | After P-003, so a long stroke is bounded first. Needs a rebase and a new ADR number (0096 is taken; ask for one to be reserved). | | [#394](https://github.com/storytold/anicraft/issues/394) | Studio theme, canvas turn, Ctrl+Space zoom | P-029, P-046 | **planned, in parts** | Three things in one PR, 75 files. Needs to be split: the view turn and the zoom key each as their own PR (P-029), and the palette as a theme file for [ADR 0117](adr/0117-user-themes-from-a-folder.md) instead of a built-in theme (P-046). | @@ -253,7 +250,7 @@ This integration depends on craft-libs #1962 and still requires hosted parity va | Data-driven animation | **Data tables that drive animation, first slice** (ADR 0118, #416, #417, #418): numeric **tables kept in the document** as Library items, imported from **CSV, TSV or JSON** (File › Import › Import Data Table; through craft-csv; named columns, gaps, text-only columns left out and reported, a row per frame or a **key column** for a row per keyed time; 256 tables, 100 000 rows, 1 000 000 cells, files up to 32 MB; hostile input refused or cut to the limits), a **table viewer**, **Import Again** that keeps every binding; **bindings** that let a column drive a symbol instance's **X, Y, Scale X, Scale Y, Rotation, Alpha** or **the frame a graphic shows** over a span of frames, with scale, offset, linear or step interpolation and reversed key ranges, edited live in Properties › Data and evaluated purely in `evaluate` (stage, oracle, GPU stage, Test Movie and every export that draws frames agree); **Bake to Keyframes** (every frame looks as it did); `data.*` commands headless, over the CLI and MCP, and for plug-ins (all but reading a file). Not yet: bindings that follow copy, paste and duplicate; baking inside a motion tween and a Lottie export warning for live bindings; editing cells in the viewer, adding and renaming columns; text columns for captions; binding skew, tint, filter values, shapes, text and group members; expressions; audio amplitude into a table. | | Find & navigation | **Find and Replace, and the Movie Explorer, first slice** (ADR 0058): Edit › Find and Replace (Ctrl+F) finds text (text fields, frame labels, layer and instance names, frame scripts; match case, whole word, regular expressions on a linear-time engine), fonts, colours, symbols, sounds and bitmaps, in this scene with its symbols or the whole document; results as you type; F3 / Shift+F3 go there, opening symbols in place; Replace, and Replace All as one undo step that asks above 100 places. Window › Movie Explorer (Alt+F3), beside the Library: scenes › layers › keyframes › instances (into their symbols), text, sounds, bitmaps and scripts, symbol definitions, Show filters and search, double-click to go there. Headless `find.search`, `find.replace`, `find.goto`, `explorer.tree`. Not yet: action parameters, ActionScript strings apart from code, font size and style, colour tolerance, renaming in the explorer. | | Tests | 133 tests (adds point editing, closed-path anchors, curve fitting, pen/pencil/subselection commands, the Pen's path data, frame ranges, keyframe moves, range confirmations, frame selection and the frame clipboard): unit, analytic render, band/determinism, robustness fuzz over all commands, round trip (v1 and v2 files), structural sharing and history budget, render-service equivalence, confirmations, clipboard, transforms and align, GIF decode and timing, free-transform maths, UI-guideline enforcement, CLI. | -| Ease of use & safety | **Visual language** (ADR 0008, revised): graphite palette, corners by role (square structure, softened controls, rounder menus and dialogs with soft depth), borders only between layout regions, flat buttons with a visible focus ring, vibrant timeline blocks (mint artwork, violet tweens), sentence-case headings, **collapsible sections with rules** (Preferences, Properties, dock, shortcut sheet), **Lucide icons** stroked as vectors via a new full SVG path reader; click targets ≥ 28 px (tools 40, rows 28, toggles 24); palette contrast, target sizes and "no raw colours or radii" are enforced by tests. Product principles written (`docs/product-principles.md`). Tiered destructive-action confirmations, enforced in the engine (ADR 0004). Unsaved-changes guard on close/new/open. **Crash-recovery autosave** (ADR 0015): unsaved work is copied in the background (every minute or 25 changes by default; Preferences › Files › Autosave, with an off switch) to `Recovery` in the settings folder, atomically and never over the user's file; an OS file lock per running window tells crashed sessions from open ones; the next start offers what was left behind in a non-blocking window (Restore as unsaved work with its original path, Discard with a second click, Later; File › Recover Autosaved Documents… brings it back); saves and clean exits remove the copy; headless `file.recovery_list/recover/discard_recovery/autosave`. Not yet: several open documents, older copies, the undo history. Overwrite checks for saves and exports. "Ctrl+Z to undo" hints. Command palette (Ctrl+K). Shortcut sheet (F1). Right-click menus on stage, frames and layers. Save As (Ctrl+Shift+S). **Shortcut editor** (F1): every menu command, tool and view key can be rebound, given extra keys or unbound; recording asks before taking a key from another action, reserved keys (palette, editor, Preferences, quit, play, Esc, Space, Tab) stay fixed, per-action and global reset; only the changes are saved in preferences, so untouched actions follow new defaults; menus, tooltips and the palette show the keys in effect. | +| Ease of use & safety | **Visual language** (ADR 0008, revised): graphite palette, corners by role (square structure, softened controls, rounder menus and dialogs with soft depth), borders only between layout regions, flat buttons with a visible focus ring, vibrant timeline blocks (mint artwork, violet tweens), sentence-case headings, **collapsible sections with rules** (Preferences, Properties, dock, shortcut sheet), **Lucide icons** stroked as vectors via a new full SVG path reader; click targets ≥ 28 px (tools 40, rows 28, toggles 24); palette contrast, target sizes and "no raw colours or radii" are enforced by tests. Product principles written (`docs/product-principles.md`). Tiered destructive-action confirmations, enforced in the engine (ADR 0004). Unsaved-changes guard on close/new/open. **Crash-recovery autosave** (ADR 0015): unsaved work is copied in the background (every minute or 25 changes by default; Preferences › Files › Autosave, with an off switch) to `Recovery` in the settings folder, atomically and never over the user's file; an OS file lock per running window tells crashed sessions from open ones; the next start offers what was left behind in a non-blocking window (Restore as unsaved work with its original path, Discard with a second click, Later; File › Recover Autosaved Documents… brings it back); saves and clean exits remove the copy; headless `file.recovery_list/recover/discard_recovery/autosave`. Not yet: several open documents, older copies, the undo history. Overwrite checks for saves and exports. "Ctrl+Z to undo" hints. Command palette (Ctrl+K). Shortcut sheet (F1). Right-click menus on stage, frames and layers. Save As (Ctrl+Shift+S). **Shortcut editor** (F1): every menu command, tool and view key can be rebound, given extra keys or unbound; recording asks before taking a key from another action, reserved keys (palette, editor, Preferences, quit, play, Esc, Space, Tab) stay fixed, per-action and global reset; only the changes are saved in preferences, so untouched actions follow new defaults; menus, tooltips and the palette show the keys in effect. **Documents too large to draw** ([ADR 0128](adr/0128-one-work-allowance-and-frames-that-say-what-they-left-out.md)): a frame, a bounds query and a Test Movie step each have an allowance of work that no nesting of symbols gets past; a frame cut short says so in the status bar, in the results of the commands that write frames, in `info` and in the MCP picture's caption. Not yet: the same note from the Lottie and HTML exporters and exporter plug-ins, a notice inside the Test Movie window when its picture is cut short, how much was left out. | | Platforms & preferences | ADR 0006 platform layer: ⌘ shortcut labels and an AniCraft app menu with a unified title bar on macOS; Exit and Preferences (Ctrl+U) on Windows and Linux; native file dialogs (XDG portal on Linux, with a fallback switch); wgpu with automatic OpenGL fallback; per-OS settings folder. **Web editor, first slice** (ADR 0036, `docs/web.md`): the same program built for `wasm32-unknown-unknown` runs in a browser (WebGL2), built by `scripts/build-web.sh`/`.ps1` with the wasm-bindgen CLI into `web/` (8973 KB, 3278 KB gzipped). Open and import with the browser's file picker; save and export as downloads (the engine reads and writes through `engine::vfs`, memory in the browser). Autosave and preferences in browser storage, with Web Locks so only closed or crashed tabs' work is offered. Leaving with unsaved work asks first. Every crate builds for wasm32 in CI, and the engine's tests run inside WebAssembly in Node. Not yet: a browser-verified run, sound (Web Audio), the GPU stage on WebGPU, video export, plug-in installs, PNG sequence as one zip, IndexedDB for large autosaves, threads, hosting. **Preferences** window: theme (Follow system, Dark (Graphite), Light or High contrast; ADR 0077), interface and data fonts (bundled default or any installed font), interface scale (75–200 %), stage render mode, file dialogs, reset confirmations. Edits render live (fixed the missing-repaint bug). **CI on macOS and Windows** (ADR 0067): every code PR builds, tests and lints the workspace on macOS (arm64) and Windows (x64) runners besides Linux. Not yet: native macOS NSMenu, Linux arm64 and Windows ARM64 test legs on PRs, a GPU runner. Verified by hand on Windows only so far. **Robust start-up** (#207): the window opens through a list of ways (the one chosen in Preferences › Stage › Window graphics or `--renderer gl|wgpu|vulkan|dx12|metal`, then wgpu automatic, DirectX 12 on the low-power GPU on Windows, OpenGL), falling through on an error or a panic; a start that died inside a driver tries that way last for the next five starts, then 25 and 100 if it dies again (#335, ADR 0105); stage work on the window's device is submitted only inside a frame, which removes the `Surface::configure` "Failed to wait for GPU to come idle" error behind 0.2.1 closing at start-up and on resizing (#264, #309; ADR 0105); a start-up log (`Logs/anicraft.log` in the settings folder, the previous run's kept) records each way, the adapter and driver, panics and slow starts; a system message names it when nothing works. Not yet: verified on a hybrid-GPU laptop, the log from the Help menu, restarting by itself when a driver hangs at start-up. | | Installers & release | **Packaging** (ADR 0026, `docs/release.md`): the Craft family's `packaging/` layout behind the shared release workflow. Windows MSI (x64, arm64; per-user by default, everyone on request, upgrades in place), portable and symbols zips; macOS universal DMG with a laid-out window and CLI zip; Linux AppImage, deb, rpm, tar.gz, Flatpak and Arch (x86_64, aarch64; riscv64 deb/rpm/tar). `.anicraft` opens AniCraft by default; `.fla`/`.xfl` offered under Open with. Signed and notarized on the `release` branch (missing secrets fail it), unsigned elsewhere; ends in a draft release. Packaging lint and a fixture WiX build guard PRs; `src/packaging_tests.rs` keeps ids and types in step. **Opening documents on macOS** (ADR 0062): a double-click in Finder, a drop on the Dock icon or Open With opens the document, at launch or while running (the open-documents Apple Event through `platform.rs`, by `fmv-macos-events`, so no `unsafe` of ours), through the unsaved-changes guard; the Dock's Quit asks to save too; Windows and Linux command-line hand-over covered by a test. **Portable mode and AppImage desktop integration** (ADR 0094): an `anicraft-portable` marker (shipped in the Windows zip and the Linux tar.gz; also honoured beside `AniCraft.app` and an `.AppImage`) keeps preferences, autosave, logs, plug-ins, templates, recent files, brushes, filter presets and workspaces in `data/` beside the app, through one switch in `platform.rs`, falling back visibly when that folder can't be written; Preferences › About shows the mode and every folder; on first start from an AppImage a non-modal card offers once to add AniCraft to the applications menu (`desktop.integrate/remove/status`: desktop entry with a quoted `Exec`, MIME types and icons under `$XDG_DATA_HOME` only, idempotent, removable from About, following a moved or updated AppImage); a store-readiness job checks the Flatpak manifests, AppStream (`appstreamcli validate`), the desktop entry and any winget/MSIX manifests. Not yet: verified on a Mac (the checklist is in ADR 0062), a single running AniCraft taking a second document on Windows and Linux, store submissions and winget/MSIX manifests, self-update inside a portable copy, video export inside the Flatpak. | | Documentation | **User guide, first slice** (ADR 0069, `docs/guide/`): eighteen chapters for artists (getting started to troubleshooting, and Coming from Animate), a command reference and a shortcut reference (Windows/Linux and macOS) generated from the registry and checked for freshness by tests, every link, anchor and picture checked, eight screenshots from `scripts/guide-shots.sh`. Help › User Guide opens the book bundled in the app, offline, in the browser; the web build serves it beside the editor; `anicraft-cli guide --out ` writes it. Not yet: translated guides, search, a PDF edition, context help from panels, macOS and Linux screenshots. |