Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

fix: message bubble streaming status not cleared when new segment arrives

クローズ
#1,454 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript, node.js
領域
cli, frontend

調査の方向性

Start with src/tui/messageBubble.js and src/tui/conversationArea.js, tracing how localStreaming changes through pub/sub and how finalizeStreaming and handleInterrupt end a stream. Reproduce the case by starting the TUI and adding a system message during an assistant response. Done means the prior assistant bubble stops showing its spinner after the next segment arrives; verify the relevant behavior in the existing tests, whose paths are not named in the issue.

索引モデルが issue の本文から書いたものです。

説明

bug

Summary

A message bubble's streaming status is not cleared when a new message segment arrives after it. A pending AI message that is interrupted by a system message still shows a spinner erroneously, even though the AI stream has ended.

Environment

  • OS: Linux 7.0.14-23-pve
  • Node.js: v25.8.1
  • madz version: 1.117.0
  • LLM provider: Unknown — user to confirm

Reproduction

Steps to reproduce the behavior:

  1. Run npm start to launch the TUI.
  2. Send a chat message that triggers a streaming assistant response.
  3. While the assistant message is streaming, trigger a system message (e.g., a command that adds a system message, or an interrupt followed by a system message).
  4. Observe the assistant message bubble.

Expected Behavior

The assistant message bubble's streaming status should be false once a new message segment arrives after it. The spinner should stop, and the bubble should render as a completed message.

Actual Behavior

The assistant message bubble still shows a spinner (streaming status remains true) even though a new message segment has arrived after it. The bubble appears to still be streaming when it is not.

Additional Context

The message bubble's streaming state is managed in src/tui/messageBubble.js via localStreaming, which is set from the streaming prop and updated via pub/sub. The streaming flag is set to false in finalizeStreaming in src/tui/conversationArea.js. If a system message is added after the assistant message without the assistant message's streaming flag being cleared, the bubble retains its spinner. The pendingState computation in messageBubble.js (role === "assistant" && localStreaming && segments.length === 0 && !localContent) also relies on the streaming flag being accurate.

Audit Findings (for Issue #1454)

  • src/tui/messageBubble.js:498 — pendingState is computed as role === "assistant" && localStreaming && segments.length === 0 && !localContent. The spinner is rendered when pendingState is true. If localStreaming is not cleared when a new segment arrives after the assistant message, the spinner persists.
  • src/tui/messageBubble.js:272,328 — localStreaming is initialized from the streaming prop and updated via pub/sub (data?.streaming). It is only cleared when a publish carries streaming: false.
  • src/tui/conversationArea.js:908-944 — finalizeStreaming sets streaming: false on the message via updateMessage, which publishes to the bubble and clears the spinner. This is the normal completion path.
  • src/tui/conversationArea.js:171-211 — handleInterrupt sets streaming: false on the message directly (without calling finalizeStreaming), which also clears the spinner via pub/sub.
  • src/tui/messageList.js:40-51,685 — shouldRenderBubble keeps an assistant bubble visible if it is streaming OR has non-empty content/segments. An interrupted assistant bubble with only reasoning/partial segments is kept visible, so its spinner state must be accurate.

The likely root cause: when a new message segment (e.g., a system message) is added after an assistant message, the assistant message streaming flag is not reliably cleared. This can happen if the stream is interrupted or errors without finalizeStreaming/handleInterrupt firing streaming: false, or if a system message is added via addMessage (which does not touch the assistant message streaming flag). Verify that every path that ends an assistant stream clears the streaming flag on the bubble, and that adding a subsequent message segment does not leave a stale streaming: true on a prior assistant bubble.

主要言語
JavaScript
スター
2
フォーク
0
平均マージ
1時間 32分
マージ済み PR(30日)
222

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

avoidwork/madz のほかの issue

avoidwork/madz の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。