diff --git a/apps/ui/src/components/views/github-issues-view.tsx b/apps/ui/src/components/views/github-issues-view.tsx index 6081a2f6..10876e38 100644 --- a/apps/ui/src/components/views/github-issues-view.tsx +++ b/apps/ui/src/components/views/github-issues-view.tsx @@ -214,7 +214,6 @@ export function GitHubIssuesView() { onOpenChange={setShowValidationDialog} issue={selectedIssue} validationResult={validationResult} - isValidating={selectedIssue ? validatingIssues.has(selectedIssue.number) : false} onConvertToTask={handleConvertToTask} /> diff --git a/apps/ui/src/components/views/github-issues-view/dialogs/validation-dialog.tsx b/apps/ui/src/components/views/github-issues-view/dialogs/validation-dialog.tsx index cc989c8c..fba1a9ea 100644 --- a/apps/ui/src/components/views/github-issues-view/dialogs/validation-dialog.tsx +++ b/apps/ui/src/components/views/github-issues-view/dialogs/validation-dialog.tsx @@ -15,7 +15,6 @@ import { FileCode, Lightbulb, AlertTriangle, - Loader2, Plus, } from 'lucide-react'; import { cn } from '@/lib/utils'; @@ -32,7 +31,6 @@ interface ValidationDialogProps { onOpenChange: (open: boolean) => void; issue: GitHubIssue | null; validationResult: IssueValidationResult | null; - isValidating: boolean; onConvertToTask?: (issue: GitHubIssue, validation: IssueValidationResult) => void; } @@ -79,7 +77,6 @@ export function ValidationDialog({ onOpenChange, issue, validationResult, - isValidating, onConvertToTask, }: ValidationDialogProps) { if (!issue) return null; @@ -101,12 +98,7 @@ export function ValidationDialog({ - {isValidating ? ( -
- -

Analyzing codebase to validate issue...

-
- ) : validationResult ? ( + {validationResult ? (
{/* Verdict Badge */}
diff --git a/apps/ui/src/components/views/github-issues-view/hooks/use-issue-validation.ts b/apps/ui/src/components/views/github-issues-view/hooks/use-issue-validation.ts index 25665757..136185c5 100644 --- a/apps/ui/src/components/views/github-issues-view/hooks/use-issue-validation.ts +++ b/apps/ui/src/components/views/github-issues-view/hooks/use-issue-validation.ts @@ -205,11 +205,8 @@ export function useIssueValidation({ }, []); const handleValidateIssue = useCallback( - async ( - issue: GitHubIssue, - options: { showDialog?: boolean; forceRevalidate?: boolean } = {} - ) => { - const { showDialog = true, forceRevalidate = false } = options; + async (issue: GitHubIssue, options: { forceRevalidate?: boolean } = {}) => { + const { forceRevalidate = false } = options; if (!currentProject?.path) { toast.error('No project selected'); @@ -224,21 +221,17 @@ export function useIssueValidation({ // Check for cached result - if fresh, show it directly (unless force revalidate) const cached = cachedValidations.get(issue.number); - if (cached && showDialog && !forceRevalidate) { - // Check if validation is stale - if (!isValidationStale(cached.validatedAt)) { - // Show cached result directly - onValidationResultChange(cached.result); - onShowValidationDialogChange(true); - return; - } + if (cached && !forceRevalidate && !isValidationStale(cached.validatedAt)) { + // Show cached result directly + onValidationResultChange(cached.result); + onShowValidationDialogChange(true); + return; } - // Start async validation - onValidationResultChange(null); - if (showDialog) { - onShowValidationDialogChange(true); - } + // Start async validation in background (no dialog - user will see badge when done) + toast.info(`Starting validation for issue #${issue.number}`, { + description: 'You will be notified when the analysis is complete', + }); try { const api = getElectronAPI(); @@ -256,18 +249,12 @@ export function useIssueValidation({ if (!result.success) { toast.error(result.error || 'Failed to start validation'); - if (showDialog) { - onShowValidationDialogChange(false); - } } // On success, the result will come through the event stream } } catch (err) { console.error('[GitHubIssuesView] Validation error:', err); toast.error(err instanceof Error ? err.message : 'Failed to validate issue'); - if (showDialog) { - onShowValidationDialogChange(false); - } } }, [