Skip to content

Make timeline sender avatars and display names update reactively#6775

Closed
jennaharris7 wants to merge 2 commits into
developfrom
fix/5176-reactive-user-avatars
Closed

Make timeline sender avatars and display names update reactively#6775
jennaharris7 wants to merge 2 commits into
developfrom
fix/5176-reactive-user-avatars

Conversation

@jennaharris7
Copy link
Copy Markdown
Contributor

@jennaharris7 jennaharris7 commented May 12, 2026

Content

Let live RoomMember updates override the event-level sender snapshot in TimelineItemEventFactory, so timeline rows already in the diff cache reflect avatar / display name changes that arrived via sync. Banned members keep the existing hide-identity behavior.

Motivation and context

Closes #5176. Customers report that when another user changes their avatar or display name, the update doesn't appear until the app is restarted or the cache is cleared.

The issue was tagged X-Needs-Rust, but no matrix-rust-sdk change turned out to be necessary: the SDK already emits profile changes as ProfileChangeContent timeline events. The only SDK-layer tweak is in MatrixTimelineDiffProcessor, which now treats ProfileChangeContent (alongside the already-handled RoomMembershipContent) as a trigger for membershipChangeEventReceived so subscribers refresh the cached members list.

Open question

Do we want this behind a feature flag for users who may want to keep the behavior of seeing historical snapshots of timeline events?

Screenshots / GIFs

Tests

  • New unit tests for ProfileDetails.withLiveMemberOverride: live member wins, null falls back, banned falls back, ambiguous name propagates, Unavailable snapshot still uses live data.
  • Manual: change a peer's avatar from another client, confirm the timeline reflects it without restarting EXA.

Tested devices

  • Physical
  • Emulator
  • OS version(s): Samsung Galaxy S24, Android 16

Checklist

  • This PR was made with the help of AI:
    • Yes. In this case, please request a review by Copilot.
  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account.
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly defines what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@jennaharris7 jennaharris7 requested a review from a team as a code owner May 12, 2026 17:08
@jennaharris7 jennaharris7 requested review from jmartinesp and removed request for a team May 12, 2026 17:08
@jennaharris7 jennaharris7 added the PR-Bugfix For bug fix label May 12, 2026
@github-actions github-actions Bot added the Z-Community-PR Issue is solved by a community member's PR label May 12, 2026
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 12, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/aTdu8x

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

❌ Patch coverage is 94.11765% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.16%. Comparing base (e8f1bf0) to head (560101d).
⚠️ Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
...es/impl/timeline/factories/TimelineItemsFactory.kt 60.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6775      +/-   ##
===========================================
+ Coverage    81.14%   81.16%   +0.02%     
===========================================
  Files         2647     2647              
  Lines        74099    74119      +20     
  Branches      9600     9601       +1     
===========================================
+ Hits         60126    60162      +36     
+ Misses       10438    10423      -15     
+ Partials      3535     3534       -1     

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

🚀 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.

@jennaharris7 jennaharris7 force-pushed the fix/5176-reactive-user-avatars branch from 802f23b to 560101d Compare May 12, 2026 19:09
@sonarqubecloud
Copy link
Copy Markdown

@jmartinesp
Copy link
Copy Markdown
Member

Sorry for the long review time, the code looks good to me overall. About this question:

Do we want this behind a feature flag for users who may want to keep the behavior of seeing historical snapshots of timeline events?

I'd say we do, I think when we implemented this in the classic apps we did so behind a developer option/advanced settings toggle. @mxandreas WDYT?

@jmartinesp
Copy link
Copy Markdown
Member

Actually, it seems like this should be possible with a pure SDK implementation: matrix-org/matrix-rust-sdk#6575

I'm looking at ways to implement this, it seems like following the example from AmbiguityMap would do the trick.

@jmartinesp
Copy link
Copy Markdown
Member

Since matrix-org/matrix-rust-sdk#6576 was merged, this should now be fixed in the SDK and we can probably close this PR. Thanks again for the client-side fix, but it's better to have it centralised in the SDK.

@jmartinesp jmartinesp closed this May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Bugfix For bug fix Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Users don't see updated avatars on EX-EX, frequently

3 participants