Feat/improve cache load state (#118)

* Fix auth logout redirect and add tree node spacing

* Remove app loader animation and related cleanup

Removes custom app loader UI from index.html and useEffect in App.tsx that handled loader fade-out transition
This commit is contained in:
Chris Scott authored and GitHub committed 2026-02-08 14:20:55 -05:00
1 parent bfe7954825
commit 6b30d13124
4 files changed
+11 -45

No files matched your search

+1 -10
View File
@@ -1,4 +1,4 @@
import { useEffect } from 'react'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { createBrowserRouter, RouterProvider, Outlet } from 'react-router-dom'
import { Toaster } from 'sonner'
@@ -63,15 +63,6 @@ function PermissionDialogWrapper() {
function AppShell() {
useTheme()
useEffect(() => {
const loader = document.getElementById('app-loader')
if (loader) {
loader.style.transition = 'opacity 0.2s ease-out'
loader.style.opacity = '0'
setTimeout(() => loader.remove(), 200)
}
}, [])
return (
<AuthProvider>
<EventProvider>
@@ -136,7 +136,7 @@ function TreeNode({ file, level, onFileSelect, onDirectoryClick, selectedFile, o
return (
<div>
<div
className={`flex items-center gap-1 px-2 py-1 hover:bg-muted rounded cursor-pointer group ${
className={`flex items-center gap-1 px-2 py-1 mb-4 hover:bg-muted rounded cursor-pointer group ${
selectedFile?.path === file.path ? 'bg-muted' : ''
}`}
style={{ paddingLeft: `${level * 16 + 8}px` }}
@@ -285,4 +285,4 @@ export const FileTree = memo(function FileTree({ files, onFileSelect, onDirector
)}
</div>
)
})
})
+8 -4
View File
@@ -112,10 +112,14 @@ export function AuthProvider({ children }: AuthProviderProps) {
}, [])
const logout = useCallback(async () => {
await signOut()
await refetch()
navigate('/login', { replace: true })
}, [refetch, navigate])
await signOut({
fetchOptions: {
onSuccess: () => {
window.location.href = '/login'
},
},
})
}, [])
const refreshSession = useCallback(async () => {
await refetch()