Skip to content

Commit 0f18627

Browse files
committed
Fix creating dependent branch not reflecting in ui
The issue seems to be stemming from this PR #11159 which tries to move invalidation from purely the JS side, to basing it on when certain references change. I think the idea behind the change was to try and respond better when the CLI or even `git` itself performs an action. This approach might however need a bit more finessing. The issue we are seeing here is that adding a new references doesn't change any existing references, which means we then don't reflect the change in the frontend. It seems like there are still some "old" style invalidations in the frontend, so for now I'm going to add back in the particular invalidation that is now missing & causing the problem.
1 parent 4204355 commit 0f18627

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/desktop/src/lib/stacks/stackService.svelte.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1201,8 +1201,9 @@ function injectEndpoints(api: ClientState['backendApi'], uiState: UiState) {
12011201
actionName: 'Create Branch'
12021202
},
12031203
query: (args) => args,
1204-
invalidatesTags: (_result, _error, _args) => [
1204+
invalidatesTags: (_result, _error, args) => [
12051205
invalidatesList(ReduxTag.HeadSha),
1206+
invalidatesItem(ReduxTag.StackDetails, args.stackId),
12061207
invalidatesList(ReduxTag.BranchListing)
12071208
]
12081209
}),

0 commit comments

Comments
 (0)