Skip to content

refactor(time): reduce internal date conversions PR 6 [WPB-10090] - #4339

Open
MohamadJaara wants to merge 4 commits into
developfrom
mo/improve-internal-time-handling
Open

refactor(time): reduce internal date conversions PR 6 [WPB-10090]#4339
MohamadJaara wants to merge 4 commits into
developfrom
mo/improve-internal-time-handling

Conversation

@MohamadJaara

@MohamadJaara MohamadJaara commented Jul 24, 2026

Copy link
Copy Markdown
Member

https://wearezeta.atlassian.net/browse/WPB-10090

Small cleanup to keep a few more timestamps typed as Instant internally and avoid repeated formatting/parsing.

  • uses Instant for conversation status refs, server time, and subconversation epoch time
  • formats reaction timestamps once
  • removes the unused Android DateTimeFormatter path

No DB migration is needed. Callers passing a custom conversation status timestamp should now pass an Instant.

Stacked on #4338.

Checks: Logic and Persistence JVM tests, Detekt, ABI check, and the Android core:util compile.

@MohamadJaara MohamadJaara changed the title refactor(time): reduce internal date conversions PR 6 refactor(time): reduce internal date conversions PR 6 [WPB-10090] Jul 24, 2026
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit f0abeb4. ± Comparison against base commit fa069a5.

♻️ This comment has been updated with latest results.

@MohamadJaara
MohamadJaara marked this pull request as ready for review July 24, 2026 16:30
@codecov-commenter

codecov-commenter commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.47059% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.23%. Comparing base (fa069a5) to head (f0abeb4).

Files with missing lines Patch % Lines
...in/com/wire/kalium/logic/data/event/EventMapper.kt 16.66% 1 Missing and 4 partials ⚠️
...ersistence/dao/conversation/ConversationDAOImpl.kt 50.00% 1 Missing ⚠️
...ic/data/conversation/JoinSubconversationUseCase.kt 92.85% 0 Missing and 1 partial ⚠️
...rsation/UpdateConversationArchivedStatusUseCase.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #4339      +/-   ##
=============================================
+ Coverage      61.11%   61.23%   +0.11%     
- Complexity      4238     4244       +6     
=============================================
  Files           2200     2200              
  Lines          78411    71550    -6861     
  Branches        7223     7225       +2     
=============================================
- Hits           47920    43811    -4109     
+ Misses         27638    24877    -2761     
- Partials        2853     2862       +9     
Files with missing lines Coverage Δ
.../kalium/logic/data/conversation/SubConversation.kt 66.66% <100.00%> (ø)
...um/persistence/dao/conversation/ConversationDAO.kt 86.20% <ø> (ø)
...ire/kalium/persistence/dao/reaction/ReactionDAO.kt 62.50% <100.00%> (ø)
.../com/wire/kalium/logic/data/call/CallRepository.kt 89.66% <100.00%> (+0.44%) ⬆️
.../logic/data/conversation/ConversationRepository.kt 53.10% <ø> (+0.68%) ⬆️
...ogic/data/conversation/ConversationStatusMapper.kt 59.09% <ø> (-1.78%) ⬇️
...m/logic/data/conversation/SubConversationMapper.kt 66.66% <100.00%> (+66.66%) ⬆️
...n/kotlin/com/wire/kalium/logic/data/event/Event.kt 75.52% <100.00%> (+1.31%) ⬆️
...nversation/UpdateConversationMutedStatusUseCase.kt 94.11% <100.00%> (ø)
.../receiver/conversation/MemberChangeEventHandler.kt 94.73% <100.00%> (-0.51%) ⬇️
... and 4 more

... and 1098 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa069a5...f0abeb4. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Base automatically changed from mo/use-instant-for-event-timestamps to develop July 30, 2026 09:52
@MohamadJaara
MohamadJaara force-pushed the mo/improve-internal-time-handling branch from d3abd85 to 0fdb3a7 Compare July 30, 2026 22:20
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branch${GITHUB_HEAD_REF}
Testbedubuntu-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-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymicroseconds (µs)
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFiles📈 view plot
⚠️ NO THRESHOLD
909.54 µs
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory📈 view plot
⚠️ NO THRESHOLD
573,543.50 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.inboxPagingDeepPageBenchmark📈 view plot
⚠️ NO THRESHOLD
134,891.54 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.inboxPagingFirstPageBenchmark📈 view plot
⚠️ NO THRESHOLD
129,762.62 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.localMarkAsReadBenchmark📈 view plot
⚠️ NO THRESHOLD
3,474.96 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.messagePagingDeepPageBenchmark📈 view plot
⚠️ NO THRESHOLD
28,158.36 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.messagePagingFirstPageBenchmark📈 view plot
⚠️ NO THRESHOLD
13,287.50 µs
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark📈 view plot
⚠️ NO THRESHOLD
1,372,380.30 µs
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark📈 view plot
⚠️ NO THRESHOLD
21,512.23 µs
🐰 View full continuous benchmarking report in Bencher

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.

3 participants