Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Implementation can cause major inconsistencies and missed messages

Aperta
#505 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
angular, typescript
Ambito
frontend

Direzione di ricerca

Inizia da channelService.init() e channelService.loadMoreChannels(), quindi traccia come channelSubject e this.channels.length determinano gli offset della paginazione. Riproduci il caso has_unread mentre i messaggi vengono letti o i canali arrivano tramite websocket; il lavoro è completato quando i caricamenti successivi non saltano né tralasciano i canali corrispondenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hello,

There is a bug which can cause a user to never see some messages in the UI given the way that the Angular SDK is written.

Essentially, the problem is that the current way of handling pagination in the SDK works for only the most simplistic of cases. It doesn't take into account the filters. This can only be explained by way of example:

Let's say that you have 500 channels. And let's also say that you are using a filter of has_unread. Now, there is already a problem where if you have over 100 unread channels this filter doesn't work properly (known issue). But let's assume for a moment that problem isn't in play because we have less than 100 unread channels. For our example, let's also assume that we are loading 10 channels at a time, as it'll make the problem more apparent.

We call channelService.init() and load the initial batch of channels. Assume we have 30 unread channels. We've loaded 10 unread channels. Now, we load the next batch of 10 by calling channelService.loadMoreChannels(). This queries the channels again with the same filter and an offset of 10, since that's the current count of the channel list.

However, let's say that we're responding to messages and respond to 10 of them. We now have 10 channels that have unread messages loaded. So we want load the next 10. So we call channelService.loadMoreChannels() with an offset of 20... but... there are only 20 unread messages. So if we have 20 messages in our channelSubject, when we query the channels again, no channels will be returned since there are none that match the offset.

This can also happen, too, if channels populate via the web socket. Because the client this.channels.length is always used as the offset, it opens up the possibility that the next time the pagination occurs, it will skip or miss channels completely.

Lingua principale
TypeScript
Stelle
67
Fork
34
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GetStream/stream-chat-angular

Tutte le issue di GetStream/stream-chat-angular

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.