The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): cap the changed-files card and fade its overflow
Brooklyn Nicholson0b8a3582c6bc
diff --git a/apps/desktop/src/components/assistant-ui/thread/changed-files-card.tsx b/apps/desktop/src/components/assistant-ui/thread/changed-files-card.tsxindex 8a29c55de9c..b3d0fe1ad54 100644--- a/apps/desktop/src/components/assistant-ui/thread/changed-files-card.tsx+++ b/apps/desktop/src/components/assistant-ui/thread/changed-files-card.tsx@@ -5,11 +5,16 @@ import { useSessionView } from '@/app/chat/session-view'import { deriveChangedFiles } from '@/components/assistant-ui/thread/changed-files'import { WIDGET_SHELL_CLASS } from '@/components/chat/widget-shell'import { DiffCount } from '@/components/ui/diff-count'+import { FadeScroll } from '@/components/ui/fade-scroll'import { FileTypeIcon } from '@/components/ui/file-type-icon'import { useI18n } from '@/i18n'import { cn } from '@/lib/utils'import { openReviewForPath, revealReview } from '@/store/review'+// ~5 rows. A turn that rewrites twenty files should still read as one card in+// the transcript, not a wall the user has to scroll past to reach the composer.+const MAX_ROWS_HEIGHT = '9.375rem'+/*** Cursor-style "N files changed" summary closing out the newest assistant turn:* one row per file it edited with that file's +/-, and a Review action opening@@ -47,10 +52,10 @@ export const ChangedFilesCard: FC<{ parts: readonly unknown[] }> = ({ parts }) ={copy.reviewChanges}</button></div>- <div className="mt-1.5 flex flex-col">+ <FadeScroll className="-mx-1.5 mt-1.5 flex flex-col px-1.5" maxHeight={MAX_ROWS_HEIGHT}>{files.map(file => (<button- className="row-hover -mx-1.5 flex items-center gap-2 rounded-md px-1.5 py-1 text-left"+ className="row-hover flex shrink-0 items-center gap-2 rounded-md px-1.5 py-1 text-left"key={file.path}onClick={() => void openReviewForPath(file.path, scopeCwd)}title={file.path}@@ -61,7 +66,7 @@ export const ChangedFilesCard: FC<{ parts: readonly unknown[] }> = ({ parts }) =<DiffCount added={file.added} removed={file.removed} /></button>))}- </div>+ </FadeScroll></div>)}