fix(git): restore non-repo fallback and refine repo preflight errors

Reintroduce a local not-a-git-repo fallback state in the git log panel so non-repo errors still render the dedicated empty state when workspace state streaming is degraded.

Improve git repository preflight classification by distinguishing missing paths, permission issues, and non-directory targets before checking .git presence.

Add not_a_git_repository to the frontend AppErrorCode union for explicit typed handling.
This commit is contained in:
xintaofei
2026-04-18 23:49:42 +08:00
parent b17328b0fc
commit 95a0c527c4
3 changed files with 60 additions and 10 deletions

View File

@@ -11,6 +11,7 @@ export type AppErrorCode =
| "configuration_missing"
| "configuration_invalid"
| "not_found"
| "not_a_git_repository"
| "already_exists"
| "permission_denied"
| "dependency_missing"