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:
@@ -40,6 +40,11 @@ export function useRebase(
|
||||
queryKey: ['branchStatus', attemptId],
|
||||
});
|
||||
|
||||
// Invalidate taskAttempt query to refresh attempt.target_branch
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['taskAttempt', attemptId],
|
||||
});
|
||||
|
||||
// Refresh branch list used by PR dialog
|
||||
if (projectId) {
|
||||
queryClient.invalidateQueries({
|
||||
|
||||
Reference in New Issue
Block a user