-
Notifications
You must be signed in to change notification settings - Fork 7
feat: implement user properties synchronization in slow sync [WPB-23463] #3862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
feat: implement user properties synchronization in slow sync [WPB-23463] #3862
Conversation
|
| Branch | mo/feat/sync--read-receipts-and-typing-indicator |
| Testbed | ubuntu-latest |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | microseconds (µs) |
|---|---|---|
| com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFiles | 📈 view plot | 693.12 µs |
| com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory | 📈 view plot | 468,143.31 µs |
| com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark | 📈 view plot | 1,352,345.18 µs |
| com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark | 📈 view plot | 21,548.66 µs |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #3862 +/- ##
===========================================
+ Coverage 59.71% 59.77% +0.05%
===========================================
Files 1902 1903 +1
Lines 59535 59637 +102
Branches 6463 6489 +26
===========================================
+ Hits 35550 35646 +96
+ Misses 21013 21003 -10
- Partials 2972 2988 +16
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
69ee398 to
6356464
Compare
…eceipts, typing indicator, and screenshot censoring
f840d16 to
e7adc3a
Compare
|
|
@claude review |
Pull Request Review: User Properties Synchronization in Slow SyncStatus: ✅ Approved with minor suggestions SummaryThis PR implements a comprehensive solution for syncing user properties (read receipts, typing indicator, screenshot censoring) during the slow sync flow. The implementation is well-structured with proper error handling, good test coverage, and follows the project's architectural patterns. Strengths1. Architecture & Design ⭐
2. Robust Error Handling ⭐
3. API Design ⭐
4. Test Coverage ⭐
Issues & Suggestions1. Minor: Inconsistent Property Semantics 🟡The typing indicator has inverted semantics compared to read receipts and screenshot censoring:
Location:
While this is likely intentional (backend quirk), it could be confusing for future maintainers. Consider adding a comment explaining why typing indicator works differently. 2. Potential Bug: Fallback Chain Behavior 🔴Location: In Current behavior: syncReadReceipts()
.flatMap { syncTypingIndicator() } // Won't run if syncReadReceipts fails
.flatMap { syncScreenshotCensoring() } // Won't run if either above failsQuestion: Should individual property sync failures stop the entire fallback chain, or should each property be attempted independently? Suggested fix (if independent syncing is desired): private suspend fun syncUsingFallbackCalls(): Either<CoreFailure, Unit> {
// Attempt all syncs independently and combine results
val results = listOf(
syncReadReceipts(),
syncTypingIndicator(),
syncScreenshotCensoring()
)
// Return first failure or success if all succeeded
return results.firstOrNull { it.isLeft() } ?: Either.Right(Unit)
}However, since the slow sync worker already ignores failures from the entire user properties sync step, this may be acceptable as-is. Just wanted to raise it for consideration. 3. Code Quality: Magic Numbers 🟡Location: Multiple files The property value encoding (0=disabled, 1=enabled) is scattered throughout without constants:
Suggestion: Define constants for clarity: private const val PROPERTY_ENABLED = 1
private const val PROPERTY_DISABLED = 04. Documentation: Missing KDoc 🟡The new interfaces and functions lack KDoc comments explaining:
Suggestion: Add KDoc to at least the public repository interfaces. Security Considerations✅ No security issues identified
Performance Considerations✅ Performance improved
Testing RecommendationsBefore merging, verify:
Detailed Code Review Notes
|



https://wearezeta.atlassian.net/browse/WPB-23463
PR Submission Checklist for internal contributors
SQPIT-764What's new in this PR?
Issues
Solutions
GET /properties-values.{ "WIRE_TYPING_INDICATOR_MODE": ..., ... }UserPropertyRepositorybackend property APIs:setProperty(WIRE_SCREENSHOT_CENSORING_MODE, 1)deleteProperty(WIRE_SCREENSHOT_CENSORING_MODE)Needs releases with:
Testing
How to Test
GET /properties-valuesand local update of:setcall.deletecall.PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors