From d6b2d555ca15c18ca8185ce87a7d59e37eecef32 Mon Sep 17 00:00:00 2001 From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com> Date: Sat, 26 Sep 2026 22:16:28 -0400 Subject: [PATCH] feat(sidebar): add loading state to new session button and reposition repo toggle --- .../components/navigation/RepoSessionNav.tsx | 59 ++++++++++++------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/frontend/src/components/navigation/RepoSessionNav.tsx b/frontend/src/components/navigation/RepoSessionNav.tsx index b7cff1b6..02c2ae80 100644 --- a/frontend/src/components/navigation/RepoSessionNav.tsx +++ b/frontend/src/components/navigation/RepoSessionNav.tsx @@ -1,7 +1,6 @@ import { useEffect, useMemo, useState, type CSSProperties, type ReactNode } from 'react' import { useLocation } from 'react-router-dom' -import { Bell, ChevronDown, ChevronRight, HelpCircle, Pin, Plus, X } from 'lucide-react' -import { Button } from '@/components/ui/button' +import { Bell, ChevronDown, ChevronRight, HelpCircle, Loader2, Pin, Plus, X } from 'lucide-react' import { SessionStatusIndicator } from '@/components/ui/session-status-indicator' import { useForms, usePermissions } from '@/contexts/EventContext' import { useCreateSession } from '@/hooks/useOpenCode' @@ -49,18 +48,33 @@ export function RepoNavGroup({ return (
{isOpen && } + {onToggle && ( + + )} - {actions &&
{actions}
} - {onToggle && ( - - )} + {actions &&
{actions}
}
{isOpen && children && (
@@ -266,14 +269,30 @@ export function NewSessionButton({ onOpenSession(getSessionPath(repo.id, session.id)) }) + const isCreating = createSession.isPending + return ( - + + {isCreating ? : } + + ) }