figcraft/docs
bflatastic 1caf771e82 M8: comments and version history behaviour suite and fixes
A behaviour suite for comments and version history written from the public documentation
(`crates/engine/src/history_behaviour_tests.rs`, 15 tests, about 80 table rows plus stepwise checks),
each row with a one-line derivation; where the documentation is silent the row says so and pins
today's behaviour. 4 of the 15 tests failed on the old code. Fixes, all in shared engine code:

- **Live sessions: comment threads made in the session couldn't be used.** Their ids come from the
  creator's id space (e.g. 4294967297) and every thread command (`comment.reply`, `edit`, `react`,
  `resolve`, `move`, `delete`, `markRead`, `open`, `link`) refused them as "out of range".
  Comment ids are now parsed as ids, not small indexes.
- **Restoring a version lost newer comments.** Comments are a conversation about the file, kept
  apart from its design history: restoring now keeps the current comments; a comment on a layer
  the version doesn't have stays where it was (on the nearest surviving parent, or the canvas).
- **Restoring now keeps the replaced design in the history** as an autosave first, unless a
  version of it was just saved or restored (so work isn't only in the session's undo history).
  The checkpoint marker is now "none yet" for a freshly opened file and compares contents when
  normalising copied the document.
- **A titled autosave becomes a named version** (`version.rename` clears `auto`), so it is no longer
  dropped when autosaves make room.
- **Merging a branch adds to the main file's history:** the main file as it was (an autosave,
  when it changed since its last version), then `Merged “<branch>”`.
- `version.restore` refuses up front for a view-only live session (nothing goes into the history).

Pinned where the documentation is silent: pins go to the innermost frame under them (not to a
leaf layer); copies, duplicates and duplicated pages come without comments; replying reopens a
resolved thread; only authors delete their messages (no accounts); stepping past the last thread
stays on it; comments show on the canvas by default; versions stay with whoever saved them in a
live session.

`crates/engine/src/collab_live_tests.rs`: the test `Room` is `pub(crate)` so the suite can run a
live session. `crates/engine/src/cmd/props.rs`: one line reformatted by `cargo fmt` (it was
unformatted on the base, which failed the fmt check). `crates/render/src/effects_behaviour_tests.rs`:
the paint suite expected an offset drop shadow to grow the export on every side, but the later export
suite made exports grow only where the shadow falls (40 x 50 for a shadow 10 down); the base failed
the gate on it, so the expectation now says "grows" (wider or taller). No new commands.

Docs: collaboration-parity, target-app-parity (area 16 85%/60% -> 85%/62%, 2-5 h -> 2-4 h; full
parity ~306-595 h -> ~306-594 h; percentages unchanged at this rounding), ROADMAP (also corrects the
stale area 16 row, 80%/58%/4-8 h), gaps (gap 4's landed list), mcp.md.
2026-10-12 02:09:10 +07:00
..
brand M0.1-M0.3: workspace, licences, geom/color/doc crates 2026-10-09 12:01:57 -04:00
architecture.md M8: Windows QA fixes (#131) 2026-10-11 18:20:38 +07:00
auto-layout-parity.md M2: auto layout behaviour suite and fixes (#130) 2026-10-11 17:53:11 +07:00
cli.md M6: .fig import (best effort) (#132) 2026-10-11 18:59:59 +07:00
collab-protocol.md M9: hosting figcraft-server: wss in the desktop app, server releases, deployment guide (#125) 2026-10-11 15:52:27 +07:00
collaboration-parity.md M8: comments and version history behaviour suite and fixes 2026-10-12 02:09:10 +07:00
components-parity.md M3: styles and variables behaviour suite and fixes 2026-10-12 00:57:43 +07:00
contributors.md About: Contributors and Models tabs with full credits; bump version to 0.2.0 (from 0.1.0) for release 2026-10-09 21:10:33 -04:00
control-protocol.md M4: shapes and vector behaviour suite and fixes 2026-10-12 01:32:04 +07:00
dev-mode-parity.md M7: export and inspect behaviour suite and fixes 2026-10-12 01:32:04 +07:00
file-format-parity.md M7: export and inspect behaviour suite and fixes 2026-10-12 01:32:04 +07:00
gaps.md M8: comments and version history behaviour suite and fixes 2026-10-12 02:09:10 +07:00
hardware-parity.md M8: Windows QA fixes (#131) 2026-10-11 18:20:38 +07:00
localization-parity.md M7: localization layer (#128) 2026-10-11 16:21:16 +07:00
mcp.md M8: comments and version history behaviour suite and fixes 2026-10-12 02:09:10 +07:00
parity-checklist.md M5: Display P3: gamut warning and soft-proof sRGB (#127) 2026-10-11 17:20:10 +07:00
plugins.md M7: plugin panels and settings (#124) 2026-10-11 14:45:19 +07:00
prototyping-parity.md M5: prototyping behaviour suite and fixes 2026-10-12 00:57:43 +07:00
release-playbook.md M0.9: MCP server + figcraft-cli, PDF export, web app, release/CI packaging, vector edit mode, workspace lint cleanup 2026-10-09 13:31:53 -04:00
releasing.md M9: hosting figcraft-server: wss in the desktop app, server releases, deployment guide (#125) 2026-10-11 15:52:27 +07:00
roadmap.md M5: prototyping behaviour suite and fixes 2026-10-12 00:57:43 +07:00
server.md M9: hosting figcraft-server: wss in the desktop app, server releases, deployment guide (#125) 2026-10-11 15:52:27 +07:00
target-app-parity.md M8: comments and version history behaviour suite and fixes 2026-10-12 02:09:10 +07:00
translating.md M7: localization layer (#128) 2026-10-11 16:21:16 +07:00
ui-parity.md M1: canvas navigation, guides and grids behaviour suite and fixes 2026-10-12 01:32:04 +07:00