Changes don't automatically appear (vibe-kanban) (#71)
* I've added a new useEffect that will fetch the diff when the coding agent completes, fails, or the task is complete and has changes. This ensures that the final diff is always displayed without requiring a page refresh. The fix triggers a diff fetch when: - Coding agent completes (`CodingAgentComplete`) - Coding agent fails (`CodingAgentFailed`) - Task is complete (`Complete`) - And there are actual changes (`has_changes`) This should resolve the issue where changes don't automatically appear and require a page refresh. * prettier
This commit is contained in:
committed by
GitHub
parent
735fb54266
commit
6f06816908
@@ -179,6 +179,32 @@ export function TaskDetailsPanel({
|
||||
}
|
||||
}, [executionState, isOpen, selectedAttempt, fetchDiff]);
|
||||
|
||||
// Refresh diff when coding agent completes or changes state
|
||||
useEffect(() => {
|
||||
if (!executionState || !isOpen || !selectedAttempt) return;
|
||||
|
||||
const isCodingAgentComplete =
|
||||
executionState.execution_state === 'CodingAgentComplete';
|
||||
const isCodingAgentFailed =
|
||||
executionState.execution_state === 'CodingAgentFailed';
|
||||
const isComplete = executionState.execution_state === 'Complete';
|
||||
const hasChanges = executionState.has_changes;
|
||||
|
||||
// Fetch diff when coding agent completes, fails, or task is complete and has changes
|
||||
if (
|
||||
(isCodingAgentComplete || isCodingAgentFailed || isComplete) &&
|
||||
hasChanges
|
||||
) {
|
||||
fetchDiff();
|
||||
}
|
||||
}, [
|
||||
executionState?.execution_state,
|
||||
executionState?.has_changes,
|
||||
isOpen,
|
||||
selectedAttempt,
|
||||
fetchDiff,
|
||||
]);
|
||||
|
||||
// Handle ESC key locally to prevent global navigation
|
||||
useEffect(() => {
|
||||
if (!isOpen || isDialogOpen) return;
|
||||
|
||||
Reference in New Issue
Block a user