feat: Add merge conflict detection and agent resolution in initiative review
Pre-merge mergeability check via `git merge-tree --write-tree` (dry-run, no side effects). When conflicts exist the "Merge & Push" button is disabled and a ConflictResolutionPanel shows conflict files with options to resolve manually or spawn a conflict-resolution agent. Agent questions appear inline via QuestionForm; on completion the mergeability re-checks automatically. New server-side: MergeabilityResult type, BranchManager.checkMergeability, conflict-resolution prompt, checkInitiativeMergeability query, spawnConflictResolutionAgent mutation, getActiveConflictAgent query. New frontend: useConflictAgent hook, ConflictResolutionPanel component, mergeability badge + panel integration in InitiativeReview.
This commit is contained in:
@@ -116,6 +116,7 @@ The initiative detail page has three tabs managed via local state (not URL param
|
||||
| `ReviewSidebar` | VSCode-style icon strip (Files/Commits views) with file list, root-only comment counts, and commit navigation |
|
||||
| `DiffViewer` | Unified diff renderer with threaded inline comments (root + reply threads) |
|
||||
| `CommentThread` | Renders root comment with resolve/reopen + nested reply threads (agent replies styled with primary border). Inline reply form |
|
||||
| `ConflictResolutionPanel` | Merge conflict detection + agent resolution in initiative review. Shows conflict files, spawns conflict agent, inline questions, re-check on completion |
|
||||
| `PreviewPanel` | Docker preview status: building/running/failed with start/stop (legacy, now integrated into ReviewHeader) |
|
||||
| `ProposalCard` | Individual proposal display |
|
||||
|
||||
@@ -127,6 +128,7 @@ shadcn/ui components: badge (6 status variants + xs size), button, card, dialog,
|
||||
| Hook | Purpose |
|
||||
|------|---------|
|
||||
| `useRefineAgent` | Manages refine agent lifecycle for initiative |
|
||||
| `useConflictAgent` | Manages conflict resolution agent lifecycle for initiative review |
|
||||
| `useDetailAgent` | Manages detail agent for phase planning |
|
||||
| `useAgentOutput` | Subscribes to live agent output stream |
|
||||
| `useChatSession` | Manages chat session for phase/task refinement |
|
||||
|
||||
Reference in New Issue
Block a user