chore(web): Bug fixes related to v4.8.0 release (#581)

This commit is contained in:
Brendan Kellam 2025-10-29 14:05:48 -07:00 committed by GitHub
parent bc592addad
commit 63cf48264d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 29 additions and 17 deletions

View file

@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [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 ## [4.8.0] - 2025-10-28
### Added ### Added

View file

@ -53,7 +53,7 @@ export default async function Page(props: PageProps) {
const indexedRepos = repos.filter((repo) => repo.indexedAt !== undefined); const indexedRepos = repos.filter((repo) => repo.indexedAt !== undefined);
return ( return (
<> <div className="flex flex-col h-screen w-screen">
<TopBar <TopBar
domain={params.domain} domain={params.domain}
homePath={`/${params.domain}/chat`} homePath={`/${params.domain}/chat`}
@ -87,6 +87,6 @@ export default async function Page(props: PageProps) {
isChatReadonly={isReadonly} isChatReadonly={isReadonly}
/> />
</ResizablePanelGroup> </ResizablePanelGroup>
</> </div>
) )
} }

View file

@ -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. // @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 // @see: https://ai-sdk.dev/docs/ai-sdk-ui/chatbot-message-persistence#resuming-ongoing-streams
<NavigationGuardProvider> <NavigationGuardProvider>
<div className="flex flex-col h-screen w-screen"> {children}
{children}
</div>
<TutorialDialog isOpen={!isTutorialDismissed} /> <TutorialDialog isOpen={!isTutorialDismissed} />
</NavigationGuardProvider> </NavigationGuardProvider>
) )

View file

@ -14,7 +14,7 @@ import { Input } from "@/components/ui/input"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table" import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
import { SINGLE_TENANT_ORG_DOMAIN } from "@/lib/constants" 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 { import {
type ColumnDef, type ColumnDef,
type ColumnFiltersState, type ColumnFiltersState,
@ -96,22 +96,29 @@ export const columns: ColumnDef<Repo>[] = [
) )
}, },
cell: ({ row }) => { 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 ( return (
<div className="flex flex-row gap-2 items-center"> <div className="flex flex-row gap-2 items-center">
{repo.imageUrl ? ( {
<Image repoImageSrc ? (
src={getRepoImageSrc(repo.imageUrl, repo.id) || "/placeholder.svg"} <Image
src={repoImageSrc}
alt={`${repo.displayName} logo`}
width={32}
height={32}
className="object-cover"
/>
) : <Image
src={codeHostIcon.src}
alt={`${repo.displayName} logo`} alt={`${repo.displayName} logo`}
width={32} width={32}
height={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 {/* Link to the details page (instead of browse) when the repo is indexing
as the code will not be available yet */} as the code will not be available yet */}
@ -124,7 +131,7 @@ export const columns: ColumnDef<Repo>[] = [
})} })}
className="font-medium hover:underline" className="font-medium hover:underline"
> >
{repo.displayName || repo.name} <span>{repo.displayName || repo.name}</span>
</Link> </Link>
{repo.isFirstTimeIndex && ( {repo.isFirstTimeIndex && (
<Tooltip> <Tooltip>

View file

@ -345,6 +345,7 @@ export const getCodeHostCommitUrl = ({
case 'bitbucket-server': case 'bitbucket-server':
return `${webUrl}/commits/${commitHash}`; return `${webUrl}/commits/${commitHash}`;
case 'gerrit': case 'gerrit':
return `${webUrl}/+/${commitHash}`;
case 'generic-git-host': case 'generic-git-host':
return undefined; return undefined;
} }
@ -377,6 +378,7 @@ export const getCodeHostBrowseAtBranchUrl = ({
case 'bitbucket-server': case 'bitbucket-server':
return `${webUrl}?at=${branchName}`; return `${webUrl}?at=${branchName}`;
case 'gerrit': case 'gerrit':
return `${webUrl}/+/${branchName}`;
case 'generic-git-host': case 'generic-git-host':
return undefined; return undefined;
} }