Skip to content

feat: MarkerInfo OR-Set facade + deleteDocument + delete-event visibility#21

Merged
kitplummer merged 1 commit into
mainfrom
feat/markers-and-delete
Jul 6, 2026
Merged

feat: MarkerInfo OR-Set facade + deleteDocument + delete-event visibility#21
kitplummer merged 1 commit into
mainfrom
feat/markers-and-delete

Conversation

@kitplummer

Copy link
Copy Markdown
Collaborator

Summary

Closes #2 (MarkerInfo OR-Set) and #3 (Delete operation).

  • Facade: putMarker(MarkerInfo), markers getter, and generic deleteDocument(collection, docId) on PeatFlutterNode; MarkerInfo added to public API exports
  • Example app: Markers card in Operations tab — drop pin (random DC-area coords), swipe-to-soft-delete (tombstone with deleted: true), live refresh on change events
  • Activity tab: Hard-delete events (ChangeType.delete with raw == null) now surface with a (deleted) preview and red pill, instead of being silently discarded
  • Tests: marker_info_test.dart (12 tests — JSON round-trip, copyWith, equality, soft-delete filtering) and delete_event_test.dart (5 tests — ChangeType codec, delete vs upsert distinction, remote delete origin)

Test plan

  • flutter test — all 23 tests pass (12 marker + 5 delete + 6 existing)
  • dart analyze — no errors (info-only pre-existing deprecation warnings)
  • CI native build (arm64) passes
  • Manual: start node, drop markers via + button, verify they appear in list, swipe to delete, confirm tombstone propagates (marker disappears from live list, change shows in Activity tab)

…lity (#2, #3)

Expose putMarker/getMarkers/MarkerInfo and generic deleteDocument on the
PeatFlutterNode facade. Add Markers card to the Peat Water demo
(Operations tab) with drop-pin and swipe-to-soft-delete. Fix Activity
tab to surface hard-delete events instead of silently discarding them.
@kitplummer kitplummer requested a review from a team as a code owner July 6, 2026 16:23

@peat-bot peat-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peat QA Review (SHA: a2073da)

No findings.

Scope check — pure Dart facade + example wiring; no changes to native surface, FFI encode/decode paths, rust/Cargo.toml (still peat-ffi = "=0.2.10"), or platform build scripts. MarkerInfo, putMarker, getMarkers, and deleteDocument were already present in the generated lib/src/generated/peat_ffi.dart (native symbols uniffi_ffibuffer_peat_ffi_fn_method_peatnode_{put_marker,get_markers,delete_document} all resolve), so bindingsContractVersion=30 remains valid — the facade methods added in lib/src/peat_node.dart are thin pass-throughs. Public API export (lib/peat_flutter.dart) correctly adds MarkerInfo.

Behavioral notes verified:

  • Marker soft-delete is a putMarker with deleted:true — CRDT-safe tombstone as ADR-035 requires (peat-mesh does not yet propagate ChangeEvent::Removed).
  • Hard-delete events (ChangeType.delete, raw==null) now render with (deleted) preview + red pill; upsert path unchanged and still content-hash-deduped.
  • Test coverage: marker_info_test.dart (JSON round-trip, copyWith with nullable sentinel, equality, soft-delete filtering) and delete_event_test.dart (ChangeType codec + delete/upsert distinction + remote-origin preservation) are pure-Dart and require no native lib; native round-trip is validated by the existing native-linux-arm64 CI job and just check-bindings.
  • No security primitive, protocol/schema, cross-platform build, or FFI memory-safety surface touched.

@kitplummer kitplummer merged commit 129c74c into main Jul 6, 2026
9 checks passed
@kitplummer kitplummer deleted the feat/markers-and-delete branch July 6, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: MarkerInfo OR-Set — collaborative map pins with deletion

2 participants