Skip to content

Profiles: Add status and call fields to room heroes.#6733

Open
pixlwave wants to merge 2 commits into
mainfrom
doug/hero-user-status
Open

Profiles: Add status and call fields to room heroes.#6733
pixlwave wants to merge 2 commits into
mainfrom
doug/hero-user-status

Conversation

@pixlwave

@pixlwave pixlwave commented Jul 8, 2026

Copy link
Copy Markdown
Member

Builds on top of #6704 (directly targets that branch) and makes the same changes for Room Heroes. I've done this one separately as this PR makes Room::heroes() async and changes the return type so I'm less confident of the approach and don't want to block the previous one from being merged on a discussion about heroes.

  • I've documented the public API changes in the appropriate changelog files (see Writing changelog entries).
  • This PR was made with the help of AI.

@pixlwave pixlwave changed the title Doug/hero user status Profiles: Add status and call fields to room heroes. Jul 8, 2026
@pixlwave pixlwave force-pushed the doug/hero-user-status branch from a614a6a to 3eba4d0 Compare July 8, 2026 09:43

/// A [`RoomHero`] augmented with the user's global profile fields.
#[derive(Clone, Debug, PartialEq)]
pub struct RoomHeroWithProfile {

@pixlwave pixlwave Jul 8, 2026

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.

Claude kept trying to convince me to use RoomHero with a #[serde(skip)] on the profile fields but that felt all kinds of wrong to me so I settled on this route with distinct types for storage vs data transfer.

Happy to change if this isn't desirable though.

@pixlwave pixlwave force-pushed the doug/hero-user-status branch from 3eba4d0 to 1b13b45 Compare July 8, 2026 09:51
@codspeed-hq

codspeed-hq Bot commented Jul 8, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 50 untouched benchmarks


Comparing doug/hero-user-status (4d89085) with main (afc182e)

Open in CodSpeed

@pixlwave pixlwave force-pushed the doug/user-status branch from ff3c136 to c3cdc53 Compare July 9, 2026 14:28
@pixlwave pixlwave force-pushed the doug/hero-user-status branch from 1b13b45 to 971bc7b Compare July 9, 2026 14:29
@pixlwave pixlwave requested a review from poljar July 9, 2026 16:09
@pixlwave pixlwave marked this pull request as ready for review July 9, 2026 16:09
@pixlwave pixlwave requested a review from a team as a code owner July 9, 2026 16:09
@pixlwave pixlwave force-pushed the doug/hero-user-status branch from 971bc7b to ed6750a Compare July 13, 2026 14:25
Base automatically changed from doug/user-status to main July 13, 2026 19:25
@pixlwave pixlwave force-pushed the doug/hero-user-status branch from ed6750a to 4d89085 Compare July 14, 2026 07:56
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.61290% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.93%. Comparing base (afc182e) to head (4d89085).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/matrix-sdk-base/src/room/display_name.rs 61.11% 7 Missing ⚠️
crates/matrix-sdk-base/src/room/mod.rs 95.23% 3 Missing and 1 partial ⚠️
crates/matrix-sdk-base/src/sliding_sync.rs 97.43% 1 Missing ⚠️
crates/matrix-sdk-ui/src/spaces/room.rs 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #6733    +/-   ##
========================================
  Coverage   89.93%   89.93%            
========================================
  Files         398      398            
  Lines      111492   111637   +145     
  Branches   111492   111637   +145     
========================================
+ Hits       100269   100402   +133     
- Misses       7418     7427     +9     
- Partials     3805     3808     +3     

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

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.

1 participant