Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Sidebar: row preview keeps a failed last turn over a queued message (#6105)

Bugfixer 2b283a7b35013
diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx
index 96e07e41f2..ada40c33fc 100644
--- a/src/components/Sidebar.tsx
+++ b/src/components/Sidebar.tsx
@@ -829,7 +829,7 @@ export const BotListItem = memo(function BotListItem(props: BotRowProps) {
{working ? (
<SidebarWorkingStep bot={bot} last={last} />
) : (
- <FadeLine>{waiting ? t("sidebar.preview.waiting") : teammateWait ? t("sidebar.preview.waitingOnTeammate") : queued ? t("task.queued") : botPreview(bot, visible, instances, advanced)}</FadeLine>
+ <FadeLine>{waiting ? t("sidebar.preview.waiting") : teammateWait ? t("sidebar.preview.waitingOnTeammate") : queued && !failed ? t("task.queued") : botPreview(bot, visible, instances, advanced)}</FadeLine>
)}
</span>
)}
diff --git a/src/components/SidebarBotListItem.test.ts b/src/components/SidebarBotListItem.test.ts
index 1706db49c5..d47561bc58 100644
--- a/src/components/SidebarBotListItem.test.ts
+++ b/src/components/SidebarBotListItem.test.ts
@@ -381,6 +381,11 @@ describe("BotListItem", () => {
expect(retrying).toContain('data-testid="working-dot"');
expect(retrying).not.toContain('data-testid="failed-dot"');
expect(renderRow(bot({ messages: [{ ...failedTurn[1]!, tool: { name: "Read", ok: true } }] }))).not.toContain('data-testid="failed-dot"');
+ // A message queued behind the failed turn leaves the preview on the failure, like the dot.
+ const queuedState = { ...initialState, pendingQueued: { "thread-atlas": [{ queueId: "q1", text: "try again" }] } };
+ const queuedBehind = renderToStaticMarkup(createElement(BotListItem, botRowProps(queuedState, vi.fn(), bot({ messages: failedTurn }), { density: "comfortable", query: "", onMenu: vi.fn() })));
+ expect(queuedBehind).toContain('data-testid="failed-dot"');
+ expect(queuedBehind).not.toContain(">Queued<");
});
it("keeps real sibling work visible while another thread waits for a teammate", () => {