Widget: keep a message sent while offline, and send it when the connection is back
Los mantenedores suelen responder en 1 día
@Saifjafri212213 ya está trabajando en esto.
Desde el 30/10/2026.
- #502 de @Saifjafri212213 — abierto
Evaluación
Este issue todavía no se ha evaluado.
Descripción
F-05 task 18. Today a message sent while offline fails with errorNetwork ("Connection error. Please check your network.", packages/widget/src/i18n.ts:53) and the visitor has to press Retry once they're back online.
What to do
- Before sending (
handleSend,packages/widget/src/widget.ts:738), checknavigator.onLine. If offline, show the visitor's message as waiting ("Will send when you're back online", a new string inWidgetLocaleStringswith an English default), and don't call the API. - Listen for the
onlineevent onwindowand send what's waiting, in order, one at a time. A message that then fails gets the normal error and Retry. - Remove the listener in
destroy(). Don't keep waiting messages in storage: they're for this page view only. - Going offline in the middle of a reply isn't part of this; that already fails with the network error and Retry.
Acceptance criteria
- Unit tests with
navigator.onLinemocked: a message sent offline isn't sent, it's sent onceonlinefires, two waiting messages go in order, and nothing is left listening afterdestroy() - An e2e test using Playwright's
context.setOffline(true), thenfalse, checking the reply arrives without a click - The waiting state is announced through the existing reply live region, and the axe checks still pass
- A minor changeset for
@chatcops/widget;pnpm test:coverage,pnpm lintandpnpm sizepass
Comment here to be assigned.
- Lenguaje dominante
- TypeScript
- Estrellas
- 13
- Forks
- 7
- Merge medio
- 3 h 28 min
- PR fusionados (30 d)
- 296
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de codercops/chatcops
-
Core README lists old default modelsPosiblemente ocupada @prakashNalla la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
codercops/chatcops#503 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Widget: theme.tokens to set any color or size token, and the full token table in the docsPosiblemente ocupada @Sreehita-here la tomó hoy. Abiertohacktoberfest
codercops/chatcops#500 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Widget: a header menu with New conversation, Download transcript and a privacy linkPosiblemente ocupada @anurag2787 la tomó hoy. Abiertohacktoberfest
codercops/chatcops#496 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Widget: copy a completed assistant replyPosiblemente ocupada @piyusshhjangid la tomó hace 1 día. Abiertohacktoberfest
codercops/chatcops#477 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Server: validate `rateLimit.windowMs` before creating the limiterPosiblemente ocupada @ashutoshpalhare la tomó hace 2 días. Abierto
codercops/chatcops#452 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de codercops/chatcops
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Northeastern-Electric-Racing/FinishLine#4660 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
excaliburjs/Excalibur#3895 ·
Los mantenedores suelen responder en 3 días
-
infer_audio_type only recognises one MPEG Layer III frame header, so most MP3 files are rejectedPosiblemente ocupada @Steve-20-ai la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Earn report crashes with "RangeError: Invalid time value" when a report row has an unparsable timestampPosiblemente ocupada @Gurkaran18 la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
joinmarket-webui/jam#1588 ·
Los mantenedores suelen responder en 3 días
-
BeOS .json missingAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
mihaip/infinite-mac#475 ·