Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(chat): keep running activity spinner visible

Louis Beaumontba90f8d87cc3
diff --git a/apps/screenpipe-app-tauri/components/chat/standalone/message-content.tsx b/apps/screenpipe-app-tauri/components/chat/standalone/message-content.tsx
index 074a441c1..03d8c61db 100644
--- a/apps/screenpipe-app-tauri/components/chat/standalone/message-content.tsx
+++ b/apps/screenpipe-app-tauri/components/chat/standalone/message-content.tsx
@@ -1133,6 +1133,13 @@ function ToolCallGroup({
aria-expanded={isExpanded}
disabled={forceCollapsed || hasInteractiveTool}
>
+ {isWorking && (
+ <RefreshCw
+ className="h-3 w-3 shrink-0 animate-spin text-foreground/40"
+ data-testid="tool-activity-running-indicator"
+ aria-hidden="true"
+ />
+ )}
<span className="truncate text-xs text-foreground/50 group-hover:text-foreground/80 transition-colors duration-150">
{isWorking ? runningSummary : summary}
</span>
diff --git a/apps/screenpipe-app-tauri/e2e/specs/chat-tool-activity.spec.ts b/apps/screenpipe-app-tauri/e2e/specs/chat-tool-activity.spec.ts
index fd41c53d4..d3ab0f122 100644
--- a/apps/screenpipe-app-tauri/e2e/specs/chat-tool-activity.spec.ts
+++ b/apps/screenpipe-app-tauri/e2e/specs/chat-tool-activity.spec.ts
@@ -186,6 +186,12 @@ describe("Chat tool activity progressive disclosure", function () {
interval: 100,
timeoutMsg: "running activity never became a friendly test status",
});
+ const runningIndicator = await summary.$('[data-testid="tool-activity-running-indicator"]');
+ await runningIndicator.waitForExist({
+ timeout: t(2_000),
+ timeoutMsg: "collapsed running tool activity has no visible loading indicator",
+ });
+ expect(await runningIndicator.isDisplayed()).toBe(true);
expect(await summary.getAttribute("aria-expanded")).toBe("false");
expect((await $$('[data-testid="tool-activity-list"]')).length).toBe(0);
@@ -277,6 +283,9 @@ describe("Chat tool activity progressive disclosure", function () {
);
const summary = await lastSummary();
expect(await summary.getAttribute("aria-expanded")).toBe("false");
+ expect(
+ await summary.$('[data-testid="tool-activity-running-indicator"]').isExisting(),
+ ).toBe(false);
const body = await visibleBodyText();
expect(body).toContain("I reviewed the information and prepared the summary.");