feat: add local branch checks to PR picker and integrate refresh

Enable optimistic local-branch checks for PR heads to disable non-existent branches
Show IntegrateCommitsSection only when upstream tracking is origin-based or applicable
This commit is contained in:
Bohdan Triapitsyn
2026-01-29 01:11:45 +02:00
parent a78ad90d78
commit 9064e8e73f
3 changed files with 192 additions and 31 deletions
@@ -51,6 +51,7 @@ export const IntegrateCommitsSection: React.FC<{
worktreeMetadata: WorktreeMetadata;
localBranches: string[];
defaultTargetBranch: string;
refreshKey?: number;
onRefresh?: () => void;
}> = ({
repoRoot,
@@ -58,6 +59,7 @@ export const IntegrateCommitsSection: React.FC<{
worktreeMetadata,
localBranches,
defaultTargetBranch,
refreshKey,
onRefresh,
}) => {
const currentSessionId = useSessionStore((s) => s.currentSessionId);
@@ -156,7 +158,7 @@ export const IntegrateCommitsSection: React.FC<{
return () => {
cancelled = true;
};
}, [isEligible, repoRoot, sourceBranch, targetBranch]);
}, [isEligible, repoRoot, sourceBranch, targetBranch, refreshKey]);
const persistTarget = React.useCallback(
(branch: string) => {