fix: Address PR review comments

- Fix window.Electron to window.isElectron in http-api-client.ts
- Use void operator instead of async/await for onClick handlers in git-diff-panel.tsx
- Fix critical bug: correct parameter order in useStartAutoMode (maxConcurrency was passed as branchName)
- Add error handling for getApiKeys() result in use-cli-status.ts
- Add authClaude guard in claude-cli-status.tsx for consistency with deauthClaude
- Add optional chaining on api object in cursor-cli-status.tsx

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Shirone
2026-01-25 18:55:42 +01:00
parent 5c335641fa
commit 08d1497cbe
6 changed files with 16 additions and 14 deletions

View File

@@ -89,13 +89,17 @@ export function ClaudeCliStatus({ status, authStatus, isChecking, onRefresh }: C
setIsAuthenticating(true);
try {
const api = getElectronAPI();
if (!api.setup) {
// Check if authClaude method exists on the API
const authClaude = (api.setup as Record<string, unknown> | undefined)?.authClaude as
| (() => Promise<{ success: boolean; error?: string }>)
| undefined;
if (!authClaude) {
toast.error('Authentication Failed', {
description: 'Setup API is not available',
description: 'Claude authentication is not available',
});
return;
}
const result = await api.setup.authClaude();
const result = await authClaude();
if (result.success) {
toast.success('Signed In', {

View File

@@ -210,7 +210,7 @@ export function CursorCliStatus({ status, isChecking, onRefresh }: CursorCliStat
try {
const api = getElectronAPI();
// Check if authCursor method exists on the API
const authCursor = (api.setup as Record<string, unknown> | undefined)?.authCursor as
const authCursor = (api?.setup as Record<string, unknown> | undefined)?.authCursor as
| (() => Promise<{ success: boolean; error?: string }>)
| undefined;
if (!authCursor) {
@@ -245,7 +245,7 @@ export function CursorCliStatus({ status, isChecking, onRefresh }: CursorCliStat
try {
const api = getElectronAPI();
// Check if deauthCursor method exists on the API
const deauthCursor = (api.setup as Record<string, unknown> | undefined)?.deauthCursor as
const deauthCursor = (api?.setup as Record<string, unknown> | undefined)?.deauthCursor as
| (() => Promise<{ success: boolean; error?: string }>)
| undefined;
if (!deauthCursor) {