fix(kanban): skip gone branches in merge-all instead of halting
merge-all halted with "merge: <branch> - not something we can merge" when a candidate's branch ref no longer resolved (worktree+branch cleaned up out-of-band while the run row lingered with branch set). That's not a conflict — there's nothing for a resolution agent to do — yet it stopped the whole batch. - Verify each candidate resolves to a commit (resolveRef) before attempting; non-resolving branches are skipped (⤳) and the batch continues. - Null the stale branch on the run row so it stops reappearing as a candidate. - BatchMergeItem gains `skipped`; the modal shows skipped branches and counts them in the summary. EOF && echo "" && git push 2>&1 | tail -4
This commit is contained in:
@@ -56,6 +56,8 @@ export function MergeAllModal({ result, busy, onClose }: MergeAllModalProps) {
|
||||
` · ${result.items.filter((i) => i.conflict && i.ok).length} conflicts resolved by agent`}
|
||||
{result.items.some((i) => i.alreadyMerged) &&
|
||||
` · ${result.items.filter((i) => i.alreadyMerged).length} already in`}
|
||||
{result.items.some((i) => i.skipped) &&
|
||||
` · ${result.items.filter((i) => i.skipped).length} skipped`}
|
||||
{result.haltedOn && ' · halted on conflict'}
|
||||
</p>
|
||||
|
||||
@@ -94,16 +96,31 @@ export function MergeAllModal({ result, busy, onClose }: MergeAllModalProps) {
|
||||
{result.items.length > 0 && (
|
||||
<div className="flex flex-col gap-2">
|
||||
{result.items.map((item) => {
|
||||
const tone =
|
||||
item.alreadyMerged ? 'var(--muted)' : item.ok ? 'var(--green)' : 'var(--red)';
|
||||
const label = item.alreadyMerged
|
||||
? 'already in target'
|
||||
: item.conflict && item.ok
|
||||
? 'conflict resolved by agent'
|
||||
const tone = item.skipped
|
||||
? 'var(--muted)'
|
||||
: item.alreadyMerged
|
||||
? 'var(--muted)'
|
||||
: item.ok
|
||||
? 'merged'
|
||||
: 'conflict';
|
||||
const glyph = item.alreadyMerged ? '⇢' : item.conflict && item.ok ? '🤖' : item.ok ? '✓' : '⚠';
|
||||
? 'var(--green)'
|
||||
: 'var(--red)';
|
||||
const label = item.skipped
|
||||
? 'skipped (branch gone)'
|
||||
: item.alreadyMerged
|
||||
? 'already in target'
|
||||
: item.conflict && item.ok
|
||||
? 'conflict resolved by agent'
|
||||
: item.ok
|
||||
? 'merged'
|
||||
: 'conflict';
|
||||
const glyph = item.skipped
|
||||
? '⤳'
|
||||
: item.alreadyMerged
|
||||
? '⇢'
|
||||
: item.conflict && item.ok
|
||||
? '🤖'
|
||||
: item.ok
|
||||
? '✓'
|
||||
: '⚠';
|
||||
return (
|
||||
<div
|
||||
key={item.runId}
|
||||
|
||||
@@ -121,6 +121,9 @@ export interface BatchMergeItem extends MergeResult {
|
||||
conflict: boolean;
|
||||
/** When an agent resolved a conflict for this branch, its run id; else null. */
|
||||
resolutionRunId: string | null;
|
||||
/** True if the branch no longer resolves (cleaned up but the row lingered) —
|
||||
* skipped, batch continues. */
|
||||
skipped: boolean;
|
||||
}
|
||||
|
||||
/** Result of merging several branches sequentially into the main branch. */
|
||||
|
||||
Reference in New Issue
Block a user