Fix sync loader spinner showing for initializing (non-running) agents

Initializing agents were mapped to the "running" bucket in both server
and client, causing the SyncedLoader spinner to appear in tabs and
sidebar workspace rows when opening an agent for the first time.
This commit is contained in:
Mohamed Boudra committed 2026-04-10 11:13:14 +07:00
1 parent 1d41a50e1f
commit 8a9d738438
3 files changed
+4 -4

No files matched your search

@@ -35,7 +35,7 @@ describe("deriveSidebarStateBucket", () => {
).toBe("attention");
});
it("treats initializing agents as running", () => {
it("treats initializing agents as done", () => {
expect(
deriveSidebarStateBucket({
status: "initializing",
@@ -43,6 +43,6 @@ describe("deriveSidebarStateBucket", () => {
requiresAttention: false,
attentionReason: null,
}),
).toBe("running");
).toBe("done");
});
});
@@ -21,7 +21,7 @@ export function deriveSidebarStateBucket(input: {
if (input.status === "error" || input.attentionReason === "error") {
return "failed";
}
if (input.status === "running" || input.status === "initializing") {
if (input.status === "running") {
return "running";
}
if (input.requiresAttention) {
+1 -1
View File
@@ -5322,7 +5322,7 @@ export class Session {
if (agent.status === "error" || agent.attentionReason === "error") {
return "failed";
}
if (agent.status === "running" || agent.status === "initializing") {
if (agent.status === "running") {
return "running";
}
if (agent.requiresAttention) {