Skip to content

Support User Average Response Time #5893

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

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

andremion
Copy link
Contributor

@andremion andremion commented Aug 8, 2025

🎯 Goal

Support User Average Response Time

🛠 Implementation details

Introduces the avgResponseTime field to the User model and related DTOs and entities.

  • Added avg_response_time to DownstreamUserDto.
  • Added avgResponseTime to the User model, its Builder, and the compareTo logic.
  • Added avgResponseTime to UserEntity.
  • Updated database version to 89.
  • Mapped avg_response_time in DomainMapping and DatabaseUserRepository.
  • Included avg_response_time in test data for UserDtoTestData.

Introduces the User Profile screen to the sample app, which shows the Average Response Time.

🧪 Testing

Important

User response time must be enabled in Nessy (already enabled in the app used by the sample)

  • Create a new channel
  • Send a few messages
  • Check the user profile screen
Screen_recording_20250811_123645.webm

This commit introduces the `avgResponseTime` field to the `User` model and related DTOs and entities.

- Added `avg_response_time` to `DownstreamUserDto`.
- Added `avgResponseTime` to the `User` model, its `Builder`, and the `compareTo` logic.
- Added `avgResponseTime` to `UserEntity`.
- Updated database version to 89.
- Mapped `avg_response_time` in `DomainMapping` and `DatabaseUserRepository`.
- Included `avg_response_time` in test data for `UserDtoTestData`.
@andremion andremion added the core label Aug 8, 2025
Copy link
Contributor

github-actions bot commented Aug 8, 2025

DB Entities have been updated. Do we need to upgrade DB Version?
Modified Entities :

stream-chat-android-offline/src/main/java/io/getstream/chat/android/offline/repository/domain/user/internal/UserEntity.kt

@andremion andremion marked this pull request as ready for review August 8, 2025 13:42
@andremion andremion requested a review from a team as a code owner August 8, 2025 13:42
@andremion andremion changed the title Average response time Support User Average Response Time Aug 8, 2025
Copy link
Contributor

github-actions bot commented Aug 8, 2025

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 3.20 MB 3.20 MB 0.00 MB 🟢
stream-chat-android-offline 3.42 MB 3.42 MB 0.00 MB 🟢
stream-chat-android-ui-components 10.48 MB 10.48 MB 0.00 MB 🟢
stream-chat-android-compose 12.59 MB 12.59 MB 0.00 MB 🟢

@andremion andremion marked this pull request as draft August 8, 2025 16:45
This commit introduces a user profile screen that displays user information like name and average response time.
Users can access this screen by clicking on their profile in the navigation drawer.

- Added `UserProfileViewModel` to fetch and provide user data.
- Created `UserProfileActivity` to display the user profile information.
- Updated `ChannelsActivity` to navigate to the `UserProfileActivity`.
- Modified `ChannelsScreenNavigationDrawer` to handle clicks on the user profile.
- Registered `UserProfileActivity` in the `AndroidManifest.xml`.
@andremion andremion marked this pull request as ready for review August 11, 2025 10:26
@andremion andremion force-pushed the AND-694-average-response-time branch from 4f08c01 to 9405f3a Compare August 11, 2025 13:06
@andremion andremion force-pushed the AND-694-average-response-time branch from 9405f3a to 1e12963 Compare August 11, 2025 13:11
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
41.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant