Add back totalCommits check

This commit is contained in:
Alex Gleason committed 2026-01-07 19:23:51 -06:00
1 parent 9ccad00888
commit 11197139f9
1 file changed
+3 -2
+3 -2
View File
@@ -59,12 +59,12 @@ export function GitSyncButton({ projectId, className }: GitSyncButtonProps) {
// Show warning popover when purple indicator is visible (only if not dismissed)
useEffect(() => {
if (needsRemote && !warningDismissed.current) {
if (needsRemote && !warningDismissed.current && gitStatus.totalCommits > 1) {
setShowWarningPopover(true);
} else {
setShowWarningPopover(false);
}
}, [needsRemote]);
}, [gitStatus?.totalCommits, needsRemote]);
// Handle button click - dismiss warning popover permanently
const handleButtonClick = () => {
@@ -106,6 +106,7 @@ export function GitSyncButton({ projectId, className }: GitSyncButtonProps) {
}
// Purple indicator: no remote configured, but has commits - lowest priority
const needsRemote = !hasRemote && totalCommits > 1;
if (needsRemote) {
return <IndicatorDot color="primary" />;
}