- {searchQuery ? 'No files match your search.' : 'No files found in this project.'}
+
+ {showGitErrorBanner ? (
+
+ {gitError}
- ) : (
-
- {searchResults.files.map((file, index) => (
- handleOpenFile(file.fullPath)}
- showDivider={index < searchResults.files.length - 1}
- />
- ))}
-
- )
- ) : (
-
- {gitStatus?.stagedFiles.length ? (
-
-
- Staged Changes ({gitStatus.stagedFiles.length})
-
- {gitStatus.stagedFiles.map((file, index) => (
-
handleOpenFile(file.fullPath, file.isStaged)}
- showDivider={index < gitStatus.stagedFiles.length - 1 || gitStatus.unstagedFiles.length > 0}
- />
- ))}
-
- ) : null}
-
- {gitStatus?.unstagedFiles.length ? (
-
-
- Unstaged Changes ({gitStatus.unstagedFiles.length})
-
- {gitStatus.unstagedFiles.map((file, index) => (
-
handleOpenFile(file.fullPath, file.isStaged)}
- showDivider={index < gitStatus.unstagedFiles.length - 1}
- />
- ))}
-
- ) : null}
-
- {gitStatus && gitStatus.stagedFiles.length === 0 && gitStatus.unstagedFiles.length === 0 ? (
+ ) : null}
+ {gitLoading ? (
+
Loading Git status...
+ ) : shouldSearch ? (
+ searchResults.isLoading ? (
+
Loading files...
+ ) : searchResults.error ? (
+
{searchResults.error}
+ ) : searchResults.files.length === 0 ? (
- No changes detected. Use search to browse files.
+ {searchQuery ? 'No files match your search.' : 'No files found in this project.'}
- ) : null}
-
- )}
+ ) : (
+
+ {searchResults.files.map((file, index) => (
+ handleOpenFile(file.fullPath)}
+ showDivider={index < searchResults.files.length - 1}
+ />
+ ))}
+
+ )
+ ) : (
+
+ {gitStatus?.stagedFiles.length ? (
+
+
+ Staged Changes ({gitStatus.stagedFiles.length})
+
+ {gitStatus.stagedFiles.map((file, index) => (
+
handleOpenFile(file.fullPath, file.isStaged)}
+ showDivider={index < gitStatus.stagedFiles.length - 1 || gitStatus.unstagedFiles.length > 0}
+ />
+ ))}
+
+ ) : null}
+
+ {gitStatus?.unstagedFiles.length ? (
+
+
+ Unstaged Changes ({gitStatus.unstagedFiles.length})
+
+ {gitStatus.unstagedFiles.map((file, index) => (
+
handleOpenFile(file.fullPath, file.isStaged)}
+ showDivider={index < gitStatus.unstagedFiles.length - 1}
+ />
+ ))}
+
+ ) : null}
+
+ {gitStatus && gitStatus.stagedFiles.length === 0 && gitStatus.unstagedFiles.length === 0 ? (
+
+ No changes detected. Use search to browse files.
+
+ ) : null}
+
+ )}
+