From f647ec54b66d02a176c4c01d9bd42d858bcaf19b Mon Sep 17 00:00:00 2001 From: Jinwoo-H Date: Mon, 4 May 2026 20:15:12 -0400 Subject: [PATCH] refactor(resource-usage): inline pill switcher + icon-only daemon actions Replaces the heavyweight Radix Tabs strip with a compact segmented pill switcher in the popover header, and moves the Restart daemon and Kill all sessions buttons to icon-only triggers in the top-right of the same header. Removes the full-width footer and the unused Tabs primitive import. Tooltips carry the verbs so the icons stay scannable. Co-authored-by: Orca --- .../status-bar/ResourceUsageStatusSegment.tsx | 152 +++++++++++------- 1 file changed, 94 insertions(+), 58 deletions(-) diff --git a/src/renderer/src/components/status-bar/ResourceUsageStatusSegment.tsx b/src/renderer/src/components/status-bar/ResourceUsageStatusSegment.tsx index affa2fe7a04..c56f1c049e0 100644 --- a/src/renderer/src/components/status-bar/ResourceUsageStatusSegment.tsx +++ b/src/renderer/src/components/status-bar/ResourceUsageStatusSegment.tsx @@ -15,7 +15,6 @@ import { Trash2 } from 'lucide-react' import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover' -import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' import { Button } from '@/components/ui/button' import { cn } from '@/lib/utils' @@ -986,6 +985,88 @@ export function ResourceUsageStatusSegment({ className="w-[26rem] p-0" onOpenAutoFocus={(event) => event.preventDefault()} > + {/* Why: header is the only chrome — left side carries an inline pill + switcher between Resources and Sessions; right side carries the + two daemon-control icons. The bulky Radix Tabs strip and the + full-width footer were both removed because they created visual + noise and competed with the data underneath. */} +
+
+ + +
+ +
+ + + + + + Restart daemon + + + + + + + + Kill all sessions + + +
+
+ {daemonUnreachable && (
@@ -1008,7 +1089,7 @@ export function ResourceUsageStatusSegment({
)} - {snapshot && ( + {snapshot && activeTab === 'resources' && (
@@ -1056,28 +1137,8 @@ export function ResourceUsageStatusSegment({
)} - setActiveTab(value as TabKey)} - className="w-full" - > - - - Resources - - - Terminal Sessions - {orphanCount > 0 && ({orphanCount})} - - - - + {activeTab === 'resources' ? ( + <> {snapshot && (
)} -
- - - void refreshSessions()} - /> - -
- -
- - -
+ + ) : ( + void refreshSessions()} + /> + )}