From 520e3f22800baa324d1d7b53fe2ab250ef8cb409 Mon Sep 17 00:00:00 2001 From: simosmik Date: Mon, 16 Feb 2026 19:12:46 +0000 Subject: [PATCH] fix: login for unauthenticated users would not work --- src/components/FileTree.jsx | 12 ++++---- src/components/GitPanel.jsx | 30 +++++++++---------- src/components/LoginModal.jsx | 7 +++-- src/components/Onboarding.jsx | 1 + .../view/subcomponents/ChatInputControls.tsx | 2 +- .../ProviderSelectionEmptyState.tsx | 6 ++-- .../subcomponents/MainContentTabSwitcher.tsx | 2 +- .../view/subcomponents/SidebarFooter.tsx | 4 +-- .../view/subcomponents/SidebarHeader.tsx | 2 +- 9 files changed, 34 insertions(+), 32 deletions(-) diff --git a/src/components/FileTree.jsx b/src/components/FileTree.jsx index 661683e..cf3d1e1 100644 --- a/src/components/FileTree.jsx +++ b/src/components/FileTree.jsx @@ -520,13 +520,13 @@ function FileTree({ selectedProject, onFileOpen }) { {item.name} -
+
{item.type === 'file' ? formatFileSize(item.size) : ''}
-
+
{formatRelativeTime(item.modified)}
-
+
{item.permissionsRwx || ''}
@@ -573,7 +573,7 @@ function FileTree({ selectedProject, onFileOpen }) { {item.name}
-
+
{item.type === 'file' && ( <> {formatFileSize(item.size)} @@ -615,7 +615,7 @@ function FileTree({ selectedProject, onFileOpen }) { {/* Header */}
-

+

{t('fileTree.files')}

@@ -657,7 +657,7 @@ function FileTree({ selectedProject, onFileOpen }) { placeholder={t('fileTree.searchPlaceholder')} value={searchQuery} onChange={(e) => setSearchQuery(e.target.value)} - className="pl-7 pr-7 h-7 text-xs" + className="pl-8 pr-8 h-8 text-sm" /> {searchQuery && (
- + {commit.hash.substring(0, 7)}
@@ -669,7 +669,7 @@ function GitPanel({ selectedProject, isMobile, onFileOpen }) { {isExpanded && diff && (
-
+
{commit.stats}
@@ -792,7 +792,7 @@ function GitPanel({ selectedProject, isMobile, onFileOpen }) { e.stopPropagation(); setWrapText(!wrapText); }} - className="text-xs text-muted-foreground hover:text-foreground transition-colors" + className="text-sm text-muted-foreground hover:text-foreground transition-colors" title={wrapText ? "Switch to horizontal scroll" : "Switch to text wrap"} > {wrapText ? '↔️ Scroll' : '↩️ Wrap'} @@ -898,7 +898,7 @@ function GitPanel({ selectedProject, isMobile, onFileOpen }) { message: `Publish branch "${currentBranch}" to ${remoteStatus.remoteName}?` })} disabled={isPublishing} - className="px-2.5 py-1 text-xs bg-purple-600 text-white rounded-lg hover:bg-purple-700 disabled:opacity-50 flex items-center gap-1 transition-colors" + className="px-2.5 py-1 text-sm bg-purple-600 text-white rounded-lg hover:bg-purple-700 disabled:opacity-50 flex items-center gap-1 transition-colors" title={`Publish branch "${currentBranch}" to ${remoteStatus.remoteName}`} > @@ -917,7 +917,7 @@ function GitPanel({ selectedProject, isMobile, onFileOpen }) { message: `Pull ${remoteStatus.behind} commit${remoteStatus.behind !== 1 ? 's' : ''} from ${remoteStatus.remoteName}?` })} disabled={isPulling} - className="px-2.5 py-1 text-xs bg-green-600 text-white rounded-lg hover:bg-green-700 disabled:opacity-50 flex items-center gap-1 transition-colors" + className="px-2.5 py-1 text-sm bg-green-600 text-white rounded-lg hover:bg-green-700 disabled:opacity-50 flex items-center gap-1 transition-colors" title={`Pull ${remoteStatus.behind} commit${remoteStatus.behind !== 1 ? 's' : ''} from ${remoteStatus.remoteName}`} > @@ -933,7 +933,7 @@ function GitPanel({ selectedProject, isMobile, onFileOpen }) { message: `Push ${remoteStatus.ahead} commit${remoteStatus.ahead !== 1 ? 's' : ''} to ${remoteStatus.remoteName}?` })} disabled={isPushing} - className="px-2.5 py-1 text-xs bg-orange-600 text-white rounded-lg hover:bg-orange-700 disabled:opacity-50 flex items-center gap-1 transition-colors" + className="px-2.5 py-1 text-sm bg-orange-600 text-white rounded-lg hover:bg-orange-700 disabled:opacity-50 flex items-center gap-1 transition-colors" title={`Push ${remoteStatus.ahead} commit${remoteStatus.ahead !== 1 ? 's' : ''} to ${remoteStatus.remoteName}`} > @@ -946,7 +946,7 @@ function GitPanel({ selectedProject, isMobile, onFileOpen }) {
- + {selectedFiles.size} file{selectedFiles.size !== 1 ? 's' : ''} selected | @@ -1161,7 +1161,7 @@ function GitPanel({ selectedProject, isMobile, onFileOpen }) {
{showLegend && ( -
+
@@ -1298,7 +1298,7 @@ function GitPanel({ selectedProject, isMobile, onFileOpen }) { autoFocus />
-
+
This will create a new branch from the current branch ({currentBranch})
diff --git a/src/components/LoginModal.jsx b/src/components/LoginModal.jsx index beebe59..5c3af51 100644 --- a/src/components/LoginModal.jsx +++ b/src/components/LoginModal.jsx @@ -21,7 +21,8 @@ function LoginModal({ project, onComplete, customCommand, - isAuthenticated = false + isAuthenticated = false, + isOnboarding = false }) { if (!isOpen) return null; @@ -30,13 +31,13 @@ function LoginModal({ switch (provider) { case 'claude': - return isAuthenticated ? 'claude setup-token --dangerously-skip-permissions' : 'claude /exit --dangerously-skip-permissions'; + return isAuthenticated ? 'claude setup-token --dangerously-skip-permissions' : isOnboarding ? 'claude /exit --dangerously-skip-permissions' : 'claude /login --dangerously-skip-permissions'; case 'cursor': return 'cursor-agent login'; case 'codex': return IS_PLATFORM ? 'codex login --device-auth' : 'codex login'; default: - return isAuthenticated ? 'claude setup-token --dangerously-skip-permissions' : 'claude /exit --dangerously-skip-permissions'; + return isAuthenticated ? 'claude setup-token --dangerously-skip-permissions' : isOnboarding ? 'claude /exit --dangerously-skip-permissions' : 'claude /login --dangerously-skip-permissions'; } }; diff --git a/src/components/Onboarding.jsx b/src/components/Onboarding.jsx index 17125ae..90a11af 100644 --- a/src/components/Onboarding.jsx +++ b/src/components/Onboarding.jsx @@ -577,6 +577,7 @@ const Onboarding = ({ onComplete }) => { provider={activeLoginProvider} project={selectedProject} onComplete={handleLoginComplete} + isOnboarding={true} /> )} diff --git a/src/components/chat/view/subcomponents/ChatInputControls.tsx b/src/components/chat/view/subcomponents/ChatInputControls.tsx index fa76380..fe7e245 100644 --- a/src/components/chat/view/subcomponents/ChatInputControls.tsx +++ b/src/components/chat/view/subcomponents/ChatInputControls.tsx @@ -42,7 +42,7 @@ export default function ChatInputControls({