Skip to content

fix: Filter out threaded events from event focused timeline#6519

Merged
jmartinesp merged 1 commit intomainfrom
fix/filter-out-thread-events-from-event-focused-timeline
Apr 29, 2026
Merged

fix: Filter out threaded events from event focused timeline#6519
jmartinesp merged 1 commit intomainfrom
fix/filter-out-thread-events-from-event-focused-timeline

Conversation

@jmartinesp
Copy link
Copy Markdown
Contributor

@jmartinesp jmartinesp commented Apr 29, 2026

Motivation

When using a focused event timeline with a non-threaded focus event, other threaded events were still included in the timeline, so you could see both the thread roots with their summaries and the threaded events that should be hidden.

This was first reported here .

Changes

  • Add hide_thread_events property to EventFocusedPaginationMode::Room so we can customise this behaviour in the event cache pagination.

  • In the methods that load new events in EventFocusedCacheInner, use this new info to exclude the events that are part of a thread.

  • I've documented the public API Changes in the appropriate CHANGELOG.md files.

  • This PR was made with the help of AI.

Signed-off-by:

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.91%. Comparing base (1136eb4) to head (0090281).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6519      +/-   ##
==========================================
- Coverage   89.94%   89.91%   -0.03%     
==========================================
  Files         381      381              
  Lines      105753   105757       +4     
  Branches   105753   105757       +4     
==========================================
- Hits        95115    95088      -27     
- Misses       6993     7022      +29     
- Partials     3645     3647       +2     

☔ 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 Apr 29, 2026

Merging this PR will not alter performance

✅ 50 untouched benchmarks


Comparing fix/filter-out-thread-events-from-event-focused-timeline (0090281) with main (1136eb4)

Open in CodSpeed

@jmartinesp jmartinesp force-pushed the fix/filter-out-thread-events-from-event-focused-timeline branch from 04d6971 to 0090281 Compare April 29, 2026 09:53
@jmartinesp jmartinesp marked this pull request as ready for review April 29, 2026 09:53
@jmartinesp jmartinesp requested a review from a team as a code owner April 29, 2026 09:53
@jmartinesp jmartinesp requested review from Hywan and removed request for a team April 29, 2026 09:53
@jmartinesp
Copy link
Copy Markdown
Contributor Author

Just to mention I also tried to implement this in TimelineStateTransaction::should_add_event_item and it was simpler and seemed to work fine, but then there's this comment:

// For event-focused timelines, thread filtering is now handled in the
// event cache layer. We accept all events from pagination.

So it seems like the event cache is the right place.

Copy link
Copy Markdown
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

Let's go for it :-). Thanks!

@jmartinesp jmartinesp merged commit e90dbb3 into main Apr 29, 2026
54 of 60 checks passed
@jmartinesp jmartinesp deleted the fix/filter-out-thread-events-from-event-focused-timeline branch April 29, 2026 10:12
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