mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-04 16:38:49 +00:00
After a gateway restart or websocket reconnect, the UI stays stuck in processing state because reconnecting clients only replay running status when a turn is active, never push idle when no turn is running. Fix _hydrate_after_subscribe to always push goal_status (running with started_at when turn is active, idle when no turn is running) so the frontend can reset its processing indicator on reconnect. Also fix cmd_stop reporting 'No active task to stop' when a task is actually processing by draining the pending injection queue in addition to cancelling active tasks. This prevents mid-turn injection deadlocks and gives accurate task counts.