Skip to content

feat: add primitive models and handler for Simplified Sliding Sync#2198

Draft
TheOneWithTheBraid wants to merge 1 commit into
famedly:mainfrom
TheOneWithTheBraid:braid/msc4186
Draft

feat: add primitive models and handler for Simplified Sliding Sync#2198
TheOneWithTheBraid wants to merge 1 commit into
famedly:mainfrom
TheOneWithTheBraid:braid/msc4186

Conversation

@TheOneWithTheBraid
Copy link
Copy Markdown
Contributor

WIP : No need to review so far.

This PR is part of a larger attempt to get Simplified Sliding Sync to work with the Matrix Dart SDK.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Dec 9, 2025

CLA assistant check
All committers have signed the CLA.

@TheOneWithTheBraid TheOneWithTheBraid force-pushed the braid/msc4186 branch 2 times, most recently from bf0c040 to 5f0486d Compare December 9, 2025 13:15
Signed-off-by: The one with the braid <info@braid.business>
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 9, 2025

Codecov Report

❌ Patch coverage is 0% with 101 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.05%. Comparing base (65cbb8d) to head (5f0486d).

Files with missing lines Patch % Lines
...86_simplified_sliding_sync/models/room_result.dart 0.00% 32 Missing ⚠️
...plified_sliding_sync/models/sync_request_body.dart 0.00% 13 Missing ⚠️
...ied_sliding_sync/models/sync_request_response.dart 0.00% 13 Missing ⚠️
...ified_sliding_sync/models/sliding_room_filter.dart 0.00% 10 Missing ⚠️
...msc_4186_simplified_sliding_sync/models/maybe.dart 0.00% 7 Missing ⚠️
...mplified_sliding_sync/models/sync_list_config.dart 0.00% 6 Missing ⚠️
..._simplified_sliding_sync/models/stripped_hero.dart 0.00% 5 Missing ⚠️
...ed_sliding_sync/models/required_state_request.dart 0.00% 4 Missing ⚠️
...plified_sliding_sync/models/room_subscription.dart 0.00% 4 Missing ⚠️
...186_simplified_sliding_sync/models/state_stub.dart 0.00% 4 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2198      +/-   ##
==========================================
- Coverage   57.35%   57.05%   -0.30%     
==========================================
  Files         151      162      +11     
  Lines       19292    19393     +101     
==========================================
  Hits        11064    11064              
- Misses       8228     8329     +101     
Files with missing lines Coverage Δ
...mplified_sliding_sync/models/sync_list_result.dart 0.00% <0.00%> (ø)
...ed_sliding_sync/models/required_state_request.dart 0.00% <0.00%> (ø)
...plified_sliding_sync/models/room_subscription.dart 0.00% <0.00%> (ø)
...186_simplified_sliding_sync/models/state_stub.dart 0.00% <0.00%> (ø)
..._simplified_sliding_sync/models/stripped_hero.dart 0.00% <0.00%> (ø)
...mplified_sliding_sync/models/sync_list_config.dart 0.00% <0.00%> (ø)
...msc_4186_simplified_sliding_sync/models/maybe.dart 0.00% <0.00%> (ø)
...ified_sliding_sync/models/sliding_room_filter.dart 0.00% <0.00%> (ø)
...plified_sliding_sync/models/sync_request_body.dart 0.00% <0.00%> (ø)
...ied_sliding_sync/models/sync_request_response.dart 0.00% <0.00%> (ø)
... and 1 more

Continue to review full report in Codecov by Sentry.

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

@@ -0,0 +1,21 @@
/// Used to depict the difference between null and undefined in JavaScript
abstract class Maybe<T> {}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Interesting concept. What do you think about we make this a sealed class? Then we could even use switch like:

extension on Map<String,Object?> {
  Maybe<T> getMaybe<T>(String key) {
    if (!containsKey(key)) return Undefined<T>();
    return Some<T>(this[key] as T?);
  }
}


final maybe = {'value': 5}.getMaybe<int>('value');
switch (maybe) {
  case Some: print('This is something'); break;
  case Undefined: print('This is undefined'); break;
}

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