agentgui 1.0.880 → 1.0.881

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [Unreleased] - fix stuck "live" indicators on conversations sidebar
2
+
3
+ - Symptom: conversations show streaming dot in sidebar even when no agent is running. Root cause: `routes-conversations.js GET /api/conversations` reconcile required BOTH `!activeExecutions.has(conv.id)` AND `!activeSessionConvIds.has(conv.id)` to clear `isStreaming`. If a session crashed hard (server killed mid-stream, agent process killed without finally running), the session row stayed at `status='active'` forever, keeping the sidebar live indicator on indefinitely until next server restart triggered `recoverStaleSessions`.
4
+ - Fix: trust `activeExecutions` map as ground truth. If `isStreaming=1` but no in-memory execution, set `isStreaming=0` AND mark any orphan 'active'/'pending' session for that conv as 'interrupted'. Self-heals on every list fetch — no restart needed.
5
+
1
6
  ## [Unreleased] - surface stream chunk persistence errors
2
7
 
3
8
  - lib/stream-event-handler.js: `queries.createChunk` failures were swallowed silently in the ACP streaming path. User would see live broadcast events but reload would lose all chunks. Now logs error with conv id, seq, block type for observability.
@@ -9,9 +9,18 @@ export function register(deps) {
9
9
 
10
10
  routes['GET /api/conversations'] = async (req, res) => {
11
11
  const conversations = queries.getConversationsList();
12
- const activeSessionConvIds = new Set(queries.getActiveSessionConversationIds());
13
12
  for (const conv of conversations) {
14
- if (conv.isStreaming && !activeExecutions.has(conv.id) && !activeSessionConvIds.has(conv.id)) conv.isStreaming = 0;
13
+ if (conv.isStreaming && !activeExecutions.has(conv.id)) {
14
+ conv.isStreaming = 0;
15
+ try {
16
+ queries.setIsStreaming(conv.id, false);
17
+ for (const s of queries.getSessionsByConversation(conv.id, 5)) {
18
+ if (s.status === 'active' || s.status === 'pending') {
19
+ queries.updateSession(s.id, { status: 'interrupted', error: 'Reconciled: no active execution', completed_at: Date.now() });
20
+ }
21
+ }
22
+ } catch (err) { console.error(`[conv-list-reconcile] ${conv.id}:`, err.message); }
23
+ }
15
24
  }
16
25
  sendJSON(req, res, 200, { conversations });
17
26
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.880",
3
+ "version": "1.0.881",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "electron/main.js",