Skip to content

Conversation

@gpunto
Copy link
Contributor

@gpunto gpunto commented Nov 12, 2025

Goal

Part of the wider AND-904.

This PR removes fid filtering from ActivityEventHandler since it's not reliable in all cases and we can just filter based on activity id.

Implementation

  • Remove fid filtering from ActivityEventHandler and rely on activity id

Testing

Updates to an Activity state should work as expected, regardless whether we're receiving WS events or not. This is partially testable in the demo for example by opening the comments for an activity in one device and adding/removing comments in that activity in another device.

Checklist

  • Issue linked (if any)
  • Tests/docs updated
  • I have signed the Stream CLA (required for external contributors)

@gpunto gpunto requested a review from Copilot November 12, 2025 11:09
@gpunto gpunto added the bug label Nov 12, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 12, 2025

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled.

🎉 Great job! This PR is ready for review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes fid-based filtering from ActivityEventHandler in favor of relying solely on activity ID for event filtering. This change addresses reliability issues with feed ID (fid) filtering while maintaining correct event handling for activity-related updates.

Key Changes:

  • Removed FeedId parameter from ActivityEventHandler constructor and all fid-based event filtering logic
  • Updated event handlers to filter events based only on activity ID
  • Removed test cases that verified fid-based filtering behavior

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
stream-feeds-android-client/src/main/kotlin/io/getstream/feeds/android/client/internal/state/event/handler/ActivityEventHandler.kt Removed fid parameter from constructor and all fid-based filtering checks in event handlers
stream-feeds-android-client/src/main/kotlin/io/getstream/feeds/android/client/internal/state/ActivityImpl.kt Updated ActivityEventHandler instantiation to remove fid argument
stream-feeds-android-client/src/test/kotlin/io/getstream/feeds/android/client/internal/state/event/handler/ActivityEventHandlerTest.kt Removed fid-based test cases and updated test data to reflect simplified filtering logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gpunto gpunto added pr:bug Bug fix and removed bug labels Nov 12, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 12, 2025

SDK Size Comparison 📏

SDK Before After Difference Status
stream-feeds-android-client 2.36 MB 2.36 MB -0.00 MB 🚀

Base automatically changed from and-904/bookmark-event-filtering to develop November 13, 2025 09:09
@gpunto gpunto force-pushed the and-904/rm-activiy-handler-fid-filtering branch from eafb462 to e24d525 Compare November 13, 2025 09:12
gpunto and others added 2 commits November 13, 2025 11:02
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@gpunto gpunto force-pushed the and-904/rm-activiy-handler-fid-filtering branch from e24d525 to 2a5c4af Compare November 13, 2025 10:03
@gpunto gpunto marked this pull request as ready for review November 13, 2025 10:03
@sonarqubecloud
Copy link

@VelikovPetar VelikovPetar merged commit a2538cc into develop Nov 14, 2025
7 checks passed
@VelikovPetar VelikovPetar deleted the and-904/rm-activiy-handler-fid-filtering branch November 14, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:bug Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants