From 6cc669e6be58b66d35728e1e2d0af15da22bf054 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Sat, 9 May 2026 13:23:49 -0400 Subject: [PATCH] feat(run-files): make diff scope a dropdown next to file count Replaces the All/Uncommitted/Committed pill toggle with a Listbox dropdown and moves it next to the "N files changed" header so the filter sits with the count it modifies. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../app/routes/run-files/toolbar.tsx | 74 +++++++++++++------ 1 file changed, 50 insertions(+), 24 deletions(-) diff --git a/apps/fabro-web/app/routes/run-files/toolbar.tsx b/apps/fabro-web/app/routes/run-files/toolbar.tsx index dcb19267b..a1601b609 100644 --- a/apps/fabro-web/app/routes/run-files/toolbar.tsx +++ b/apps/fabro-web/app/routes/run-files/toolbar.tsx @@ -1,5 +1,12 @@ import type { RefObject } from "react"; +import { + Listbox, + ListboxButton, + ListboxOption, + ListboxOptions, +} from "@headlessui/react"; import { ArrowPathIcon } from "@heroicons/react/20/solid"; +import { CheckIcon, ChevronUpDownIcon } from "@heroicons/react/16/solid"; import type { RunFileScope } from "../../lib/query-keys"; /** @@ -57,7 +64,10 @@ export function Toolbar({ : "Refresh"; return (
-
+
+ {showScopePicker ? ( + + ) : null}

{totalChanged} {" "} @@ -79,9 +89,6 @@ export function Toolbar({ {freshness} ) : null} - {showScopePicker ? ( - - ) : null} void; }) { - const btn = - "rounded px-2.5 py-1 text-xs font-medium transition-colors"; - const active = "bg-overlay-strong text-fg"; - const inactive = "text-fg-3 hover:text-fg"; + const selected = + scopeOptions.find((o) => o.value === value) ?? scopeOptions[0]; return ( -

- {scopeOptions.map((option) => ( - - ))} -
+ {selected.label} +
+ ); }