From 739f4d3d5cb8afb52244106531043ea5a78223d2 Mon Sep 17 00:00:00 2001
From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com>
Date: Thu, 22 Oct 2026 09:20:24 -0400
Subject: [PATCH 1/2] feat(frontend): move the mobile add-repo action into the
search row
The header ran out of room on narrow screens now that the server switcher is
always present. The Repo button is desktop-only and mobile gets a bordered
icon button beside the search input instead. The empty state carries its own
add button, since it renders no search row.
---
frontend/src/components/repo/RepoList.tsx | 10 ++-
.../components/repo/RepoListControls.test.tsx | 70 +++++++++++++++++++
.../src/components/repo/RepoListControls.tsx | 25 ++++++-
frontend/src/pages/Repos.tsx | 8 ++-
4 files changed, 107 insertions(+), 6 deletions(-)
create mode 100644 frontend/src/components/repo/RepoListControls.test.tsx
diff --git a/frontend/src/components/repo/RepoList.tsx b/frontend/src/components/repo/RepoList.tsx
index b222b2af2..968f3af41 100644
--- a/frontend/src/components/repo/RepoList.tsx
+++ b/frontend/src/components/repo/RepoList.tsx
@@ -6,8 +6,9 @@ import { CSS } from "@dnd-kit/utilities"
import { listRepos, deleteRepo, updateRepoOrder, type DeleteBranchChoice } from "@/api/repos"
import { fetchReposGitStatus } from "@/api/git"
import { DeleteDialog } from "@/components/ui/delete-dialog"
+import { Button } from "@/components/ui/button"
import { RadioOptionGroup, type RadioOption } from "@/components/ui/radio-option-group"
-import { GitBranch, Search, GripVertical } from "lucide-react"
+import { GitBranch, Search, GripVertical, Plus } from "lucide-react"
import type { Repo } from "@/api/types"
import type { GitStatusResponse } from "@/types/git"
import { RepoCard } from "./RepoCard"
@@ -135,7 +136,7 @@ function StaticRepoCard({
)
}
-export function RepoList() {
+export function RepoList({ onAddRepo }: { onAddRepo: () => void }) {
const queryClient = useQueryClient()
const isMobile = useMobile()
const { preferences, updateSettings } = useSettings()
@@ -341,6 +342,10 @@ export function RepoList() {