Skip to content

Commit

Permalink
Increase sensitivity to backfill all button
Browse files Browse the repository at this point in the history
  • Loading branch information
kiahna-tucker committed Feb 20, 2025
1 parent 846e14e commit 13eb87d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/components/editor/Bindings/Backfill/BackfillButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,14 @@ function BackfillButton({
increment,
bindingMetadata
).then(
() => {
(processedCollections) => {
const targetBindingUUID = singleBindingUpdate
? currentBindingUUID
: undefined;

setBackfilledBindings(increment, targetBindingUUID);

evaluateTrialCollections(
bindingMetadata.map(({ collection }) => collection)
).then(
evaluateTrialCollections(processedCollections).then(
(response) => {
setCollectionMetadata(response, []);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,15 @@ function useUpdateBackfillCounter() {
return Promise.reject(updateResponse.error);
}

return mutateDraftSpecs();
const mutateResponse = await mutateDraftSpecs();

if (!mutateResponse) {
return Promise.reject();
}

return bindingMetadataExists
? bindingMetadata.map(({ collection }) => collection)
: Object.keys(bindings);
},
[
backfilledBindings,
Expand Down
1 change: 1 addition & 0 deletions src/stores/Binding/Store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@ const getInitialState = (
sourceBackfillRecommended:
isBeforeTrialInterval(updated_at) &&
(added ||
state.backfillAllBindings ||
backfilledCollections.includes(catalog_name)),
trialStorage: true,
updatedAt: updated_at,
Expand Down

0 comments on commit 13eb87d

Please sign in to comment.