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): prevent changed files header overlap (#6314)
t3-code[bot]e321667b100a
diff --git a/apps/web/src/components/chat/ChangedFilesTree.test.tsx b/apps/web/src/components/chat/ChangedFilesTree.test.tsxindex ec5875682..e9fa1895b 100644--- a/apps/web/src/components/chat/ChangedFilesTree.test.tsx+++ b/apps/web/src/components/chat/ChangedFilesTree.test.tsx@@ -23,6 +23,14 @@ describe("ChangedFilesCard", () => {expect(markup).toContain('data-changed-files-state="expanded"');expect(markup).toContain('aria-expanded="true"');expect(markup).toContain("whitespace-nowrap");+ expect(markup).toContain(+ 'class="group flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden',+ );+ expect(markup).toContain('class="flex shrink-0 items-center gap-1 whitespace-nowrap');+ expect(markup).toContain('class="ml-1 hidden min-w-0 flex-1 truncate');+ expect(markup).toContain("@[24rem]/changed-files:inline");+ expect(markup).not.toContain("sm:inline");+ expect(markup).toContain('class="flex shrink-0 items-center gap-1.5"');expect(markup).toContain("!size-[22px]");expect(markup).toContain("size-3");expect(markup).toContain('aria-label="Collapse all folders"');diff --git a/apps/web/src/components/chat/ChangedFilesTree.tsx b/apps/web/src/components/chat/ChangedFilesTree.tsxindex 0955bd3ab..d29d8b7f2 100644--- a/apps/web/src/components/chat/ChangedFilesTree.tsx+++ b/apps/web/src/components/chat/ChangedFilesTree.tsx@@ -56,7 +56,7 @@ export const ChangedFilesCard = memo(function ChangedFilesCard(props: {return (<div- className="mt-4 rounded-2xl border border-border/70 bg-secondary p-2 dark:border-transparent dark:bg-input/32"+ className="@container/changed-files mt-4 rounded-2xl border border-border/70 bg-secondary p-2 dark:border-transparent dark:bg-input/32"data-changed-files-state={expanded ? "expanded" : compactPreviewVisible ? "preview" : "collapsed"}@@ -73,7 +73,7 @@ export const ChangedFilesCard = memo(function ChangedFilesCard(props: {type="button"aria-expanded={expanded}data-scroll-anchor-ignore- className="group flex min-w-0 flex-1 items-center gap-1.5 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"+ 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"onClick={() => onExpandedChange(!expanded)}><ChevronRightIcon@@ -83,7 +83,7 @@ export const ChangedFilesCard = memo(function ChangedFilesCard(props: {expanded && "rotate-90",)}/>- <span className="flex min-w-0 items-center gap-1 whitespace-nowrap font-medium text-foreground text-xs leading-4">+ <span className="flex shrink-0 items-center gap-1 whitespace-nowrap font-medium text-foreground text-xs leading-4"><span>{files.length} changed file{files.length === 1 ? "" : "s"}</span>@@ -96,11 +96,11 @@ export const ChangedFilesCard = memo(function ChangedFilesCard(props: {/>)}</span>- <span className="ml-1 hidden truncate text-[11px] text-muted-foreground group-hover:text-foreground/80 sm:inline">+ <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">{expanded ? "Hide files" : "Show files"}</span></button>- <div className="flex items-center gap-1.5">+ <div className="flex shrink-0 items-center gap-1.5">{expanded ? (<Tooltip><TooltipTrigger@@ -142,7 +142,7 @@ export const ChangedFilesCard = memo(function ChangedFilesCard(props: {}><FileDiffIcon className="size-3" />- <span className="hidden sm:inline">Open diff</span>+ <span className="hidden @[24rem]/changed-files:inline">Open diff</span></TooltipTrigger><TooltipPopup side="top">Open the full diff</TooltipPopup></Tooltip>