Skip to content

Feature: add room threads list#6575

Merged
jmartinesp merged 7 commits intodevelopfrom
feat/room-threads-list
Apr 15, 2026
Merged

Feature: add room threads list#6575
jmartinesp merged 7 commits intodevelopfrom
feat/room-threads-list

Conversation

@jmartinesp
Copy link
Copy Markdown
Member

@jmartinesp jmartinesp commented Apr 14, 2026

Content

Adds a new room threads list screen that will appear for rooms which have threads in them.

This will fetch the list of threads in a room, and paginate as you scroll. When one of the items is selected, it'll open the associated thread.

This is hidden behind a new feature flag.

Note this is a WIP feature: it lacks info for unread threads, empty threads screen if we'd rather use that instead of hiding the menu button, and the designs are not final.

Motivation and context

Part of #6354.

Screenshots / GIFs

Thread list New menu item
image image

Tests

  1. Enable the new 'thread list' feature flag.
  2. Go into a room containing threads, the new threads menu item should appear almost instantly.
  3. When tapping on it, you'll see the new screen, which should load an initial batch of items.
  4. When scrolling, new items should appear until there aren't any more threads in the room.
  5. If you go to a room with no threads in it, the threads menu item should not be displayed.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 16

Checklist

  • This PR was made with the help of AI:
    • Yes. In this case, please request a review by Copilot.
    • No.
  • 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. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • 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

jmartinesp and others added 4 commits April 14, 2026 12:40
- Add `ThreadsListService` to subscribe to thread changes in the room.
- Create `ThreadsListView` and its associated node a presenters (the UI may change).
- Add a menu icon in the room screen to open it.

This is still pending info about unread threads, so several UI components related to it will be hidden.
@jmartinesp jmartinesp added the PR-Wip For anything that isn't ready to ship and will be enabled at a later date label Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 14, 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/tKBjFh

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

Codecov Report

❌ Patch coverage is 86.41304% with 50 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.05%. Comparing base (d259eb6) to head (a8dba3c).
⚠️ Report is 34 commits behind head on develop.

Files with missing lines Patch % Lines
...matrix/impl/room/threads/RustThreadsListService.kt 62.68% 19 Missing and 6 partials ⚠️
...ures/messages/impl/threads/list/ThreadsListView.kt 92.43% 4 Missing and 10 partials ⚠️
...droid/libraries/matrix/impl/room/JoinedRustRoom.kt 0.00% 5 Missing ⚠️
...messages/impl/threads/list/ThreadsListPresenter.kt 88.88% 1 Missing and 3 partials ⚠️
...ent/android/features/messages/impl/MessagesView.kt 94.44% 0 Missing and 1 partial ⚠️
...matrix/test/room/threads/FakeThreadsListService.kt 92.30% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6575      +/-   ##
===========================================
+ Coverage    81.02%   81.05%   +0.02%     
===========================================
  Files         2595     2602       +7     
  Lines        71719    72080     +361     
  Branches      9288     9322      +34     
===========================================
+ Hits         58113    58427     +314     
- Misses       10192    10222      +30     
- Partials      3414     3431      +17     

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

@jmartinesp jmartinesp marked this pull request as ready for review April 14, 2026 14:32
@jmartinesp jmartinesp requested a review from a team as a code owner April 14, 2026 14:32
@jmartinesp jmartinesp requested review from ganfra and removed request for a team April 14, 2026 14:32
Copy link
Copy Markdown
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

Some small remarks, otherwise LGTM!

contentPadding = padding,
state = lazyListState,
) {
itemsIndexed(state.threads, key = { _, row -> row.item.threadId }) { index, threadItem ->
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why calling it row and then threadItem?

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.

No real reason, I've renamed it.

url = state.roomAvatarUrl,
size = AvatarSize.CurrentUserTopBar,
),
avatarType = AvatarType.Room(),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we fill the isTombstoned?

}
}

private fun List<ThreadListUpdate>.apply(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe create the extension method on the list instead? Also maybe we should use a mutable list?


override fun destroy() {
if (itemSubscriptionJob?.isActive == true) {
itemSubscriptionJob?.cancel()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

just call cancel? the check is already done internally no?

}

override fun subscribeToPaginationUpdates(): Flow<ThreadListPaginationStatus> {
return callbackFlow {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

mxCallbackFlow?

}

private fun doSubscribeToItemUpdates(): Job {
val updatesFlow = callbackFlow {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

mxCallbackFlow?

@sonarqubecloud
Copy link
Copy Markdown

@jmartinesp jmartinesp enabled auto-merge (squash) April 15, 2026 12:06
@jmartinesp jmartinesp merged commit 80470b3 into develop Apr 15, 2026
32 checks passed
@jmartinesp jmartinesp deleted the feat/room-threads-list branch April 15, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Wip For anything that isn't ready to ship and will be enabled at a later date

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants