feat: add GitHub issue comments display and AI validation integration

- Add comments section to issue detail panel with lazy loading
- Fetch comments via GraphQL API with pagination (50 at a time)
- Include comments in AI validation analysis when checkbox enabled
- Pass linked PRs info to AI validation for context
- Add "Work in Progress" badge in validation dialog for open PRs
- Add debug logging for validation requests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Kacper
2025-12-28 22:11:02 +01:00
parent 61881d99e2
commit 96196f906f
17 changed files with 777 additions and 28 deletions

View File

@@ -11,6 +11,8 @@ import type {
IssueValidationEvent,
StoredValidation,
AgentModel,
GitHubComment,
IssueCommentsResult,
} from '@automaker/types';
import { getJSON, setJSON, removeItem } from './storage';
@@ -24,6 +26,8 @@ export type {
IssueValidationResponse,
IssueValidationEvent,
StoredValidation,
GitHubComment,
IssueCommentsResult,
};
export interface FileEntry {
@@ -234,6 +238,19 @@ export interface GitHubAPI {
) => Promise<{ success: boolean; error?: string }>;
/** Subscribe to validation events */
onValidationEvent: (callback: (event: IssueValidationEvent) => void) => () => void;
/** Fetch comments for a specific issue */
getIssueComments: (
projectPath: string,
issueNumber: number,
cursor?: string
) => Promise<{
success: boolean;
comments?: GitHubComment[];
totalCount?: number;
hasNextPage?: boolean;
endCursor?: string;
error?: string;
}>;
}
// Feature Suggestions types
@@ -2786,6 +2803,15 @@ function createMockGitHubAPI(): GitHubAPI {
mockValidationCallbacks = mockValidationCallbacks.filter((cb) => cb !== callback);
};
},
getIssueComments: async (projectPath: string, issueNumber: number, cursor?: string) => {
console.log('[Mock] Getting issue comments:', { projectPath, issueNumber, cursor });
return {
success: true,
comments: [],
totalCount: 0,
hasNextPage: false,
};
},
};
}