Skip to content

Commit e3ea4db

Browse files
committed
Clear exclusive action if branch not found
Fixes issue reported through discord where start commit button is disabled.
1 parent d856e84 commit e3ea4db

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

apps/desktop/src/components/StackView.svelte

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,25 @@
224224
}
225225
});
226226
227+
// Clear exclusive action if branch cannot be found.
228+
// TODO: We must be able to express this better..
229+
$effect(() => {
230+
const exclusiveAction = projectState.exclusiveAction.current;
231+
if (exclusiveAction && branchesResult.current.data) {
232+
setTimeout(() => {
233+
if (exclusiveAction && branchesResult.current.data) {
234+
if ('branchName' in exclusiveAction) {
235+
const branchName = exclusiveAction.branchName;
236+
if (branchName && !branchesResult.current.data.some((b) => b.name === branchName)) {
237+
projectState.exclusiveAction.set(undefined);
238+
console.warn('Exclusive action cleared');
239+
}
240+
}
241+
}
242+
}, 500);
243+
}
244+
});
245+
227246
const startCommitVisible = $derived(uncommittedService.startCommitVisible(stack.id));
228247
229248
function onerror(err: unknown) {

0 commit comments

Comments
 (0)