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 @@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Added commit graph generation to improve performance for commit traversal operations. [#791](https://github.com/sourcebot-dev/sourcebot/pull/791)

### Fixed
- Fixed issue where a file would fail to load when opening it from the /search view and it matched multiple branches. [#797](https://github.com/sourcebot-dev/sourcebot/pull/797)

## [4.10.17] - 2026-01-23

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const CodePreviewPanel = async ({ path, repoName, revisionName }: CodePre
displayName: repoInfoResponse.displayName,
webUrl: repoInfoResponse.webUrl,
}}
branchDisplayName={revisionName}
revisionName={revisionName}
/>

{fileWebUrl && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const TreePreviewPanel = async ({ path, repoName, revisionName }: TreePre
}}
pathType="tree"
isFileIconVisible={false}
branchDisplayName={revisionName}
revisionName={revisionName}
/>
</div>
<Separator />
Expand Down
10 changes: 6 additions & 4 deletions packages/web/src/app/[domain]/components/pathHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ interface FileHeaderProps {
},
isBranchDisplayNameVisible?: boolean;
branchDisplayName?: string;
revisionName?: string;
branchDisplayTitle?: string;
isCodeHostIconVisible?: boolean;
isFileIconVisible?: boolean;
Expand All @@ -53,7 +54,8 @@ export const PathHeader = ({
repo,
path,
pathHighlightRange,
branchDisplayName,
revisionName,
branchDisplayName = revisionName,
isBranchDisplayNameVisible = !!branchDisplayName,
branchDisplayTitle,
pathType = 'blob',
Expand Down Expand Up @@ -220,7 +222,7 @@ export const PathHeader = ({
repoName: repo.name,
path: '/',
pathType: 'tree',
revisionName: branchDisplayName,
revisionName,
domain,
})}
>
Expand Down Expand Up @@ -259,7 +261,7 @@ export const PathHeader = ({
repoName: repo.name,
path: segment.fullPath,
pathType: segment.isLastSegment ? pathType : 'tree',
revisionName: branchDisplayName,
revisionName,
domain,
})}
className="font-mono text-sm hover:cursor cursor-pointer"
Expand Down Expand Up @@ -288,7 +290,7 @@ export const PathHeader = ({
repoName: repo.name,
path: segment.fullPath,
pathType: segment.isLastSegment ? pathType : 'tree',
revisionName: branchDisplayName,
revisionName,
domain,
})}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ export const FileMatchContainer = ({
return file.branches;
}, [file.branches]);

const branchDisplayName = useMemo(() => {
if (branches.length === 0) {
return undefined;
}

return `${branches[0]}${branches.length > 1 ? ` +${branches.length - 1}` : ''}`;
const revisionName = useMemo(() => {
return branches.length > 0 ? branches[0] : undefined;
}, [branches]);

const branchDisplayName = useMemo(() => {
return revisionName ? `${revisionName}${branches.length > 1 ? ` +${branches.length - 1}` : ''}` : undefined;
}, [branches.length, revisionName]);

const repo = useMemo(() => {
return repoInfo[file.repositoryId];
}, [repoInfo, file.repositoryId]);
Expand All @@ -99,8 +99,9 @@ export const FileMatchContainer = ({
}}
path={file.fileName.text}
pathHighlightRange={fileNameRange}
isBranchDisplayNameVisible={isBranchFilteringEnabled}
revisionName={revisionName}
branchDisplayName={branchDisplayName}
isBranchDisplayNameVisible={isBranchFilteringEnabled}
branchDisplayTitle={branches.join(", ")}
/>
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const ReferenceList = ({
webUrl: repoInfo.webUrl,
}}
path={file.fileName}
branchDisplayName={revisionName === "HEAD" ? undefined : revisionName}
revisionName={revisionName === "HEAD" ? undefined : revisionName}
/>
</div>
<div className="divide-y">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ const ReferencedFileSourceListItem = ({
displayName: repoDisplayName,
webUrl: repoWebUrl,
}}
branchDisplayName={revision === 'HEAD' ? undefined : revision}
revisionName={revision === 'HEAD' ? undefined : revision}
repoNameClassName="font-normal text-muted-foreground text-sm"
/>
</div>
Expand Down