Skip to content

Conversation

laevandus
Copy link
Contributor

🔗 Issue Links

Related: IOS-1003

🎯 Goal

StreamCollection and LazyCachedMapCollection do not add any value anymore

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

@laevandus laevandus requested a review from a team as a code owner October 3, 2025 06:47
@laevandus laevandus added the 💥 Breaking Changes A PR that contains breaking changes label Oct 3, 2025
Copy link

coderabbitai bot commented Oct 3, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch v5-remove-stream-collection-lazy-cached-map-collection

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Stream-SDK-Bot
Copy link
Collaborator

SDK Size

title develop branch diff status
StreamChat 8.25 MB 7.99 MB -266 KB 🚀
StreamChatUI 4.89 MB 5.05 MB +162 KB 🟢

@Stream-SDK-Bot
Copy link
Collaborator

SDK Performance

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 3.34 ms 66.6% 🔼 🟢
Duration 2.6 s 2.55 s 1.92% 🔼 🟢
Hitch time ratio 4 ms per s 1.31 ms per s 67.25% 🔼 🟢
Frame rate 75 fps 77.95 fps 3.93% 🔼 🟢
Number of hitches 1 0.4 60.0% 🔼 🟢

Copy link

github-actions bot commented Oct 3, 2025

1 Message
📖 There seems to be app changes but CHANGELOG wasn't modified.
Please include an entry if the PR includes user-facing changes.
You can find it at CHANGELOG.md.

Generated by 🚫 Danger

@laevandus laevandus force-pushed the v5-remove-stream-collection-lazy-cached-map-collection branch from 394c731 to 8bd4e6d Compare October 3, 2025 07:18
@Stream-SDK-Bot
Copy link
Collaborator

Stream-SDK-Bot commented Oct 3, 2025

SDK Size

title develop branch diff status
StreamChat 8.25 MB 7.99 MB -266 KB 🚀
StreamChatUI 4.89 MB 5.05 MB +162 KB 🟢

@laevandus laevandus force-pushed the v5-remove-stream-collection-lazy-cached-map-collection branch 3 times, most recently from c6262e1 to 90b2eae Compare October 3, 2025 07:30
Copy link

github-actions bot commented Oct 3, 2025

Public Interface

- public struct StreamCollection: RandomAccessCollection  
- 
-   public var startIndex: Index
-   public var endIndex: Index
-   
- 
-   public subscript(position: Index)-> Element
-   
- 
-   public init(_ baseCollection: BaseCollection)

- extension LazyCachedMapCollection: Equatable  
- 
-   public static func ==(lhs: LazyCachedMapCollection<Element>,rhs: LazyCachedMapCollection<Element>)-> Bool

- public struct LazyCachedMapCollection: RandomAccessCollection  
- 
-   public var startIndex: Index
-   public var endIndex: Index
-   public var count: Index
-   
- 
-   public subscript(position: Index)-> Element
-   
- 
-   public init(_ collection: LazyCachedMapCollection)
-   public init(source: Collection,map: @escaping (SourceElement) -> Element,context: NSManagedObjectContext? = nil)
-   
- 
-   public func index(before i: Index)-> Index
-   public func index(after i: Index)-> Index
-   public mutating func append(_ element: Element)

- extension RandomAccessCollection  
- 
-   public func lazyCachedMap(_ transformation: @escaping (Element) -> T,context: NSManagedObjectContext? = nil)-> LazyCachedMapCollection<T>

- extension StreamCollection: CustomStringConvertible  
- 
-   public var description: String

 public class PollController: DataController, DelegateCallable, DataStoreProvider, @unchecked Sendable  
-   public var ownVotes: LazyCachedMapCollection<PollVote>
+   public var ownVotes: [PollVote]

 public class PollVoteListController: DataController, DelegateCallable, DataStoreProvider, @unchecked Sendable  
-   public var votes: LazyCachedMapCollection<PollVote>
+   public var votes: [PollVote]

 @MainActor public final class ReactionListState: ObservableObject  
-   @Published public private var reactions
+   @Published public private var reactions: [ChatMessageReaction]

 @MainActor public final class ChatState: ObservableObject  
-   @Published public private var members
+   @Published public private var members: [ChatChannelMember]
-   @Published public internal var messages
+   @Published public internal var messages: [ChatMessage]
-   @Published public internal var watchers
+   @Published public internal var watchers: [ChatUser]

 @MainActor public final class MemberListState: ObservableObject  
-   @Published public private var members
+   @Published public private var members: [ChatChannelMember]

 public class ChatChannelMemberListController: DataController, DelegateCallable, DataStoreProvider, @unchecked Sendable  
-   public var members: LazyCachedMapCollection<ChatChannelMember>
+   public var members: [ChatChannelMember]

 public class ChatUserListController: DataController, DelegateCallable, DataStoreProvider, @unchecked Sendable  
-   public var users: LazyCachedMapCollection<ChatUser>
+   public var users: [ChatUser]

 @MainActor public final class MessageSearchState: ObservableObject  
-   @Published public internal var messages
+   @Published public internal var messages: [ChatMessage]

 public class ChatMessageController: DataController, DelegateCallable, DataStoreProvider, @unchecked Sendable  
-   public var replies: LazyCachedMapCollection<ChatMessage>
+   public var replies: [ChatMessage]

 public class ChatThreadListController: DataController, DelegateCallable, DataStoreProvider, @unchecked Sendable  
-   public var threads: LazyCachedMapCollection<ChatThread>
+   public var threads: [ChatThread]

 @MainActor public final class MessageState: ObservableObject  
-   @Published public private var reactions
+   @Published public private var reactions: [ChatMessageReaction]
-   @Published public internal var replies
+   @Published public internal var replies: [ChatMessage]

 public class ChatChannelController: DataController, DelegateCallable, DataStoreProvider, @unchecked Sendable  
-   public var messages: LazyCachedMapCollection<ChatMessage>
+   public var messages: [ChatMessage]

 @MainActor public final class UserListState: ObservableObject  
-   @Published public private var users
+   @Published public private var users: [ChatUser]

 public class ChatChannelWatcherListController: DataController, DelegateCallable, DataStoreProvider, @unchecked Sendable  
-   public var watchers: LazyCachedMapCollection<ChatUser>
+   public var watchers: [ChatUser]

 public class ChatChannelListController: DataController, DelegateCallable, DataStoreProvider, @unchecked Sendable  
-   public var channels: LazyCachedMapCollection<ChatChannel>
+   public var channels: [ChatChannel]

 extension PollController  
-     @Published public private var ownVotes: LazyCachedMapCollection<PollVote>
+     @Published public private var ownVotes: [PollVote]

 public class ChatReactionListController: DataController, DelegateCallable, DataStoreProvider, @unchecked Sendable  
-   public var reactions: LazyCachedMapCollection<ChatMessageReaction>
+   public var reactions: [ChatMessageReaction]

 @MainActor public final class ChannelListState: ObservableObject  
-   @Published public internal var channels
+   @Published public internal var channels: [ChatChannel]

 extension PollVoteListController  
-     @Published public private var votes: LazyCachedMapCollection<PollVote>
+     @Published public private var votes: [PollVote]

 public class ChatMessageSearchController: DataController, DelegateCallable, DataStoreProvider, @unchecked Sendable  
-   public var messages: LazyCachedMapCollection<ChatMessage>
+   public var messages: [ChatMessage]

 @MainActor public final class UserSearchState: ObservableObject  
-   @Published public internal var users
+   @Published public internal var users: [ChatUser]

 public class MessageReminderListController: DataController, DelegateCallable, DataStoreProvider, @unchecked Sendable  
-   public var reminders: LazyCachedMapCollection<MessageReminder>
+   public var reminders: [MessageReminder]

Copy link

sonarqubecloud bot commented Oct 8, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link
Contributor

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

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

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💥 Breaking Changes A PR that contains breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants