Skip to content

Commit 63cf482

Browse files
chore(web): Bug fixes related to v4.8.0 release (#581)
1 parent bc592ad commit 63cf482

File tree

5 files changed

+29
-17
lines changed

5 files changed

+29
-17
lines changed

CHANGELOG.md

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

88
## [Unreleased]
99

10+
### Fixed
11+
- Fixed commit and branch hyperlinks not rendering for Gerrit repos. [#581](https://github.com/sourcebot-dev/sourcebot/pull/581)
12+
- Fixed visual bug when a repository does not have a image. [#581](https://github.com/sourcebot-dev/sourcebot/pull/581)
13+
- Fixed issue where the Ask homepage was not scrollable. [#581](https://github.com/sourcebot-dev/sourcebot/pull/581)
14+
1015
## [4.8.0] - 2025-10-28
1116

1217
### Added

packages/web/src/app/[domain]/chat/[id]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default async function Page(props: PageProps) {
5353
const indexedRepos = repos.filter((repo) => repo.indexedAt !== undefined);
5454

5555
return (
56-
<>
56+
<div className="flex flex-col h-screen w-screen">
5757
<TopBar
5858
domain={params.domain}
5959
homePath={`/${params.domain}/chat`}
@@ -87,6 +87,6 @@ export default async function Page(props: PageProps) {
8787
isChatReadonly={isReadonly}
8888
/>
8989
</ResizablePanelGroup>
90-
</>
90+
</div>
9191
)
9292
}

packages/web/src/app/[domain]/chat/layout.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ export default async function Layout({ children }: LayoutProps) {
1414
// @note: we use a navigation guard here since we don't support resuming streams yet.
1515
// @see: https://ai-sdk.dev/docs/ai-sdk-ui/chatbot-message-persistence#resuming-ongoing-streams
1616
<NavigationGuardProvider>
17-
<div className="flex flex-col h-screen w-screen">
18-
{children}
19-
</div>
17+
{children}
2018
<TutorialDialog isOpen={!isTutorialDismissed} />
2119
</NavigationGuardProvider>
2220
)

packages/web/src/app/[domain]/repos/components/reposTable.tsx

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { Input } from "@/components/ui/input"
1414
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
1515
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
1616
import { SINGLE_TENANT_ORG_DOMAIN } from "@/lib/constants"
17-
import { CodeHostType, getCodeHostCommitUrl, getCodeHostInfoForRepo, getRepoImageSrc } from "@/lib/utils"
17+
import { cn, CodeHostType, getCodeHostCommitUrl, getCodeHostIcon, getCodeHostInfoForRepo, getRepoImageSrc } from "@/lib/utils"
1818
import {
1919
type ColumnDef,
2020
type ColumnFiltersState,
@@ -96,22 +96,29 @@ export const columns: ColumnDef<Repo>[] = [
9696
)
9797
},
9898
cell: ({ row }) => {
99-
const repo = row.original
99+
const repo = row.original;
100+
const codeHostIcon = getCodeHostIcon(repo.codeHostType as CodeHostType);
101+
const repoImageSrc = repo.imageUrl ? getRepoImageSrc(repo.imageUrl, repo.id) : undefined;
102+
100103
return (
101104
<div className="flex flex-row gap-2 items-center">
102-
{repo.imageUrl ? (
103-
<Image
104-
src={getRepoImageSrc(repo.imageUrl, repo.id) || "/placeholder.svg"}
105+
{
106+
repoImageSrc ? (
107+
<Image
108+
src={repoImageSrc}
109+
alt={`${repo.displayName} logo`}
110+
width={32}
111+
height={32}
112+
className="object-cover"
113+
/>
114+
) : <Image
115+
src={codeHostIcon.src}
105116
alt={`${repo.displayName} logo`}
106117
width={32}
107118
height={32}
108-
className="object-cover"
119+
className={cn(codeHostIcon.className)}
109120
/>
110-
) : (
111-
<div className="flex h-full w-full items-center justify-center bg-muted text-xs font-medium uppercase text-muted-foreground">
112-
{repo.displayName?.charAt(0) ?? repo.name.charAt(0)}
113-
</div>
114-
)}
121+
}
115122

116123
{/* Link to the details page (instead of browse) when the repo is indexing
117124
as the code will not be available yet */}
@@ -124,7 +131,7 @@ export const columns: ColumnDef<Repo>[] = [
124131
})}
125132
className="font-medium hover:underline"
126133
>
127-
{repo.displayName || repo.name}
134+
<span>{repo.displayName || repo.name}</span>
128135
</Link>
129136
{repo.isFirstTimeIndex && (
130137
<Tooltip>

packages/web/src/lib/utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ export const getCodeHostCommitUrl = ({
345345
case 'bitbucket-server':
346346
return `${webUrl}/commits/${commitHash}`;
347347
case 'gerrit':
348+
return `${webUrl}/+/${commitHash}`;
348349
case 'generic-git-host':
349350
return undefined;
350351
}
@@ -377,6 +378,7 @@ export const getCodeHostBrowseAtBranchUrl = ({
377378
case 'bitbucket-server':
378379
return `${webUrl}?at=${branchName}`;
379380
case 'gerrit':
381+
return `${webUrl}/+/${branchName}`;
380382
case 'generic-git-host':
381383
return undefined;
382384
}

0 commit comments

Comments
 (0)