Skip to content

Commit e82f862

Browse files
fix(spotlight): clip oversized result rows so the list never scrolls horizontally
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 1ab6a8a commit e82f862

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/shared/src/components/spotlight/Spotlight.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ interface RowProps {
7575
}
7676

7777
const rowBaseClass =
78-
'group/spotlight-row mx-2 flex cursor-pointer items-center gap-3 rounded-10 px-3 text-left aria-disabled:cursor-not-allowed aria-disabled:opacity-40 data-[selected=true]:bg-surface-hover';
78+
'group/spotlight-row mx-2 flex min-w-0 cursor-pointer items-center gap-3 overflow-hidden rounded-10 px-3 text-left aria-disabled:cursor-not-allowed aria-disabled:opacity-40 data-[selected=true]:bg-surface-hover';
7979

8080
const TypedAvatar = ({
8181
src,
@@ -1033,7 +1033,7 @@ export const Spotlight = ({
10331033
<Command.List
10341034
key={`spotlight-list-${scope}`}
10351035
className={classNames(
1036-
'overflow-y-auto pb-1 [overflow-anchor:none] motion-safe:animate-spotlight-list-fade [&_*]:[overflow-anchor:none]',
1036+
'overflow-y-auto overflow-x-hidden pb-1 [overflow-anchor:none] motion-safe:animate-spotlight-list-fade [&_*]:[overflow-anchor:none]',
10371037
firstHeadingNoTopPaddingClass,
10381038
isMobile ? 'flex-1' : 'max-h-[min(640px,60vh)]',
10391039
)}

0 commit comments

Comments
 (0)