diff --git a/src/renderer/components/bars/Title.tsx b/src/renderer/components/bars/Title.tsx
index 2c70049..493a885 100644
--- a/src/renderer/components/bars/Title.tsx
+++ b/src/renderer/components/bars/Title.tsx
@@ -28,7 +28,7 @@ export default function TitleBar({ title, icon, mode = "full", onClose }: TitleB
WebkitAppRegion: "drag",
} as CSSProperties
}
- onDoubleClick={() => window.api.window.toggleMaximize()}
+ onDoubleClick={() => window.api.windows.toggleMaximize()}
>
{icon && !window.api.platform.isMacOS && (
@@ -48,7 +48,7 @@ export default function TitleBar({ title, icon, mode = "full", onClose }: TitleB
size="sm"
square
aria-label="Minimize"
- onClick={() => window.api.window.minimize()}
+ onClick={() => window.api.windows.minimize()}
className="w-6! h-5.5! min-w-0!"
>

@@ -57,7 +57,7 @@ export default function TitleBar({ title, icon, mode = "full", onClose }: TitleB
size="sm"
square
aria-label="Maximize"
- onClick={() => window.api.window.toggleMaximize()}
+ onClick={() => window.api.windows.toggleMaximize()}
className="w-6! h-5.5! min-w-0!"
>

@@ -69,7 +69,7 @@ export default function TitleBar({ title, icon, mode = "full", onClose }: TitleB
size="sm"
square
aria-label="Close"
- onClick={() => (onClose ? onClose() : window.api.window.close())}
+ onClick={() => (onClose ? onClose() : window.api.windows.close())}
className="w-6! h-5.5! min-w-0! ml-1"
>

diff --git a/src/renderer/components/contexts/Tree.tsx b/src/renderer/components/contexts/FileTree.tsx
similarity index 53%
rename from src/renderer/components/contexts/Tree.tsx
rename to src/renderer/components/contexts/FileTree.tsx
index 0127b0a..52e6d0a 100644
--- a/src/renderer/components/contexts/Tree.tsx
+++ b/src/renderer/components/contexts/FileTree.tsx
@@ -1,18 +1,18 @@
import { useProjectContext } from "@renderer/components/contexts/Project"
import { useStatusContext } from "@renderer/components/contexts/Status"
import { createContext, type ReactNode, useCallback, useContext, useEffect, useState } from "react"
-import type { LfsLock, LfsLockResult } from "@/main/types/lfs"
-import type { FileTreeNode } from "@/main/types/tree"
+import type { FileTreeNode } from "@/main/types/fileTree"
+import type { LfsLock, LfsLockResult } from "@/main/types/lfsCommands"
+import { reportError } from "@/renderer/lib/utils/errors"
import { indexLocks } from "@/renderer/lib/utils/lockStates"
/**
* The type for the tree context.
*/
-export type TreeContextType = {
+export type FileTreeContextType = {
fileTree: FileTreeNode[]
locksByPath: Map
isLoading: boolean
- error: Error | null
refresh: () => Promise
lock: (paths: string[]) => Promise
unlock: (paths: string[], force?: boolean) => Promise
@@ -22,20 +22,19 @@ export type TreeContextType = {
* The `Tree` context, providing the current repository's file tree and its Git
* LFS lock state.
*/
-export const TreeContext = createContext(undefined)
+export const FileTreeContext = createContext(undefined)
/**
- * The props for the `TreeProvider` component.
+ * The props for the `FileTreeProvider` component.
*/
-type TreeProviderProps = {
+type FileTreeProviderProps = {
children: ReactNode
}
-export default function TreeProvider({ children }: TreeProviderProps) {
+export default function FileTreeProvider({ children }: FileTreeProviderProps) {
const [fileTree, setFileTree] = useState([])
const [locksByPath, setLocksByPath] = useState