Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(desktop): keep tab Pin/Close clickable in fullscreen on a secondary display (#10825)
rawlence428ef30fed49
diff --git a/apps/desktop/src/renderer/src/components/tab-bar.test.tsx b/apps/desktop/src/renderer/src/components/tab-bar.test.tsxindex 6dbb1d5ff1..8d193190a3 100644--- a/apps/desktop/src/renderer/src/components/tab-bar.test.tsx+++ b/apps/desktop/src/renderer/src/components/tab-bar.test.tsx@@ -233,6 +233,19 @@ describe("TabBar hover action buttons", () => {expect(queryAllByLabelText("Close tab")).toHaveLength(1);});+ it("keeps Pin and Close shown while the tab is pressed, not only on hover", () => {+ // In full screen on a secondary display, Electron fires an offset+ // pointermove right after pointerdown (electron/electron#55100), which+ // drops :hover before mouseup. :active survives it.+ const { getAllByLabelText } = render(<TabBar />);+ for (const button of [+ ...getAllByLabelText("Pin tab"),+ ...getAllByLabelText("Close tab"),+ ]) {+ expect(button).toHaveClass("hidden", "group-hover:flex", "group-active:flex");+ }+ });+it("keeps the full title visible on a pinned tab (no icon-only collapse)", () => {state.byWorkspace.acme.tabs = [{ id: "tA", url: "/acme/issues", title: "Issues", pinned: true },diff --git a/apps/desktop/src/renderer/src/components/tab-bar.tsx b/apps/desktop/src/renderer/src/components/tab-bar.tsxindex a5caec6762..3178c2fa20 100644--- a/apps/desktop/src/renderer/src/components/tab-bar.tsx+++ b/apps/desktop/src/renderer/src/components/tab-bar.tsx@@ -306,13 +306,17 @@ function SortableTabItem({>{title}</span>+ {/* group-active keeps Pin/Close shown while pressed. In macOS fullscreen on a+ secondary display, Electron sends an offset pointermove right after+ pointerdown (electron/electron#55100); that drops :hover, hides the+ button before mouseup, and the click lands on the tab instead. */}<spanonClick={handleTogglePin}onPointerDown={stopDragOnAction}role="button"aria-label={pinLabel}title={pinLabel}- className="hidden size-3.5 shrink-0 items-center justify-center rounded-sm text-muted-foreground transition-colors group-hover:flex hover:bg-muted-foreground/20 hover:text-foreground"+ className="hidden size-3.5 shrink-0 items-center justify-center rounded-sm text-muted-foreground transition-colors group-hover:flex group-active:flex hover:bg-muted-foreground/20 hover:text-foreground">{tab.pinned ? <PinOff className="size-2.5" /> : <Pin className="size-2.5" />}</span>@@ -322,7 +326,7 @@ function SortableTabItem({onPointerDown={stopDragOnAction}role="button"aria-label={closeLabel}- className="hidden size-3.5 shrink-0 items-center justify-center rounded-sm text-muted-foreground transition-colors group-hover:flex hover:bg-muted-foreground/20 hover:text-foreground"+ className="hidden size-3.5 shrink-0 items-center justify-center rounded-sm text-muted-foreground transition-colors group-hover:flex group-active:flex hover:bg-muted-foreground/20 hover:text-foreground"><X className="size-2.5" /></span>