feat: show queued prompt count badge in the task sidebar (#2354)

This commit is contained in:
Clément Fiere
2026-08-07 16:34:39 +02:00
committed by GitHub
parent 4d80edacf2
commit 084ecc8b54
51 changed files with 2262 additions and 64 deletions
@@ -134,3 +134,21 @@ describe("toSheetItem", () => {
).toBe(ERROR_PREVIEW);
});
});
describe("toSheetItem queued prompt count", () => {
it("carries the queued prompt count from the task status summary", () => {
const item = toSheetItem(
task({ statusSummary: { revision: 3, updated_at: UPDATED_AT, queued_prompt_count: 2 } }),
emptyCtx(),
);
expect(item.queuedCount).toBe(2);
});
it("leaves queuedCount undefined when nothing is queued", () => {
const item = toSheetItem(
task({ statusSummary: { revision: 4, updated_at: UPDATED_AT } }),
emptyCtx(),
);
expect(item.queuedCount).toBeUndefined();
});
});
@@ -126,6 +126,9 @@ export function toSheetItem(
isRemoteExecutor: task.isRemoteExecutor,
remoteExecutorType: task.primaryExecutorType ?? undefined,
remoteExecutorName: task.primaryExecutorName ?? undefined,
// Queued prompt count badge — same status summary source as the desktop
// sidebar mapper (buildSidebarItem) so both surfaces agree.
queuedCount: task.statusSummary?.queued_prompt_count,
};
}