File tree Expand file tree Collapse file tree 4 files changed +31
-1
lines changed
packages/web/src/app/(app) Expand file tree Collapse file tree 4 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ import { FileSearchCommandDialog } from "./components/fileSearchCommandDialog";
1111import { SearchBar } from "../components/searchBar" ;
1212import escapeStringRegexp from "escape-string-regexp" ;
1313import { Session } from "next-auth" ;
14+ import Link from "next/link" ;
15+ import { Button } from "@/components/ui/button" ;
16+ import { BookMarkedIcon } from "lucide-react" ;
1417
1518interface LayoutProps {
1619 children : React . ReactNode ;
@@ -29,6 +32,14 @@ export function LayoutClient({
2932 < div className = "flex flex-col h-screen" >
3033 < TopBar
3134 session = { session }
35+ actions = {
36+ < Button variant = "outline" size = "sm" asChild >
37+ < Link href = "/repos" className = "gap-1.5" >
38+ < BookMarkedIcon className = "h-3.5 w-3.5" />
39+ Repositories
40+ </ Link >
41+ </ Button >
42+ }
3243 >
3344 < SearchBar
3445 size = "sm"
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ export const NavigationItems = ({
2626 if ( href === '/' ) {
2727 return pathname === '/' ;
2828 }
29+ if ( href === '/repos' ) {
30+ return pathname . startsWith ( '/repos' ) || pathname . startsWith ( '/browse' ) ;
31+ }
2932 return pathname . startsWith ( href ) ;
3033 } ;
3134
Original file line number Diff line number Diff line change @@ -55,7 +55,9 @@ export default async function ReposPage(props: ReposPageProps) {
5555 < >
5656 < div className = "mb-6" >
5757 < h1 className = "text-3xl font-semibold" > Repositories</ h1 >
58- < p className = "text-muted-foreground mt-2" > View and manage your code repositories and their indexing status.</ p >
58+ < p className = "text-muted-foreground mt-2" >
59+ View and manage your code repositories and their indexing status. Select a repository name to open it in the file explorer.
60+ </ p >
5961 </ div >
6062 < ReposTable
6163 data = { repos . map ( ( repo ) => ( {
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import { RepositoryCarousel } from "../../components/repositoryCarousel"
44import { Separator } from "@/components/ui/separator"
55import { SyntaxReferenceGuideHint } from "../../components/syntaxReferenceGuideHint"
66import Link from "next/link"
7+ import { Button } from "@/components/ui/button"
8+ import { FolderTreeIcon } from "lucide-react"
79import { SearchBar } from "../../components/searchBar"
810import { SearchModeSelector } from "../../components/searchModeSelector"
911import { getRepos , getReposStats } from "@/actions"
@@ -56,6 +58,18 @@ export const SearchLandingPage = async ({
5658 </ div >
5759 </ div >
5860
61+ < div className = "mt-5 flex flex-col items-center gap-1" >
62+ < Button variant = "outline" asChild >
63+ < Link href = "/repos" className = "gap-2" >
64+ < FolderTreeIcon className = "h-4 w-4" />
65+ Browse repositories
66+ </ Link >
67+ </ Button >
68+ < span className = "text-xs text-muted-foreground text-center max-w-sm" >
69+ Open the file explorer and pick a repo without running a search first.
70+ </ span >
71+ </ div >
72+
5973 < div className = "mt-8" >
6074 < RepositoryCarousel
6175 numberOfReposWithIndex = { repoStats . numberOfReposWithIndex }
You can’t perform that action at this time.
0 commit comments