Skip to content

feat(ui,ffi): Add LatestEventValue::Local { sender, profile, .. }.#5885

Merged
Hywan merged 4 commits into
matrix-org:mainfrom
Hywan:feat-sdk-latest-event-sender-profile
Nov 21, 2025
Merged

feat(ui,ffi): Add LatestEventValue::Local { sender, profile, .. }.#5885
Hywan merged 4 commits into
matrix-org:mainfrom
Hywan:feat-sdk-latest-event-sender-profile

Conversation

@Hywan
Copy link
Copy Markdown
Member

@Hywan Hywan commented Nov 21, 2025

This patch adds a sender: OwnedUserId and a profile: TimelineDetails<Profile> fields to LatestEventValue::Local in matrix_sdk_ui::timeline (and the corresponding matrix_sdk_ffi type).


@Hywan Hywan requested a review from ganfra November 21, 2025 14:21
@Hywan Hywan requested a review from a team as a code owner November 21, 2025 14:21
@Hywan Hywan requested review from poljar and removed request for a team November 21, 2025 14:21
This patch adds a `profile: TimelineDetails<Profile>` field to
`LatestEventValue::Local` in `matrix_sdk_ui::timeline` (and the
corresponding `matrix_sdk_ffi` type).
@Hywan Hywan force-pushed the feat-sdk-latest-event-sender-profile branch from 0e8a455 to c530757 Compare November 21, 2025 14:24
Copy link
Copy Markdown
Contributor

@poljar poljar 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, there are some missing changelogs. Approving ahead of time.

Comment thread bindings/matrix-sdk-ffi/src/timeline/mod.rs
Comment thread crates/matrix-sdk-ui/src/timeline/latest_event.rs
LatestEventValue::from_base_latest_event_value(base_value, &room, &client).await;

assert_matches!(value, LatestEventValue::Local { timestamp, content, is_sending } => {
assert_matches!(value, LatestEventValue::Local { timestamp, profile, content, is_sending } => {
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.

Not sure how much effort it would be, but don't we want to have test with an available profile?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The profile_from_user_id method is tested elsewhere, and it's not setup in these test cases. However, I've added the sender field too, and this one is tested, which increases the trust in the code (except if someone computes a different UserId in the meantime, but it's pretty unlikely).

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 21, 2025

Codecov Report

❌ Patch coverage is 71.42857% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.62%. Comparing base (75a977c) to head (aca8085).
⚠️ Report is 11 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 71.42% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5885      +/-   ##
==========================================
- Coverage   88.62%   88.62%   -0.01%     
==========================================
  Files         362      362              
  Lines      102666   102677      +11     
  Branches   102666   102677      +11     
==========================================
+ Hits        90985    90994       +9     
+ Misses       7449     7447       -2     
- Partials     4232     4236       +4     

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

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Nov 21, 2025

CodSpeed Performance Report

Merging #5885 will not alter performance

Comparing Hywan:feat-sdk-latest-event-sender-profile (aca8085) with main (eed5f11)

Summary

✅ 50 untouched

@Hywan Hywan changed the title feat(ui,ffi): Add LatestEventValue::Local { profile, .. }. feat(ui,ffi): Add LatestEventValue::Local { sender, profile, .. }. Nov 21, 2025
This patch adds a `sender: OwnedUserId` field to
`LatestEventValue::Local` in `matrix_sdk_ui::timeline` (and the
corresponding `matrix_sdk_ffi` type).
@Hywan Hywan force-pushed the feat-sdk-latest-event-sender-profile branch from 768b9f9 to aca8085 Compare November 21, 2025 15:02
@Hywan Hywan enabled auto-merge (rebase) November 21, 2025 15:07
@Hywan Hywan merged commit d228bde into matrix-org:main Nov 21, 2025
51 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.

2 participants