From fe72549e2d70d685d86dec546f7476946f8a9667 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 24 Dec 2025 17:15:16 -0600 Subject: [PATCH] Improve ForcePullDialog language --- .../git-sync/steps/ForcePullDialog.tsx | 21 +++++++++++-------- src/components/git-sync/steps/SyncStep.tsx | 10 +++++---- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/components/git-sync/steps/ForcePullDialog.tsx b/src/components/git-sync/steps/ForcePullDialog.tsx index 608e5c0f..5a71ae35 100644 --- a/src/components/git-sync/steps/ForcePullDialog.tsx +++ b/src/components/git-sync/steps/ForcePullDialog.tsx @@ -14,9 +14,15 @@ interface ForcePullDialogProps { open: boolean; onOpenChange: (open: boolean) => void; onConfirm: () => void; + remoteName?: string; } -export function ForcePullDialog({ open, onOpenChange, onConfirm }: ForcePullDialogProps) { +export function ForcePullDialog({ + open, + onOpenChange, + onConfirm, + remoteName = 'the remote' +}: ForcePullDialogProps) { const handleConfirm = () => { onOpenChange(false); onConfirm(); @@ -32,17 +38,14 @@ export function ForcePullDialog({ open, onOpenChange, onConfirm }: ForcePullDial

- This will permanently discard all local changes and reset your repository to match the remote. -

-

- This action cannot be undone. Any uncommitted work will be lost. + This will completely reset your local repository to match the repository pushed to {remoteName}, permanently deleting all local commits and changes that don't exist on {remoteName}.

-

What will happen:

+

What will be deleted:

    -
  • All local changes will be discarded
  • -
  • Repository will reset to remote state
  • -
  • Latest changes will be pulled from remote
  • +
  • All local commits that haven't been pushed to {remoteName}
  • +
  • Any work not available on {remoteName}
  • +
  • All uncommitted changes
diff --git a/src/components/git-sync/steps/SyncStep.tsx b/src/components/git-sync/steps/SyncStep.tsx index 9d967dcc..cdf4f79d 100644 --- a/src/components/git-sync/steps/SyncStep.tsx +++ b/src/components/git-sync/steps/SyncStep.tsx @@ -224,10 +224,11 @@ export function SyncStep({ projectId }: StepProps) { }; } - // Fallback to generic Git - return { - name: url?.hostname || 'Git', - }; + if (url && (url.protocol === 'http:' || url.protocol === 'https:')) { + return { name: url.hostname }; + } + + return { name: 'Git' }; }, [originRemote, matchedCredential]); const providerInfo = getProviderInfo(); @@ -370,6 +371,7 @@ export function SyncStep({ projectId }: StepProps) { open={showForcePullDialog} onOpenChange={setShowForcePullDialog} onConfirm={handleForcePull} + remoteName={providerInfo?.name} /> );