Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Treat a stream that ends without [DONE] as an error

Geschlossen Anfängerfreundlich
#182 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
85/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
typescript
Bereich
frontend, testing

Rechercherichtung

Beginne in packages/widget/src/api/client.ts bei der Leseschleife und ihrem aktuellen Ergebnis { done: true }, und sieh dir dann packages/widget/tests/api/client.test.ts sowie den Helper mockChatStream in tests/helpers/stream.ts an. Ergänze Tests für Streams, die mit und ohne [DONE] enden; done sieht so aus, als ob der abgeschlossene Fall weiterhin erfolgreich ist, ein unvollständiger Stream { error: 'network' } ergibt und die Timeout-Behandlung intakt bleibt. Füge den angeforderten Patch Changeset für @chatcops/widget hinzu.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug good first issue hacktoberfest widget

All three server adapters end a reply with data: [DONE]. The widget's client treats the end of the stream as success either way: after the read loop it yields { done: true } (packages/widget/src/api/client.ts, lines 129 and 130). When a proxy or the server cuts the connection mid-reply, the visitor gets a half answer with no error and no Retry button.

What to do

  • If the stream ends without a [DONE] line, yield { error: 'network' } instead of { done: true }.
  • A [DONE] that arrives keeps working as today, and so does the timeout handling.

Acceptance criteria

  • Tests in packages/widget/tests/api/client.test.ts (the mockChatStream helper in tests/helpers/stream.ts builds the fake stream): ending with [DONE] gives done, ending without it gives error: 'network'
  • Changeset for @chatcops/widget (patch)
  • pnpm -r build, pnpm test and pnpm -r typecheck pass

Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #<this issue number>. Setup notes (pnpm, build before test) are in CONTRIBUTING.md.

Vorherrschende Sprache
TypeScript
Sterne
13
Forks
7
Ø Merge
3 Std. 28 Min.
Gemergte PRs (30 T.)
182

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus codercops/chatcops

Alle Issues in codercops/chatcops

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.