fix(ffi): atomic compound outline edits, validated anchors, shared graph

- indent, outdent and merge run in one Graph::transaction, so a failure
  part-way no longer duplicates merged text or strands siblings.
- Placements check that the anchor block exists and is on the target page.
- SynapseGraph holds Arc<Mutex<Graph>> and exposes shared() (not bridged)
  for the sync client.
- docs: rustup's cargo must come first in PATH; sync wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Opus 5.5 committed 2026-10-21 14:38:36 +02:00
1 parent 3266ddda3a
commit 268e152efc
5 files changed
+208 -49

No files matched your search

+6 -2
View File
@@ -14,8 +14,12 @@
switcher, shell), `theme/`.
## Toolchain
- Flutter stable (3.47+) on `PATH`, Rust stable, `cargo install flutter_rust_bridge_codegen
--version 2.13.0 --locked`.
- Flutter stable (3.47+) on `PATH`, Rust stable via rustup, `cargo install
flutter_rust_bridge_codegen --version 2.13.0 --locked`.
- rustup's `~/.cargo/bin` must come **before** `/usr/bin` in `PATH`. Fedora's packaged `cargo`
(rust 1.99) cannot reuse artifacts built by rustup's toolchain (1.97) and cargokit picks up
whichever `cargo` is first: `export PATH="$HOME/.cargo/bin:$PATH"` (check with
`cargo --version`), or remove the distro `cargo`/`rust` packages.
- Linux desktop: `clang cmake ninja-build gtk3-devel` (Fedora) / `clang cmake ninja-build
libgtk-3-dev` (Debian/Ubuntu).
- Android: Android SDK + NDK (cargokit installs the Rust targets with rustup).
+3 -1
View File
@@ -79,7 +79,9 @@ sync on SSE hint, when ops are pending or when due; on failure exponential backo
with jitter); "offline" (connect/timeout errors) never loses edits, they stay pending. Call
`trigger()` after local edits to sync without waiting for the poll.
The graph is shared as `Arc<Mutex<Graph>>`; the client locks it only for short DB steps.
The graph is shared as `Arc<Mutex<Graph>>`; the client locks it only for short DB steps. In the
app, `synapse_ffi::api::graph::SynapseGraph::shared()` returns that same `Arc` to build a
`SyncClient` next to the FFI handle.
## Limits / not in v1
- Per-user tokens and per-graph ACLs: `auth::Principal` already carries a graph allow-list;