The best way to control Claude Code, Codex and more from any computer or phone
fix(web): stop clipping the changed-files expand hover on Windows (#6545)
Co-authored-by: Cursor <cursoragent@cursor.com>
Mark Griffin committed
Aug 15, 2026 at 13:26 UTC
d550b829bd169fa8973b17df940ef2fbf2e69f37
2 files changed
+30
-28
apps/web/src/components/chat/ChangedFilesTree.test.tsx
+4
-4
@@ -23,14 +23,14 @@ describe("ChangedFilesCard", () => {
23
expect(markup).toContain('data-changed-files-state="expanded"');
24
expect(markup).toContain('aria-expanded="true"');
25
expect(markup).toContain("whitespace-nowrap");
26
- expect(markup).toContain(
27
- 'class="group flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden',
28
- );
26
+ expect(markup).toContain('class="group flex min-w-0 flex-1 items-center rounded-xl');
27
+ expect(markup).not.toMatch(/class="group flex min-w-0 flex-1 items-center[^"]*overflow-hidden/);
28
+ expect(markup).toContain('class="flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden"');
29
expect(markup).toContain('class="flex shrink-0 items-center gap-1 whitespace-nowrap');
30
expect(markup).toContain('class="ml-1 hidden min-w-0 flex-1 truncate');
31
expect(markup).toContain("@[24rem]/changed-files:inline");
32
expect(markup).not.toContain("sm:inline");
33
- expect(markup).toContain('class="flex shrink-0 items-center gap-1.5"');
33
+ expect(markup).toContain('class="flex shrink-0 items-center gap-1.5 pr-1"');
34
expect(markup).toContain("!size-[22px]");
35
expect(markup).toContain("size-3");
36
expect(markup).toContain('aria-label="Collapse all folders"');
apps/web/src/components/chat/ChangedFilesTree.tsx
+26
-24
@@ -64,7 +64,7 @@ export const ChangedFilesCard = memo(function ChangedFilesCard(props: {
64
<div
65
data-changed-files-header=""
66
className={cn(
67
- "flex items-center justify-between gap-2 rounded-xl px-1",
67
+ "flex items-center justify-between gap-2 rounded-xl",
68
expanded &&
69
"sticky top-2 z-10 mb-2 bg-secondary dark:bg-[color-mix(in_srgb,var(--foreground)_2.5%,var(--background))]",
70
)}
@@ -73,34 +73,36 @@ export const ChangedFilesCard = memo(function ChangedFilesCard(props: {
73
type="button"
74
aria-expanded={expanded}
75
data-scroll-anchor-ignore
76
- className="group flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden rounded-lg px-1 py-1.5 text-left transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
76
+ className="group flex min-w-0 flex-1 items-center rounded-xl px-2 py-1.5 text-left transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
77
onClick={() => onExpandedChange(!expanded)}
78
>
79
- <ChevronRightIcon
80
- aria-hidden="true"
81
- className={cn(
82
- "size-3.5 shrink-0 text-muted-foreground transition-transform",
83
- expanded && "rotate-90",
84
- )}
85
- />
86
- <span className="flex shrink-0 items-center gap-1 whitespace-nowrap font-medium text-foreground text-xs leading-4">
87
- <span>
88
- {files.length} changed file{files.length === 1 ? "" : "s"}
79
+ <span className="flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden">
80
+ <ChevronRightIcon
81
+ aria-hidden="true"
82
+ className={cn(
83
+ "size-3.5 shrink-0 text-muted-foreground transition-transform",
84
+ expanded && "rotate-90",
85
+ )}
86
+ />
87
+ <span className="flex shrink-0 items-center gap-1 whitespace-nowrap font-medium text-foreground text-xs leading-4">
88
+ <span>
89
+ {files.length} changed file{files.length === 1 ? "" : "s"}
90
+ </span>
91
+ {hasNonZeroStat(summaryStat) && (
92
+ <DiffStatLabel
93
+ additions={summaryStat.additions}
94
+ className="text-xs leading-4"
95
+ deletions={summaryStat.deletions}
96
+ layout="inline"
97
+ />
98
+ )}
99
+ </span>
100
+ <span className="ml-1 hidden min-w-0 flex-1 truncate text-[11px] text-muted-foreground group-hover:text-foreground/80 @[24rem]/changed-files:inline">
101
+ {expanded ? "Hide files" : "Show files"}
102
</span>
90
- {hasNonZeroStat(summaryStat) && (
91
- <DiffStatLabel
92
- additions={summaryStat.additions}
93
- className="text-xs leading-4"
94
- deletions={summaryStat.deletions}
95
- layout="inline"
96
- />
97
- )}
98
- </span>
99
- <span className="ml-1 hidden min-w-0 flex-1 truncate text-[11px] text-muted-foreground group-hover:text-foreground/80 @[24rem]/changed-files:inline">
100
- {expanded ? "Hide files" : "Show files"}
103
</span>
104
</button>
103
- <div className="flex shrink-0 items-center gap-1.5">
105
+ <div className="flex shrink-0 items-center gap-1.5 pr-1">
106
{expanded ? (
107
<Tooltip>
108
<TooltipTrigger