Report a busy chat on subscribe after a reload
The room that records a server-run turn is torn down when its last client leaves, so a page reload re-subscribed to a new room that no longer knew the turn was running and never replayed the step-started marker. Claude Code does not re-announce a running turn to a new stream either, so the activity row and Stop control vanished until the next streamed delta. chat_subscribe now also replays the marker when the room's stream announced a turn (CLI-originated or re-announced on attach) or when the broker reports its own turn in flight through the optional chatTurnReporter (Claude Code reads its in-process running flag; the chat manager routes it without I/O).
This commit is contained in:
@@ -213,7 +213,7 @@ func handleChatSubscribe(request protocol.Message, broker chatBroker, hub *chatH
|
||||
// frame in its future, so replay the live marker. The composer's Stop control
|
||||
// and the transcript's one activity row read it; the later `step ended` frame
|
||||
// settles them normally.
|
||||
if hub.turnRunning(query.SessionID) {
|
||||
if hub.turnRunning(query.SessionID, broker) {
|
||||
sub.send(protocol.Message{Type: protocol.ChatEvent, ChatEvent: &protocol.ChatEventFrame{
|
||||
SessionID: query.SessionID,
|
||||
Kind: protocol.ChatEventStep,
|
||||
|
||||
Reference in New Issue
Block a user