From abf3242402b3f7367ed005caae16dd778d341b6e Mon Sep 17 00:00:00 2001 From: Alex Netsch Date: Fri, 14 Nov 2025 17:26:55 +0000 Subject: [PATCH] Perfect! I've successfully removed the authentication requirement from the GitActionsDialog. Here's what I changed: (#1291) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Changes Made **File: `frontend/src/components/dialogs/tasks/GitActionsDialog.tsx`** 1. **Removed imports** (lines 27-28): - Removed `useAuth` hook import - Removed `LoginRequiredPrompt` component import 2. **Removed auth check** (line 107): - Removed `const { isSignedIn, isLoaded } = useAuth();` 3. **Updated loading condition** (line 129): - Removed `!isLoaded` from the isLoading check 4. **Removed login prompt** (lines 145-154): - Deleted the entire `!isSignedIn` conditional block that displayed `LoginRequiredPrompt` - Now the `GitOperations` component is always rendered when data is loaded ## Result The Git Actions dialog is now accessible to everyone without requiring VK sign-in. Users can perform: - ✅ **Merge** operations (local git) - ✅ **Rebase** operations (local git) - ✅ **Branch changes** (local git) - ⚠️ **Push/PR operations** will still require `gh` CLI authentication, but the backend will handle those errors appropriately The dialog will no longer block users with a login prompt - all git operations are accessible immediately. --- .../components/dialogs/tasks/GitActionsDialog.tsx | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/frontend/src/components/dialogs/tasks/GitActionsDialog.tsx b/frontend/src/components/dialogs/tasks/GitActionsDialog.tsx index 9872bc8b..8954f1c0 100644 --- a/frontend/src/components/dialogs/tasks/GitActionsDialog.tsx +++ b/frontend/src/components/dialogs/tasks/GitActionsDialog.tsx @@ -24,8 +24,6 @@ import type { TaskWithAttemptStatus, } from 'shared/types'; import NiceModal, { useModal } from '@ebay/nice-modal-react'; -import { useAuth } from '@/hooks'; -import { LoginRequiredPrompt } from '@/components/dialogs/shared/LoginRequiredPrompt'; export interface GitActionsDialogProps { attemptId: string; @@ -104,7 +102,6 @@ export const GitActionsDialog = NiceModal.create( const modal = useModal(); const { t } = useTranslation('tasks'); const { project } = useProject(); - const { isSignedIn, isLoaded } = useAuth(); const effectiveProjectId = providedProjectId ?? project?.id; const { data: attempt } = useTaskAttempt(attemptId); @@ -129,7 +126,7 @@ export const GitActionsDialog = NiceModal.create( }; const isLoading = - !attempt || !effectiveProjectId || loadingBranches || !task || !isLoaded; + !attempt || !effectiveProjectId || loadingBranches || !task; return ( @@ -142,16 +139,6 @@ export const GitActionsDialog = NiceModal.create(
- ) : !isSignedIn ? ( -
- -
) : (