Skip to content

Conversation

@Hywan
Copy link
Member

@Hywan Hywan commented Nov 28, 2025

This patch adds the ability for an edit (m.room.message with a m.relates_to + m.replace) to be considered a LatestEventValue candidate if and only if it edits the immediate previous event. Otherwise it's easy to edit an old message and create a “broken” LatestEventValue because it points to an older message that the user may not be able to find easily.


@Hywan Hywan force-pushed the feat-sdk-latest-event-edit branch 2 times, most recently from 76593a9 to d3f1b95 Compare November 28, 2025 13:25
This patch supports any edits at a possible `LatestEventValue`
candidate.
…diate previous event.

This patch changes the rule of what is a `LatestEventValue` candidate
in case of an edit. An edit must target/relate to its immediate previous
event to be a candidate. Otherwise it's easy to edit an old message
and create a “broken” `LatestEventValue` because it points to an older
message that the user may not be able to find easily.
@Hywan Hywan force-pushed the feat-sdk-latest-event-edit branch from d3f1b95 to 740811d Compare November 28, 2025 13:33
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 28, 2025

CodSpeed Performance Report

Merging #5913 will not alter performance

Comparing Hywan:feat-sdk-latest-event-edit (740811d) with main (73449f4)

Summary

✅ 50 untouched

@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

❌ Patch coverage is 95.71429% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.66%. Comparing base (73449f4) to head (740811d).
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/matrix-sdk-ui/src/timeline/latest_event.rs 90.16% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5913      +/-   ##
==========================================
- Coverage   88.66%   88.66%   -0.01%     
==========================================
  Files         362      362              
  Lines      104399   104488      +89     
  Branches   104399   104488      +89     
==========================================
+ Hits        92569    92646      +77     
- Misses       7499     7507       +8     
- Partials     4331     4335       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Hywan Hywan marked this pull request as ready for review November 28, 2025 13:56
@Hywan Hywan requested a review from a team as a code owner November 28, 2025 13:56
@Hywan Hywan requested review from andybalaam and pixlwave and removed request for a team November 28, 2025 13:56
@pixlwave
Copy link
Member

Tested on EXI, this works and I love it! 🫶

@pixlwave
Copy link
Member

tenor

Copy link
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@Hywan Hywan merged commit ab98028 into matrix-org:main Dec 1, 2025
60 checks passed
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.

Editing messages dont reflect to chats overview Edits aren’t reflected in room's latest visible event

3 participants