Skip to content
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

Add Timeline::retry_send #2022

Merged
merged 5 commits into from
Jun 7, 2023
Merged

Add Timeline::retry_send #2022

merged 5 commits into from
Jun 7, 2023

Conversation

jplatte
Copy link
Collaborator

@jplatte jplatte commented Jun 6, 2023

Previously a pretty obvious hole in the timeline API: When sending failed, there was no way to deal with the failed local echo. This adds one way to do that, we should also add the ability to cancel a failed local echo (in a separate PR).

@jplatte jplatte requested a review from a team as a code owner June 6, 2023 15:19
@jplatte jplatte requested review from Hywan and removed request for a team June 6, 2023 15:19
@codecov
Copy link

codecov bot commented Jun 6, 2023

Codecov Report

Patch coverage: 75.55% and project coverage change: +0.02 🎉

Comparison is base (407375a) 75.22% compared to head (eb312f4) 75.24%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2022      +/-   ##
==========================================
+ Coverage   75.22%   75.24%   +0.02%     
==========================================
  Files         147      147              
  Lines       16034    16076      +42     
==========================================
+ Hits        12062    12097      +35     
- Misses       3972     3979       +7     
Impacted Files Coverage Δ
crates/matrix-sdk-ui/src/timeline/mod.rs 84.91% <68.00%> (-2.19%) ⬇️
...s/matrix-sdk-ui/src/timeline/event_item/content.rs 56.57% <75.00%> (+0.49%) ⬆️
crates/matrix-sdk-ui/src/timeline/inner.rs 68.31% <86.66%> (+0.64%) ⬆️
crates/matrix-sdk/src/sliding_sync/list/mod.rs 92.75% <100.00%> (-0.04%) ⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

Good work, thanks!

I wish we could have a test to ensure this behavior. How hard would it be?

crates/matrix-sdk-ui/src/timeline/inner.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-ui/src/timeline/inner.rs Show resolved Hide resolved
@jplatte
Copy link
Collaborator Author

jplatte commented Jun 7, 2023

I guess testing shouldn't be that hard if we use HTTP mocking to make the first try fail. I'll give it a try.

@jplatte jplatte force-pushed the jplatte/retry-failed-send branch from ff008df to eb312f4 Compare June 7, 2023 11:03
@jplatte jplatte enabled auto-merge (rebase) June 7, 2023 11:04
@jplatte jplatte merged commit 415c13f into main Jun 7, 2023
47 checks passed
@jplatte jplatte deleted the jplatte/retry-failed-send branch June 7, 2023 11:29
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.

None yet

2 participants