Repository navigation
feat(ios-sdk): surface app data change callbacks and the update guard - #4015
Conversation
|
Claude finished @tylerhawkes's task —— View job Code Review CompleteReview Date: August 19, 2026, 4:40 PM UTC This PR surfaces app data change callbacks and compare-and-swap guards on the iOS SDK. The implementation is well-structured and follows the existing patterns in the codebase. FeedbackCode Quality and Best Practices ✅Strong points:
Minor suggestions:
Security Concerns ✅No security issues identified:
Performance Considerations
|
ApprovabilityVerdict: Skipped Macroscope did not run approvability analysis for this PR. Diff is too large for automated approval analysis, so this PR cannot be approved automatically. Not approved because:
You can add or adjust custom eligibility rules. Learn more. |
a92b803 to
5731d8d
Compare
a9e0194 to
7133b25
Compare
7133b25 to
726f4a7
Compare
5731d8d to
55cefed
Compare
726f4a7 to
b97f799
Compare
55cefed to
b364f55
Compare
Dismissing prior approval to re-evaluate b97f799
b364f55 to
69ad642
Compare
b97f799 to
2c3c282
Compare
69ad642 to
a8f796e
Compare
2c3c282 to
89013da
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## tyler/appdata-cb-mobile #4015 +/- ##
==========================================================
Coverage ? 85.92%
==========================================================
Files ? 419
Lines ? 68292
Branches ? 0
==========================================================
Hits ? 58681
Misses ? 9611
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
89013da to
ef3d258
Compare
f7a9599 to
f70bd28
Compare
f70bd28 to
cce6731
Compare
ef3d258 to
ee56410
Compare
ee56410 to
15ced4b
Compare
Dismissing prior approval to re-evaluate 15ced4b
Stack
Merge bottom-up — each PR is based on its parent below.
Android is the priority path: #4019 → #4011 → #4012 → #4016.
IntentState::Superseded(base:main)Already merged: #4018 (proto regen). Related follow-up, independent of this stack: #4020.
Surfaces the unstable app-data change callback on the iOS SDK.
Public surface
unstableChangeCallbacksdefaults tonil, so this is source-compatible for every existing caller.AppDataChangeHandleris an SDK-level protocol taking anAppDataChangewith a hexgroupId;FfiAppDataChangeHandlerBridgeadapts it to the generated FFI protocol soFfiAppDataChangestays out of the public surface.UnstableChangeCallbacks.toFfi()returnsnilwhen nothing is registered, so a client that does not use this never pays for the before/after snapshot on the message-processing path.The identity-probe client in
prepareClientpassesnilexplicitly — it never processes messages, so there is nothing to notify about.About the xmtpv3.swift diff
sdks/ios/Sources/XMTPiOS/Libxmtp/xmtpv3.swiftis generated by./dev/bindingsand checked in. Regenerating it to pick up the new types also pulled in ~680 lines of unrelated whitespace and formatting churn, because the committed copy was generated by an older uniffi-bindgen than the one the flake currently pins.That churn is not hand-written. CI runs
just ios test, which runs./dev/bindingsand regenerates this file from the same pinned flake, so it produces the same output — the committed copy was simply stale. Reviewers should read theFfiAppDataChange/FfiAppDataChangeCallback/FfiUnstableChangeCallbacksadditions and thecreateClientsignature, and can ignore the reformatting.🤖 Generated with Claude Code
https://claude.ai/code/session_01AdY7WKkNbJmdzpmUWvW1my
Note
Add app data change callbacks and compare-and-swap guard to iOS and Android SDKs
UnstableChangeCallbacksto iOS and AndroidClientOptions, allowing apps to register async handlers that fire with before/after values when a group'sapp_datafield changes after a commit.Group.updateAppDataon both platforms to accept an optionalexpectedAppDataparameter, implementing compare-and-swap (CAS) semantics: the update is abandoned with aAppDataSupersedederror if the committed value has changed since the caller last read it.UnstableChangeCallbacks,AppDataChangeCallback, and a newSupersededintent state; callbacks are dispatched after group locks are released to avoid deadlocks.changeCallbacksparameter into thecreateClientFFI function in the mobile bindings with a UniFFI default so existing call sites are unaffected.AppDataSupersededis classified as retryable, so guarded writes that lose a race will be retried automatically; callers should be aware of retry semantics when using the CAS guard.📊 Macroscope summarized 15ced4b. 22 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted
🗂️ Filtered Issues
No issues evaluated.