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]

### Fixed
- Fixed repository images not loading when anonymous access is disabled. [#703](https://github.com/sourcebot-dev/sourcebot/pull/703)

### Changed
- Enable browser assisted autofill for username and password.[#696](https://github.com/sourcebot-dev/sourcebot/pull/696)

Expand Down
5 changes: 5 additions & 0 deletions packages/web/src/app/[domain]/repos/components/reposTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ export const getColumns = (context: ColumnsContext): ColumnDef<Repo>[] => [
const repo = row.original;
const codeHostIcon = getCodeHostIcon(repo.codeHostType);
const repoImageSrc = repo.imageUrl ? getRepoImageSrc(repo.imageUrl, repo.id) : undefined;
// Internal API routes require authentication headers (cookies/API keys) to be passed through.
// Next.js Image Optimization doesn't forward these headers, so we use unoptimized=true
// to bypass the optimization and make direct requests that include auth headers.
const isInternalApiImage = repoImageSrc?.startsWith('/api/');

return (
<div className="flex flex-row gap-2 items-center">
Expand All @@ -121,6 +125,7 @@ export const getColumns = (context: ColumnsContext): ColumnDef<Repo>[] => [
width={32}
height={32}
className="object-cover"
unoptimized={isInternalApiImage}
/>
) : <Image
src={codeHostIcon.src}
Expand Down
3 changes: 0 additions & 3 deletions packages/web/src/app/[domain]/repos/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ interface ReposPageProps {
export default async function ReposPage(props: ReposPageProps) {
const params = await props.searchParams;

console.log('asdf:');
console.log(z.coerce.number().int().safeParse(params.page).error);

// Parse pagination parameters with defaults
const page = numberSchema.safeParse(params.page).data ?? 1;
const pageSize = numberSchema.safeParse(params.pageSize).data ?? 5;
Expand Down