@devries-cameron20 / t3code Mirror · read-only / commits / 224acebb57
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 25, 07:30 UTC

fix(web): add pointer cursor to running stop-generation button (#900)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

0x1f99d committed Mar 13, 2026 at 06:15 UTC 224acebb57815193ef93c2d1861e606a626d23b3
2 files changed +26 -2
apps/web/src/components/ChatView.browser.tsx
+25 -1
@@ -11,6 +11,7 @@ import {
11 type WsWelcomePayload,
12 WS_CHANNELS,
13 WS_METHODS,
14 + OrchestrationSessionStatus,
15 } from "@t3tools/contracts";
16 import { RouterProvider, createMemoryHistory } from "@tanstack/react-router";
17 import { HttpResponse, http, ws } from "msw";
@@ -153,6 +154,7 @@ function createSnapshotForTargetUser(options: {
154 targetMessageId: MessageId;
155 targetText: string;
156 targetAttachmentCount?: number;
157 + sessionStatus?: OrchestrationSessionStatus;
158 }): OrchestrationReadModel {
159 const messages: Array<OrchestrationReadModel["threads"][number]["messages"][number]> = [];
160
@@ -222,7 +224,7 @@ function createSnapshotForTargetUser(options: {
224 checkpoints: [],
225 session: {
226 threadId: THREAD_ID,
225 - status: "ready",
227 + status: options.sessionStatus ?? "ready",
228 providerName: "codex",
229 runtimeMode: "full-access",
230 activeTurnId: null,
@@ -1009,6 +1011,28 @@ describe("ChatView timeline estimator parity (full app)", () => {
1011 }
1012 });
1013
1014 + it("shows a pointer cursor for the running stop button", async () => {
1015 + const mounted = await mountChatView({
1016 + viewport: DEFAULT_VIEWPORT,
1017 + snapshot: createSnapshotForTargetUser({
1018 + targetMessageId: "msg-user-stop-button-cursor" as MessageId,
1019 + targetText: "stop button cursor target",
1020 + sessionStatus: "running",
1021 + }),
1022 + });
1023 +
1024 + try {
1025 + const stopButton = await waitForElement(
1026 + () => document.querySelector<HTMLButtonElement>('button[aria-label="Stop generation"]'),
1027 + "Unable to find stop generation button.",
1028 + );
1029 +
1030 + expect(getComputedStyle(stopButton).cursor).toBe("pointer");
1031 + } finally {
1032 + await mounted.cleanup();
1033 + }
1034 + });
1035 +
1036 it("keeps the new thread selected after clicking the new-thread button", async () => {
1037 const mounted = await mountChatView({
1038 viewport: DEFAULT_VIEWPORT,
apps/web/src/components/ChatView.tsx
+1 -1
@@ -3604,7 +3604,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
3604 ) : phase === "running" ? (
3605 <button
3606 type="button"
3607 - 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"
3607 + 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"
3608 onClick={() => void onInterrupt()}
3609 aria-label="Stop generation"
3610 >