From c698bb142eb948e2724740287ef3b1eb1cb8f87e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sondre=20Engebr=C3=A5ten?= Date: Thu, 12 Feb 2026 18:50:21 +0100 Subject: [PATCH] =?UTF-8?q?fix(ai-triage):=20WP-9=20lint=20fixes=20?= =?UTF-8?q?=E2=80=94=20non-null=20assertions,=20a11y=20labels,=20array=20k?= =?UTF-8?q?eys,=20deps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- .../src/main/ipc-handlers/github/ai-triage-handlers.ts | 8 ++++---- .../github-issues/components/IssueSplitDialog.tsx | 2 +- .../github-issues/components/ProgressiveTrustSettings.tsx | 6 ++++-- .../components/github-issues/hooks/useAITriage.ts | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/frontend/src/main/ipc-handlers/github/ai-triage-handlers.ts b/apps/frontend/src/main/ipc-handlers/github/ai-triage-handlers.ts index 85e7a183..56b6c4dc 100644 --- a/apps/frontend/src/main/ipc-handlers/github/ai-triage-handlers.ts +++ b/apps/frontend/src/main/ipc-handlers/github/ai-triage-handlers.ts @@ -105,7 +105,7 @@ export function registerAITriageHandlers( return; } - const backendPath = validation.backendPath!; + const backendPath = validation.backendPath ?? ''; const { model, thinkingLevel } = getGitHubIssuesSettings(); const args = buildRunnerArgs( @@ -141,7 +141,7 @@ export function registerAITriageHandlers( return; } - sendComplete(result.data!); + sendComplete(result.data as AIEnrichmentResult); }); } catch (error) { sendError(error instanceof Error ? error.message : 'Failed to run enrichment'); @@ -182,7 +182,7 @@ export function registerAITriageHandlers( return; } - const backendPath = validation.backendPath!; + const backendPath = validation.backendPath ?? ''; const { model, thinkingLevel } = getGitHubIssuesSettings(); const args = buildRunnerArgs( @@ -218,7 +218,7 @@ export function registerAITriageHandlers( return; } - const suggestion = result.data!; + const suggestion = result.data as SplitSuggestion; // Cap sub-issues at MAX_SPLIT_SUB_ISSUES if (suggestion.subIssues.length > MAX_SPLIT_SUB_ISSUES) { diff --git a/apps/frontend/src/renderer/components/github-issues/components/IssueSplitDialog.tsx b/apps/frontend/src/renderer/components/github-issues/components/IssueSplitDialog.tsx index 5830927c..016c3c57 100644 --- a/apps/frontend/src/renderer/components/github-issues/components/IssueSplitDialog.tsx +++ b/apps/frontend/src/renderer/components/github-issues/components/IssueSplitDialog.tsx @@ -46,7 +46,7 @@ export function IssueSplitDialog({ suggestion, progress, onConfirm, onCancel }: {/* Sub-issues */}
{subIssues.map((sub, index) => ( -
+
- + setConfig((prev) => ({ ...prev, batchSize: Number.parseInt(e.target.value, 10) || 0 }))} @@ -94,8 +95,9 @@ export function ProgressiveTrustSettings({ config: initialConfig, onSave, onCanc {/* Confirm above */}
- + setConfig((prev) => ({ ...prev, confirmAbove: Number.parseInt(e.target.value, 10) || 0 }))} diff --git a/apps/frontend/src/renderer/components/github-issues/hooks/useAITriage.ts b/apps/frontend/src/renderer/components/github-issues/hooks/useAITriage.ts index 67e3d2c2..0da7b449 100644 --- a/apps/frontend/src/renderer/components/github-issues/hooks/useAITriage.ts +++ b/apps/frontend/src/renderer/components/github-issues/hooks/useAITriage.ts @@ -59,7 +59,7 @@ export function useAITriage(projectId: string) { cleanup(); } }; - }, [projectId, store]); + }, [store]); const runEnrichment = useCallback( (issueNumber: number) => {