Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- Changed repository link in search to file tree + move external link to code host logo. [#340](https://github.com/sourcebot-dev/sourcebot/pull/340)

## [4.2.0] - 2025-06-09

### Added
Expand Down
27 changes: 16 additions & 11 deletions packages/web/src/app/[domain]/components/pathHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,22 +223,27 @@ export const PathHeader = ({
return (
<div className="flex flex-row gap-2 items-center w-full overflow-hidden">
{info?.icon ? (
<Image
src={info.icon}
alt={info.codeHostName}
className={`w-4 h-4 ${info.iconClassName}`}
/>
): (
<a href={info.repoLink} target="_blank" rel="noopener noreferrer">
<Image
src={info.icon}
alt={info.codeHostName}
className={`w-4 h-4 ${info.iconClassName}`}
/>
</a>
) : (
<LaptopIcon className="w-4 h-4" />
)}
<Link
className={clsx("font-medium", {
"cursor-pointer hover:underline": info?.repoLink,
<div
className="font-medium cursor-pointer hover:underline"
onClick={() => navigateToPath({
repoName: repo.name,
path: '',
pathType: 'tree',
revisionName: branchDisplayName,
})}
href={info?.repoLink ?? ""}
>
{info?.displayName}
</Link>
</div>
{branchDisplayName && (
<p
className="text-xs font-semibold text-gray-500 dark:text-gray-400 mt-[3px] flex items-center gap-0.5"
Expand Down