Skip to content

Commit f9f503a

Browse files
[codex] Fix Control UI terminal run status recovery
1 parent 293cfb4 commit f9f503a

3 files changed

Lines changed: 41 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Docs: https://docs.openclaw.ai
1010

1111
### Fixes
1212

13+
- Control UI: treat terminal session status as authoritative over stale active-run flags so completed terminal runs stop showing abort/live UI. (#84057)
1314
- CLI: preserve embedded equals signs in inline root option values instead of truncating after the second separator. (#83995) Thanks @ThiagoCAltoe.
1415
- 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.
1516
- 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.

ui/src/ui/views/sessions.test.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,41 @@ describe("sessions view", () => {
548548
);
549549
});
550550

551+
it("does not filter terminal sessions as live when active-run flags are stale", async () => {
552+
const container = document.createElement("div");
553+
render(
554+
renderSessions({
555+
...buildProps(
556+
buildMultiResult([
557+
{
558+
key: "agent:main:done",
559+
kind: "direct",
560+
updatedAt: 20,
561+
hasActiveRun: true,
562+
status: "done",
563+
},
564+
{
565+
key: "agent:main:running",
566+
kind: "direct",
567+
updatedAt: 10,
568+
hasActiveRun: true,
569+
status: "running",
570+
},
571+
]),
572+
),
573+
searchQuery: "live",
574+
}),
575+
container,
576+
);
577+
await Promise.resolve();
578+
579+
const rows = container.querySelectorAll("tbody tr.session-data-row");
580+
expect(rows).toHaveLength(1);
581+
expect(rows[0]?.querySelector(".session-key-cell")?.textContent?.trim()).toBe(
582+
"agent:main:running",
583+
);
584+
});
585+
551586
it("keeps raw keys for inherited identity object properties", async () => {
552587
const container = document.createElement("div");
553588
render(

ui/src/ui/views/sessions.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,11 @@ function filterRows(
248248
const displayName = normalizeLowercaseStringOrEmpty(row.displayName);
249249
const runtime = normalizeLowercaseStringOrEmpty(resolveAgentRuntimeLabel(row.agentRuntime));
250250
const status = normalizeLowercaseStringOrEmpty(row.status);
251-
const liveState =
252-
row.hasActiveRun === true ? "live running" : row.hasActiveRun === false ? "idle" : "";
251+
const liveState = isSessionRunActive(row)
252+
? "live running"
253+
: row.hasActiveRun === false
254+
? "idle"
255+
: "";
253256
if (
254257
key.includes(q) ||
255258
label.includes(q) ||

0 commit comments

Comments
 (0)