feat: enhance AI validation with PR analysis and UI improvements

- Replace HTML checkbox with proper UI Checkbox component
- Add system prompt instructions for AI to check PR changes via gh CLI
- Add PRAnalysis schema field with recommendation (wait_for_merge, pr_needs_work, no_pr)
- Show detailed PR analysis badge in validation dialog
- Hide "Convert to Task" button when PR fix is ready (wait_for_merge)

🤖 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:22:14 +01:00
parent 96196f906f
commit 97ae4b6362
5 changed files with 156 additions and 25 deletions

View File

@@ -87,6 +87,8 @@ export type {
IssueValidationVerdict,
IssueValidationConfidence,
IssueComplexity,
PRRecommendation,
PRAnalysis,
LinkedPRInfo,
IssueValidationInput,
IssueValidationRequest,

View File

@@ -21,6 +21,27 @@ export type IssueValidationConfidence = 'high' | 'medium' | 'low';
*/
export type IssueComplexity = 'trivial' | 'simple' | 'moderate' | 'complex' | 'very_complex';
/**
* Recommendation for PR-related action
*/
export type PRRecommendation = 'wait_for_merge' | 'pr_needs_work' | 'no_pr';
/**
* Analysis of a linked pull request
*/
export interface PRAnalysis {
/** Whether there is an open PR linked to this issue */
hasOpenPR: boolean;
/** Whether the PR appears to fix the issue based on the diff */
prFixesIssue?: boolean;
/** The PR number that was analyzed */
prNumber?: number;
/** Brief summary of what the PR changes */
prSummary?: string;
/** Recommendation: wait for PR to merge, PR needs more work, or no relevant PR */
recommendation: PRRecommendation;
}
/**
* Linked PR info for validation
*/
@@ -73,6 +94,8 @@ export interface IssueValidationResult {
missingInfo?: string[];
/** Estimated effort to address the issue */
estimatedComplexity?: IssueComplexity;
/** Analysis of linked pull requests (if any) */
prAnalysis?: PRAnalysis;
}
/**