Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
fix(web): add pointer cursor to running stop-generation button (#900)
0x1f99d224acebb5781
diff --git a/apps/web/src/components/ChatView.browser.tsx b/apps/web/src/components/ChatView.browser.tsxindex cb7dea0ce..faecc7f51 100644--- a/apps/web/src/components/ChatView.browser.tsx+++ b/apps/web/src/components/ChatView.browser.tsx@@ -11,6 +11,7 @@ import {type WsWelcomePayload,WS_CHANNELS,WS_METHODS,+ OrchestrationSessionStatus,} from "@t3tools/contracts";import { RouterProvider, createMemoryHistory } from "@tanstack/react-router";import { HttpResponse, http, ws } from "msw";@@ -153,6 +154,7 @@ function createSnapshotForTargetUser(options: {targetMessageId: MessageId;targetText: string;targetAttachmentCount?: number;+ sessionStatus?: OrchestrationSessionStatus;}): OrchestrationReadModel {const messages: Array<OrchestrationReadModel["threads"][number]["messages"][number]> = [];@@ -222,7 +224,7 @@ function createSnapshotForTargetUser(options: {checkpoints: [],session: {threadId: THREAD_ID,- status: "ready",+ status: options.sessionStatus ?? "ready",providerName: "codex",runtimeMode: "full-access",activeTurnId: null,@@ -1009,6 +1011,28 @@ describe("ChatView timeline estimator parity (full app)", () => {}});+ it("shows a pointer cursor for the running stop button", async () => {+ const mounted = await mountChatView({+ viewport: DEFAULT_VIEWPORT,+ snapshot: createSnapshotForTargetUser({+ targetMessageId: "msg-user-stop-button-cursor" as MessageId,+ targetText: "stop button cursor target",+ sessionStatus: "running",+ }),+ });++ try {+ const stopButton = await waitForElement(+ () => document.querySelector<HTMLButtonElement>('button[aria-label="Stop generation"]'),+ "Unable to find stop generation button.",+ );++ expect(getComputedStyle(stopButton).cursor).toBe("pointer");+ } finally {+ await mounted.cleanup();+ }+ });+it("keeps the new thread selected after clicking the new-thread button", async () => {const mounted = await mountChatView({viewport: DEFAULT_VIEWPORT,diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsxindex 327789db6..0a9c0371a 100644--- a/apps/web/src/components/ChatView.tsx+++ b/apps/web/src/components/ChatView.tsx@@ -3604,7 +3604,7 @@ export default function ChatView({ threadId }: ChatViewProps) {) : phase === "running" ? (<buttontype="button"- className="flex size-8 items-center justify-center rounded-full bg-rose-500/90 text-white transition-all duration-150 hover:bg-rose-500 hover:scale-105 sm:h-8 sm:w-8"+ className="flex size-8 cursor-pointer items-center justify-center rounded-full bg-rose-500/90 text-white transition-all duration-150 hover:bg-rose-500 hover:scale-105 sm:h-8 sm:w-8"onClick={() => void onInterrupt()}aria-label="Stop generation">