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

### Added
- Linear issue links in chat responses now render as a rich card-style UI showing the Linear logo, issue identifier, and title instead of plain hyperlinks. [#1060](https://github.com/sourcebot-dev/sourcebot/pull/1060)
- Added a "Browse repositories" entry point on the search landing page, a Repositories shortcut in the file explorer top bar, and clearer repo list copy so users can open the file explorer without running a search first. [#1100](https://github.com/sourcebot-dev/sourcebot/pull/1100)

### Changed
- Links in Ask Sourcebot chat responses now open in a new tab with a subtle external link icon indicator. [#1059](https://github.com/sourcebot-dev/sourcebot/pull/1059)
Expand Down
11 changes: 11 additions & 0 deletions packages/web/src/app/(app)/browse/layoutClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import { FileSearchCommandDialog } from "./components/fileSearchCommandDialog";
import { SearchBar } from "../components/searchBar";
import escapeStringRegexp from "escape-string-regexp";
import { Session } from "next-auth";
import Link from "next/link";
import { Button } from "@/components/ui/button";
import { BookMarkedIcon } from "lucide-react";

interface LayoutProps {
children: React.ReactNode;
Expand All @@ -29,6 +32,14 @@ export function LayoutClient({
<div className="flex flex-col h-screen">
<TopBar
session={session}
actions={
<Button variant="outline" size="sm" asChild>
<Link href="/repos" className="gap-1.5">
<BookMarkedIcon className="h-3.5 w-3.5" />
Repositories
</Link>
</Button>
}
>
<SearchBar
size="sm"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ export const NavigationItems = ({
if (href === '/') {
return pathname === '/';
}
if (href === '/repos') {
return (
pathname === '/repos' ||
pathname.startsWith('/repos/') ||
pathname === '/browse' ||
pathname.startsWith('/browse/')
);
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
return pathname.startsWith(href);
};

Expand Down
4 changes: 3 additions & 1 deletion packages/web/src/app/(app)/repos/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ export default async function ReposPage(props: ReposPageProps) {
<>
<div className="mb-6">
<h1 className="text-3xl font-semibold">Repositories</h1>
<p className="text-muted-foreground mt-2">View and manage your code repositories and their indexing status.</p>
<p className="text-muted-foreground mt-2">
View and manage your code repositories and their indexing status. Select a repository name to open it in the file explorer.
</p>
</div>
<ReposTable
data={repos.map((repo) => ({
Expand Down
14 changes: 14 additions & 0 deletions packages/web/src/app/(app)/search/components/searchLandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { RepositoryCarousel } from "../../components/repositoryCarousel"
import { Separator } from "@/components/ui/separator"
import { SyntaxReferenceGuideHint } from "../../components/syntaxReferenceGuideHint"
import Link from "next/link"
import { Button } from "@/components/ui/button"
import { FolderTreeIcon } from "lucide-react"
import { SearchBar } from "../../components/searchBar"
import { SearchModeSelector } from "../../components/searchModeSelector"
import { getRepos, getReposStats } from "@/actions"
Expand Down Expand Up @@ -56,6 +58,18 @@ export const SearchLandingPage = async ({
</div>
</div>

<div className="mt-5 flex flex-col items-center gap-1">
<Button variant="outline" asChild>
<Link href="/repos" className="gap-2">
<FolderTreeIcon className="h-4 w-4" />
Browse repositories
</Link>
</Button>
<span className="text-xs text-muted-foreground text-center max-w-sm">
Open the file explorer and pick a repo without running a search first.
</span>
</div>

<div className="mt-8">
<RepositoryCarousel
numberOfReposWithIndex={repoStats.numberOfReposWithIndex}
Expand Down
Loading