From 21df7fe3ddefe8f1ac53da6ee636ac590eac2608 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 24 Dec 2025 18:05:44 -0600 Subject: [PATCH] Link to git credentials in case of 401, improve Force Push text --- src/components/git-sync/steps/ForcePushDialog.tsx | 4 ++-- src/components/git-sync/steps/SyncStepError.tsx | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/git-sync/steps/ForcePushDialog.tsx b/src/components/git-sync/steps/ForcePushDialog.tsx index aee0e1d5..8fa6eb5a 100644 --- a/src/components/git-sync/steps/ForcePushDialog.tsx +++ b/src/components/git-sync/steps/ForcePushDialog.tsx @@ -33,11 +33,11 @@ export function ForcePushDialog({ - Force Push - Overwrite Remote History? + Force Push to {remoteName}?

- This will completely overwrite the remote repository on {remoteName} with your local version, permanently deleting any commits and changes on {remoteName} that don't exist locally. + This will completely overwrite the commit history on {remoteName} with your local version, permanently deleting any commits and changes on {remoteName} that don't exist locally.

What will be deleted from {remoteName}:

diff --git a/src/components/git-sync/steps/SyncStepError.tsx b/src/components/git-sync/steps/SyncStepError.tsx index 4b2a5ac2..fe992f44 100644 --- a/src/components/git-sync/steps/SyncStepError.tsx +++ b/src/components/git-sync/steps/SyncStepError.tsx @@ -1,7 +1,8 @@ import { Errors as GitErrors } from 'isomorphic-git'; -import { AlertTriangle, X, ArrowDown } from 'lucide-react'; +import { X, ArrowDown, ArrowUp } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Alert, AlertDescription } from '@/components/ui/alert'; +import { Link } from 'react-router-dom'; interface SyncStepErrorProps { error: Error; @@ -19,7 +20,7 @@ export function SyncStepError({ error, onDismiss, onForcePull, onForcePush, onPu onClick={onForcePull} className="w-full hover:bg-destructive-foreground/20 border-destructive-foreground/20" > - + Force Pull ); @@ -31,7 +32,7 @@ export function SyncStepError({ error, onDismiss, onForcePull, onForcePush, onPu onClick={onForcePush} className="w-full hover:bg-destructive-foreground/20 border-destructive-foreground/20" > - + Force Push ); @@ -42,7 +43,7 @@ export function SyncStepError({ error, onDismiss, onForcePull, onForcePush, onPu size="sm" onClick={onPull} > - + Pull ); @@ -120,11 +121,11 @@ export function SyncStepError({ error, onDismiss, onForcePull, onForcePush, onPu // HTTP errors if (error instanceof GitErrors.HttpError) { - let message: string; + let message: React.ReactNode; switch (error.data.statusCode) { case 401: - message = 'Authentication failed. Please check your credentials.'; + message = <>Authentication failed. Please check your git credentials. break; case 403: message = 'Access forbidden. You do not have permission to access this repository.';