fix(ui): stop stale talk sessions · openclaw/openclaw@e5f5989
vincentkoc
·
2026-05-04
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -61,6 +61,7 @@ Docs: https://docs.openclaw.ai
|
61 | 61 | ### Fixes |
62 | 62 | |
63 | 63 | - Control UI/Talk: make failed Talk startup errors dismissable and clear the stale Talk error state when dismissed, so missing realtime voice provider configuration does not leave a permanent chat banner. Fixes #77071. Thanks @ijoshdavis. |
| 64 | +- Control UI/Talk: stop and clear failed realtime Talk sessions when dismissing runtime error banners, so the next Talk click starts a fresh session instead of only stopping the stale one. Thanks @vincentkoc. |
64 | 65 | - Google Chat: create an isolated Google auth transport per auth client, so google-auth-library interceptor mutations do not accumulate across webhook verification and access-token clients. Thanks @vincentkoc. |
65 | 66 | - Control UI/performance: cap long-task and long-animation-frame diagnostics in the shared event log, so slow-render telemetry does not evict gateway/plugin events from the Debug and Overview views. Thanks @vincentkoc. |
66 | 67 | - Web fetch: late-bind `web_fetch` config and provider fallback metadata from the active runtime snapshot, matching `web_search` so long-lived tools do not use stale fetch provider settings. Thanks @vincentkoc. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -911,19 +911,23 @@ describe("switchChatSession", () => {
|
911 | 911 | |
912 | 912 | describe("dismissChatError", () => { |
913 | 913 | it("clears persistent Talk error state", () => { |
| 914 | +const stop = vi.fn(); |
914 | 915 | const state = { |
915 | 916 | lastError: 'Realtime voice provider "openai" is not configured', |
916 | 917 | lastErrorCode: "UNAVAILABLE", |
917 | | -realtimeTalkActive: false, |
| 918 | +realtimeTalkActive: true, |
| 919 | +realtimeTalkSession: { stop }, |
918 | 920 | realtimeTalkStatus: "error", |
919 | 921 | realtimeTalkDetail: 'Realtime voice provider "openai" is not configured', |
920 | 922 | realtimeTalkTranscript: "partial transcript", |
921 | | -} as AppViewState; |
| 923 | +} as unknown as AppViewState & { realtimeTalkSession: { stop(): void } | null }; |
922 | 924 | |
923 | 925 | dismissChatError(state); |
924 | 926 | |
925 | 927 | expect(state.lastError).toBeNull(); |
926 | 928 | expect(state.lastErrorCode).toBeNull(); |
| 929 | +expect(stop).toHaveBeenCalledOnce(); |
| 930 | +expect(state.realtimeTalkSession).toBeNull(); |
927 | 931 | expect(state.realtimeTalkActive).toBe(false); |
928 | 932 | expect(state.realtimeTalkStatus).toBe("idle"); |
929 | 933 | expect(state.realtimeTalkDetail).toBeNull(); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -623,6 +623,11 @@ export function dismissChatError(state: AppViewState) {
|
623 | 623 | state.lastError = null; |
624 | 624 | state.lastErrorCode = null; |
625 | 625 | if (state.realtimeTalkStatus === "error") { |
| 626 | +const talkHost = state as unknown as { |
| 627 | +realtimeTalkSession?: { stop(): void } | null; |
| 628 | +}; |
| 629 | +talkHost.realtimeTalkSession?.stop(); |
| 630 | +talkHost.realtimeTalkSession = null; |
626 | 631 | state.realtimeTalkActive = false; |
627 | 632 | state.realtimeTalkStatus = "idle"; |
628 | 633 | state.realtimeTalkDetail = null; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。