From 3aaca155e7ac07d82a0d98bc90d6b06517468a85 Mon Sep 17 00:00:00 2001 From: Wes Date: Tue, 16 Jun 2026 17:06:14 +0800 Subject: [PATCH] Fix transcript actions on touch devices (#4161) --- .../components/execution-log-section.test.tsx | 17 +++++++++++++++++ .../issues/components/execution-log-section.tsx | 9 ++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/packages/views/issues/components/execution-log-section.test.tsx b/packages/views/issues/components/execution-log-section.test.tsx index 0343f354a..988892df4 100644 --- a/packages/views/issues/components/execution-log-section.test.tsx +++ b/packages/views/issues/components/execution-log-section.test.tsx @@ -69,4 +69,21 @@ describe("ActiveTaskRow", () => { expect(screen.getByText("View transcript")).toBeInTheDocument(); expect(mockState.taskMessagesOptions).not.toHaveBeenCalled(); }); + + it("does not make transcript actions depend on hover-only rendering", () => { + renderWithI18n(); + + const transcriptButton = screen.getByRole("button", { name: "View transcript" }); + const status = screen.getByText("5m 04s"); + + expect(status.parentElement?.className).toContain("flex h-7"); + expect(status.parentElement?.className).toContain( + "[@media(hover:hover)]:group-hover/execution-log-row:hidden", + ); + expect(transcriptButton.parentElement?.className).toContain("flex h-7"); + expect(transcriptButton.parentElement?.className).toContain("[@media(hover:hover)]:hidden"); + expect(transcriptButton.parentElement?.className).toContain( + "[@media(hover:hover)]:group-hover/execution-log-row:flex", + ); + }); }); diff --git a/packages/views/issues/components/execution-log-section.tsx b/packages/views/issues/components/execution-log-section.tsx index 513c1770b..b0b9bdd1c 100644 --- a/packages/views/issues/components/execution-log-section.tsx +++ b/packages/views/issues/components/execution-log-section.tsx @@ -466,7 +466,7 @@ function RowStatus({ return (
{children}
@@ -486,12 +486,11 @@ function TaskStatusIcon({ status }: { status: AgentTask["status"] }) { } } -// Action slot — hidden by default, replaces the status column in place on -// hover. No absolute/gradient needed: the status is removed (not covered), -// so nothing shows through underneath. +// Action slot — visible by default for touch devices. On hover-capable +// surfaces, it replaces the status column in place on row hover. function RowActions({ children }: { children: React.ReactNode }) { return ( -
+
{children}
);