Skip to content

Commit 47ec6e8

Browse files
fix(web): Fix ask sb visual nits (#747)
1 parent 9ef0f34 commit 47ec6e8

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212

1313
### Fixed
1414
- Fixed "Invalid line number XXX in 21-line document" error when a invalid highlight range is passed to the file viewer. [#745](https://github.com/sourcebot-dev/sourcebot/pull/745)
15+
- Fixed visual nit where ask sb search scope selector would render long repository names poorly. [#747](https://github.com/sourcebot-dev/sourcebot/pull/747)
16+
- Fixed visual nit where long search previews in ask sb would take up a lot of space. [#747](https://github.com/sourcebot-dev/sourcebot/pull/747)
1517

1618
## [4.10.11] - 2026-01-16
1719

packages/web/src/features/chat/components/chatBox/searchScopeSelector.tsx

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -320,23 +320,17 @@ export const SearchScopeSelector = forwardRef<
320320
>
321321
<CheckIcon className="h-4 w-4" />
322322
</div>
323-
<div className="flex items-center gap-2 flex-1">
323+
<div className="flex flex-row items-center gap-2 w-full overflow-hidden">
324324
<SearchScopeIcon searchScope={item} />
325-
<div className="flex flex-col flex-1">
326-
<div className="flex items-center gap-2">
327-
<span className="font-medium">
328-
{item.name}
329-
</span>
330-
{item.type === 'reposet' && (
331-
<Badge
332-
variant="default"
333-
className="text-[10px] px-1.5 py-0 h-4 bg-primary text-primary-foreground"
334-
>
335-
{item.repoCount} repo{item.repoCount === 1 ? '' : 's'}
336-
</Badge>
337-
)}
338-
</div>
339-
</div>
325+
<p className="font-medium truncate-start">{item.name}</p>
326+
{item.type === 'reposet' && (
327+
<Badge
328+
variant="default"
329+
className="text-[10px] px-1.5 py-0 h-4 bg-primary text-primary-foreground"
330+
>
331+
{item.repoCount} repo{item.repoCount === 1 ? '' : 's'}
332+
</Badge>
333+
)}
340334
</div>
341335
</div>
342336
);

packages/web/src/features/chat/components/chatThread/tools/shared.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const ToolHeader = ({ isLoading, isError, isExpanded, label, Icon, onExpa
9090
<div
9191
tabIndex={0}
9292
className={cn(
93-
"flex flex-row items-center gap-2 group w-fit select-none",
93+
"flex flex-row items-center gap-2 group select-none",
9494
{
9595
'hover:text-foreground cursor-pointer': !isLoading,
9696
},
@@ -107,16 +107,20 @@ export const ToolHeader = ({ isLoading, isError, isExpanded, label, Icon, onExpa
107107
}}
108108
>
109109
{isLoading ? (
110-
<Loader2 className="w-4 h-4 animate-spin" />
110+
<Loader2 className="w-4 h-4 animate-spin flex-shrink-0" />
111111
) : (
112-
<Icon className="h-4 w-4" />
112+
<Icon className="h-4 w-4 flex-shrink-0" />
113113
)}
114-
<span className={cn("text-sm font-medium",
114+
<span
115+
className={cn("text-sm font-medium line-clamp-2",
115116
{
116117
'animate-pulse': isLoading,
117118
'text-destructive': isError,
118119
}
119-
)}>{label}</span>
120+
)}
121+
>
122+
{label}
123+
</span>
120124
{!isLoading && (
121125
<div className="opacity-0 group-hover:opacity-100 transition-opacity">
122126
{isExpanded ? (

0 commit comments

Comments
 (0)