diff --git a/CHANGELOG.md b/CHANGELOG.md index 1df090665335..fe0561359585 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- Control UI: treat terminal session status as authoritative over stale active-run flags so completed terminal runs stop showing abort/live UI. (#84057) - CLI: preserve embedded equals signs in inline root option values instead of truncating after the second separator. (#83995) Thanks @ThiagoCAltoe. - Providers/Ollama: default unknown-capabilities models to tool-capable so discovered native Ollama models can use tools when `/api/show` omits capabilities. (#84055) Thanks @dutifulbob. - Installer/Windows: launch `install.ps1` onboarding as an attached child process so fresh native Windows installs do not freeze visibly at `Starting setup...` or corrupt the wizard's terminal rendering. diff --git a/ui/src/ui/views/sessions.test.ts b/ui/src/ui/views/sessions.test.ts index 76a05c665fa7..b74e593aa7a4 100644 --- a/ui/src/ui/views/sessions.test.ts +++ b/ui/src/ui/views/sessions.test.ts @@ -548,6 +548,41 @@ describe("sessions view", () => { ); }); + it("does not filter terminal sessions as live when active-run flags are stale", async () => { + const container = document.createElement("div"); + render( + renderSessions({ + ...buildProps( + buildMultiResult([ + { + key: "agent:main:done", + kind: "direct", + updatedAt: 20, + hasActiveRun: true, + status: "done", + }, + { + key: "agent:main:running", + kind: "direct", + updatedAt: 10, + hasActiveRun: true, + status: "running", + }, + ]), + ), + searchQuery: "live", + }), + container, + ); + await Promise.resolve(); + + const rows = container.querySelectorAll("tbody tr.session-data-row"); + expect(rows).toHaveLength(1); + expect(rows[0]?.querySelector(".session-key-cell")?.textContent?.trim()).toBe( + "agent:main:running", + ); + }); + it("keeps raw keys for inherited identity object properties", async () => { const container = document.createElement("div"); render( diff --git a/ui/src/ui/views/sessions.ts b/ui/src/ui/views/sessions.ts index 786c45e13486..3298d75c161b 100644 --- a/ui/src/ui/views/sessions.ts +++ b/ui/src/ui/views/sessions.ts @@ -248,8 +248,11 @@ function filterRows( const displayName = normalizeLowercaseStringOrEmpty(row.displayName); const runtime = normalizeLowercaseStringOrEmpty(resolveAgentRuntimeLabel(row.agentRuntime)); const status = normalizeLowercaseStringOrEmpty(row.status); - const liveState = - row.hasActiveRun === true ? "live running" : row.hasActiveRun === false ? "idle" : ""; + const liveState = isSessionRunActive(row) + ? "live running" + : row.hasActiveRun === false + ? "idle" + : ""; if ( key.includes(q) || label.includes(q) ||