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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- Fixed commit and branch hyperlinks not rendering for Gerrit repos. [#581](https://github.com/sourcebot-dev/sourcebot/pull/581)
- Fixed visual bug when a repository does not have a image. [#581](https://github.com/sourcebot-dev/sourcebot/pull/581)
- Fixed issue where the Ask homepage was not scrollable. [#581](https://github.com/sourcebot-dev/sourcebot/pull/581)

## [4.8.0] - 2025-10-28

### Added
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/app/[domain]/chat/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default async function Page(props: PageProps) {
const indexedRepos = repos.filter((repo) => repo.indexedAt !== undefined);

return (
<>
<div className="flex flex-col h-screen w-screen">
<TopBar
domain={params.domain}
homePath={`/${params.domain}/chat`}
Expand Down Expand Up @@ -87,6 +87,6 @@ export default async function Page(props: PageProps) {
isChatReadonly={isReadonly}
/>
</ResizablePanelGroup>
</>
</div>
)
}
4 changes: 1 addition & 3 deletions packages/web/src/app/[domain]/chat/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ export default async function Layout({ children }: LayoutProps) {
// @note: we use a navigation guard here since we don't support resuming streams yet.
// @see: https://ai-sdk.dev/docs/ai-sdk-ui/chatbot-message-persistence#resuming-ongoing-streams
<NavigationGuardProvider>
<div className="flex flex-col h-screen w-screen">
{children}
</div>
{children}
<TutorialDialog isOpen={!isTutorialDismissed} />
</NavigationGuardProvider>
)
Expand Down
31 changes: 19 additions & 12 deletions packages/web/src/app/[domain]/repos/components/reposTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Input } from "@/components/ui/input"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
import { SINGLE_TENANT_ORG_DOMAIN } from "@/lib/constants"
import { CodeHostType, getCodeHostCommitUrl, getCodeHostInfoForRepo, getRepoImageSrc } from "@/lib/utils"
import { cn, CodeHostType, getCodeHostCommitUrl, getCodeHostIcon, getCodeHostInfoForRepo, getRepoImageSrc } from "@/lib/utils"
import {
type ColumnDef,
type ColumnFiltersState,
Expand Down Expand Up @@ -96,22 +96,29 @@ export const columns: ColumnDef<Repo>[] = [
)
},
cell: ({ row }) => {
const repo = row.original
const repo = row.original;
const codeHostIcon = getCodeHostIcon(repo.codeHostType as CodeHostType);
const repoImageSrc = repo.imageUrl ? getRepoImageSrc(repo.imageUrl, repo.id) : undefined;

return (
<div className="flex flex-row gap-2 items-center">
{repo.imageUrl ? (
<Image
src={getRepoImageSrc(repo.imageUrl, repo.id) || "/placeholder.svg"}
{
repoImageSrc ? (
<Image
src={repoImageSrc}
alt={`${repo.displayName} logo`}
width={32}
height={32}
className="object-cover"
/>
) : <Image
src={codeHostIcon.src}
alt={`${repo.displayName} logo`}
width={32}
height={32}
className="object-cover"
className={cn(codeHostIcon.className)}
/>
) : (
<div className="flex h-full w-full items-center justify-center bg-muted text-xs font-medium uppercase text-muted-foreground">
{repo.displayName?.charAt(0) ?? repo.name.charAt(0)}
</div>
)}
}

{/* Link to the details page (instead of browse) when the repo is indexing
as the code will not be available yet */}
Expand All @@ -124,7 +131,7 @@ export const columns: ColumnDef<Repo>[] = [
})}
className="font-medium hover:underline"
>
{repo.displayName || repo.name}
<span>{repo.displayName || repo.name}</span>
</Link>
{repo.isFirstTimeIndex && (
<Tooltip>
Expand Down
2 changes: 2 additions & 0 deletions packages/web/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ export const getCodeHostCommitUrl = ({
case 'bitbucket-server':
return `${webUrl}/commits/${commitHash}`;
case 'gerrit':
return `${webUrl}/+/${commitHash}`;
case 'generic-git-host':
return undefined;
}
Expand Down Expand Up @@ -377,6 +378,7 @@ export const getCodeHostBrowseAtBranchUrl = ({
case 'bitbucket-server':
return `${webUrl}?at=${branchName}`;
case 'gerrit':
return `${webUrl}/+/${branchName}`;
case 'generic-git-host':
return undefined;
}
Expand Down
Loading