fix(issues): add dismiss GitHub close, batch cancel, resolved suggestion, closed warning
Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
9ec2919023
commit
64ca77c0d2
@@ -36,7 +36,7 @@ import { readSettingsFile } from '../../settings-utils';
|
||||
import { AgentManager } from '../../agent';
|
||||
import { getGitHubConfig, githubFetch } from './utils';
|
||||
import type { GitHubAPIComment } from './types';
|
||||
import { createSpecForIssue, buildIssueContext, buildInvestigationTask } from './spec-utils';
|
||||
import { createSpecForIssue, buildIssueContext, buildInvestigationTask, updateImplementationPlanStatus } from './spec-utils';
|
||||
import { createContextLogger } from './utils/logger';
|
||||
import { withProjectOrNull } from './utils/project-middleware';
|
||||
import { createIPCCommunicators } from './utils/ipc-communicator';
|
||||
|
||||
@@ -233,6 +233,7 @@ export interface GitHubAPI {
|
||||
// Investigation operations (new system)
|
||||
startInvestigation: (projectId: string, issueNumber: number) => void;
|
||||
cancelInvestigation: (projectId: string, issueNumber: number) => void;
|
||||
cancelAllInvestigations: (projectId: string) => void;
|
||||
createTaskFromInvestigation: (projectId: string, issueNumber: number) => Promise<IPCResult<{ specId: string }>>;
|
||||
dismissIssue: (projectId: string, issueNumber: number, reason: InvestigationDismissReason) => Promise<IPCResult>;
|
||||
postInvestigationToGitHub: (projectId: string, issueNumber: number) => Promise<IPCResult<{ commentId: number }>>;
|
||||
@@ -715,6 +716,9 @@ export const createGitHubAPI = (): GitHubAPI => ({
|
||||
cancelInvestigation: (projectId: string, issueNumber: number): void =>
|
||||
sendIpc(IPC_CHANNELS.GITHUB_INVESTIGATION_CANCEL, projectId, issueNumber),
|
||||
|
||||
cancelAllInvestigations: (projectId: string): void =>
|
||||
sendIpc(IPC_CHANNELS.GITHUB_INVESTIGATION_CANCEL_ALL, projectId),
|
||||
|
||||
createTaskFromInvestigation: (projectId: string, issueNumber: number): Promise<IPCResult<{ specId: string }>> =>
|
||||
invokeIpc(IPC_CHANNELS.GITHUB_INVESTIGATION_CREATE_TASK, projectId, issueNumber),
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Github, RefreshCw, Search, Filter, Wand2, Loader2, Layers, EyeOff, Eye } from 'lucide-react';
|
||||
import { Github, RefreshCw, Search, Filter, Wand2, Loader2, Layers, EyeOff, Eye, XCircle } from 'lucide-react';
|
||||
import { Badge } from '../../ui/badge';
|
||||
import { Button } from '../../ui/button';
|
||||
import { Input } from '../../ui/input';
|
||||
@@ -85,6 +85,7 @@ export function IssueListHeader({
|
||||
showDismissed,
|
||||
onToggleShowDismissed,
|
||||
activeInvestigationCount,
|
||||
onCancelAllInvestigations,
|
||||
}: IssueListHeaderProps) {
|
||||
const { t } = useTranslation('common');
|
||||
|
||||
@@ -119,10 +120,23 @@ export function IssueListHeader({
|
||||
{t('issues.openCount', { count: openIssuesCount })}
|
||||
</Badge>
|
||||
{activeInvestigationCount != null && activeInvestigationCount > 0 && (
|
||||
<Badge variant="secondary" className="text-xs bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300">
|
||||
<Loader2 className="h-3 w-3 mr-1 animate-spin" />
|
||||
{t('investigation.stateFilters.activeCount', { count: activeInvestigationCount, defaultValue: '{{count}} investigating' })}
|
||||
</Badge>
|
||||
<>
|
||||
<Badge variant="secondary" className="text-xs bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300">
|
||||
<Loader2 className="h-3 w-3 mr-1 animate-spin" />
|
||||
{t('investigation.stateFilters.activeCount', { count: activeInvestigationCount, defaultValue: '{{count}} investigating' })}
|
||||
</Badge>
|
||||
{onCancelAllInvestigations && (
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={onCancelAllInvestigations}
|
||||
className="h-6 px-2 text-xs text-destructive hover:text-destructive"
|
||||
>
|
||||
<XCircle className="h-3 w-3 mr-1" />
|
||||
{t('investigation.button.cancelAll', 'Cancel All')}
|
||||
</Button>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
{/* Legacy triage mode toggle — kept for backwards compat */}
|
||||
{onToggleTriageMode && (
|
||||
|
||||
@@ -37,6 +37,7 @@ export {
|
||||
cleanupInvestigationListeners,
|
||||
startIssueInvestigation,
|
||||
cancelIssueInvestigation,
|
||||
cancelAllIssueInvestigations,
|
||||
investigateGitHubIssue,
|
||||
loadPersistedInvestigations,
|
||||
type IssueInvestigationState
|
||||
|
||||
@@ -269,6 +269,7 @@ export const IPC_CHANNELS = {
|
||||
// GitHub Investigation operations (renderer -> main)
|
||||
GITHUB_INVESTIGATION_START: 'github:investigation:start',
|
||||
GITHUB_INVESTIGATION_CANCEL: 'github:investigation:cancel',
|
||||
GITHUB_INVESTIGATION_CANCEL_ALL: 'github:investigation:cancelAll',
|
||||
GITHUB_INVESTIGATION_CREATE_TASK: 'github:investigation:createTask',
|
||||
GITHUB_INVESTIGATION_DISMISS: 'github:investigation:dismiss',
|
||||
GITHUB_INVESTIGATION_POST_GITHUB: 'github:investigation:postGitHub',
|
||||
|
||||
@@ -542,6 +542,7 @@ export interface ElectronAPI {
|
||||
// GitHub Investigation operations (new system)
|
||||
startInvestigation: (projectId: string, issueNumber: number) => void;
|
||||
cancelInvestigation: (projectId: string, issueNumber: number) => void;
|
||||
cancelAllInvestigations: (projectId: string) => void;
|
||||
createTaskFromInvestigation: (projectId: string, issueNumber: number) => Promise<IPCResult<{ specId: string }>>;
|
||||
dismissIssue: (projectId: string, issueNumber: number, reason: InvestigationDismissReason) => Promise<IPCResult>;
|
||||
postInvestigationToGitHub: (projectId: string, issueNumber: number) => Promise<IPCResult<{ commentId: number }>>;
|
||||
|
||||
Reference in New Issue
Block a user