fix: Stuck "ARIA denkt..." indicator after pipeline ends
- pipelineEnd() now broadcasts agent_activity: idle unconditionally - chat:error and chat:final paths broadcast idle outside of active pipeline - Gateway close event ends active pipeline + broadcasts idle - Prevents indicator from hanging after timeout/error/disconnect Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -117,6 +117,9 @@ function pipelineEnd(ok, detail) {
|
|||||||
}
|
}
|
||||||
plog(`━━━ Pipeline Ende ━━━`);
|
plog(`━━━ Pipeline Ende ━━━`);
|
||||||
pipelineActive = false;
|
pipelineActive = false;
|
||||||
|
// Thinking-Indikator IMMER zuruecksetzen — auch bei Timeout/Fehler/Abbruch
|
||||||
|
broadcast({ type: "agent_activity", activity: "idle" });
|
||||||
|
pendingMessageTime = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── Auto-Restart bei Netzwerk-Namespace-Verlust ──────
|
// ── Auto-Restart bei Netzwerk-Namespace-Verlust ──────
|
||||||
@@ -283,8 +286,10 @@ async function connectGateway() {
|
|||||||
state.gateway.handshakeOk = false;
|
state.gateway.handshakeOk = false;
|
||||||
gatewayWs = null;
|
gatewayWs = null;
|
||||||
broadcastState();
|
broadcastState();
|
||||||
|
// Stuck "ARIA denkt..." vermeiden, falls Gateway waehrend Pipeline abkackt
|
||||||
|
if (pipelineActive) pipelineEnd(false, `Gateway-Verbindung verloren (${code})`);
|
||||||
|
else broadcast({ type: "agent_activity", activity: "idle" });
|
||||||
checkGatewayHealth();
|
checkGatewayHealth();
|
||||||
// Auto-Reconnect nach 5s
|
|
||||||
setTimeout(connectGateway, 5000);
|
setTimeout(connectGateway, 5000);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -398,6 +403,7 @@ function handleGatewayMessage(msg) {
|
|||||||
const error = payload.error || text || "Unbekannt";
|
const error = payload.error || text || "Unbekannt";
|
||||||
log("error", "gateway", `Chat-Fehler: ${error}`);
|
log("error", "gateway", `Chat-Fehler: ${error}`);
|
||||||
if (pipelineActive) pipelineEnd(false, error);
|
if (pipelineActive) pipelineEnd(false, error);
|
||||||
|
else broadcast({ type: "agent_activity", activity: "idle" });
|
||||||
broadcast({ type: "chat_error", error, payload });
|
broadcast({ type: "chat_error", error, payload });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -419,6 +425,7 @@ function handleGatewayMessage(msg) {
|
|||||||
const text = extractChatText(payload) || payload.text || "";
|
const text = extractChatText(payload) || payload.text || "";
|
||||||
log("info", "gateway", `ANTWORT: "${text.slice(0, 200)}"`);
|
log("info", "gateway", `ANTWORT: "${text.slice(0, 200)}"`);
|
||||||
if (pipelineActive) pipelineEnd(true, `"${text.slice(0, 120)}"`);
|
if (pipelineActive) pipelineEnd(true, `"${text.slice(0, 120)}"`);
|
||||||
|
else broadcast({ type: "agent_activity", activity: "idle" });
|
||||||
broadcast({ type: "chat_final", text, payload });
|
broadcast({ type: "chat_final", text, payload });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -426,6 +433,7 @@ function handleGatewayMessage(msg) {
|
|||||||
const error = payload.error || payload.message || "Unbekannt";
|
const error = payload.error || payload.message || "Unbekannt";
|
||||||
log("error", "gateway", `Chat-Fehler: ${error}`);
|
log("error", "gateway", `Chat-Fehler: ${error}`);
|
||||||
if (pipelineActive) pipelineEnd(false, error);
|
if (pipelineActive) pipelineEnd(false, error);
|
||||||
|
else broadcast({ type: "agent_activity", activity: "idle" });
|
||||||
broadcast({ type: "chat_error", error, payload });
|
broadcast({ type: "chat_error", error, payload });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,10 +34,12 @@
|
|||||||
## Offen
|
## Offen
|
||||||
|
|
||||||
### Bugs (Prioritaet)
|
### Bugs (Prioritaet)
|
||||||
- [ ] Session-Persistenz: Bei Container-Restart wird immer aria-bridge geladen statt die zuletzt gewaehlte Session
|
- [x] Session-Persistenz: Bei Container-Restart wird immer aria-bridge geladen statt die zuletzt gewaehlte Session
|
||||||
- [ ] App: Audioausgabe hoert ab und zu einfach auf (mitten im Satz oder zwischen Chunks)
|
- [ ] App: Audioausgabe hoert ab und zu einfach auf (mitten im Satz oder zwischen Chunks)
|
||||||
|
- [ ] Diagnostic: "ARIA denkt..." + Abbrechen bleibt stehen, auch wenn Pipeline laengst fertig ist
|
||||||
|
|
||||||
### App Features
|
### App Features
|
||||||
|
- [ ] "ARIA denkt..." Indicator + Abbrechen-Button in der App (wie im Diagnostic)
|
||||||
- [ ] Wake Word on-device (Porcupine "ARIA" Keyword, Phase 2 — passives Lauschen)
|
- [ ] Wake Word on-device (Porcupine "ARIA" Keyword, Phase 2 — passives Lauschen)
|
||||||
- [ ] Chat-History zuverlaessiger laden (AsyncStorage Race Condition)
|
- [ ] Chat-History zuverlaessiger laden (AsyncStorage Race Condition)
|
||||||
- [ ] Background Audio Service (TTS auch bei minimierter App)
|
- [ ] Background Audio Service (TTS auch bei minimierter App)
|
||||||
|
|||||||
Reference in New Issue
Block a user