Perfect! I've fixed the hook invalidation issue. (#1309)

The problem was that after rebasing, the `useRebase` hook wasn't invalidating the `taskAttempt` query, so the Create PR dialog would read stale `target_branch` data from the cache. I added the missing invalidation at `frontend/src/hooks/useRebase.ts:43-46`, matching the pattern already used correctly in `useChangeTargetBranch.ts`.

Now when a user rebases via the UI, the task attempt query will be invalidated and the Create PR dialog will show the updated target/base branch.
This commit is contained in:
Alex Netsch
2025-11-18 10:23:49 +00:00
committed by GitHub
parent b35708e7b9
commit 9d8c0b286f

View File

@@ -40,6 +40,11 @@ export function useRebase(
queryKey: ['branchStatus', attemptId], queryKey: ['branchStatus', attemptId],
}); });
// Invalidate taskAttempt query to refresh attempt.target_branch
queryClient.invalidateQueries({
queryKey: ['taskAttempt', attemptId],
});
// Refresh branch list used by PR dialog // Refresh branch list used by PR dialog
if (projectId) { if (projectId) {
queryClient.invalidateQueries({ queryClient.invalidateQueries({