Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Implementation can cause major inconsistencies and missed messages

Abierto
#505 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
30/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
angular, typescript
Área
frontend

Línea de trabajo

Comienza en channelService.init() y channelService.loadMoreChannels(), y luego sigue cómo channelSubject y this.channels.length determinan los offsets de paginación. Reproduce el caso has_unread mientras se leen mensajes o llegan canales a través de websocket; se considera terminado cuando las cargas posteriores no omiten ni pasan por alto canales coincidentes.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
67
Forks
34
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de GetStream/stream-chat-angular

Todos los issues de GetStream/stream-chat-angular

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.