feat: show banner for bare mirror repositories

- Add isMirror prop to GitToolbar\n- Show warning banner when repo is a bare mirror\n- Explain that editing/committing/pulling/merging are unavailable\n- Suggest deleting and recreating to enable full features\n\nQuality gates: vitest (43 passed)
This commit is contained in:
2026-05-22 21:50:58 +02:00
parent 7cbbb41661
commit 1e40540ef4
2 changed files with 10 additions and 1 deletions
+9 -1
View File
@@ -18,6 +18,7 @@ interface GitToolbarProps {
currentBranch: string;
branches: string[];
hasRemote: boolean;
isMirror: boolean;
onBranchChange: (branch: string) => void;
onRefresh: () => void;
}
@@ -28,6 +29,7 @@ export const GitToolbar = ({
currentBranch,
branches,
hasRemote,
isMirror,
onBranchChange,
onRefresh,
}: GitToolbarProps) => {
@@ -136,7 +138,13 @@ export const GitToolbar = ({
return (
<div className="git-toolbar">
{error && <div className="toolbar-error">{error}</div>}
{isMirror && (
<div className="warning-message">
<Icon name="warning" size="sm" /> This repository is a bare mirror.
Editing, committing, pulling, and merging are not available.
Delete and recreate it to enable full workspace features.
</div>
)}
<div className="toolbar-row">
<div className="toolbar-group">
<select