fix(editor): Fix placeholder telemetry event triggering too many times (#23454)

This commit is contained in:
Mutasem Aldmour
2025-12-19 15:27:03 +01:00
committed by GitHub
parent b8e6e0f455
commit 283786917d
2 changed files with 7 additions and 11 deletions
@@ -770,17 +770,6 @@ export const useBuilderStore = defineStore(STORES.BUILDER, () => {
telemetry.track('Workflow builder journey', payload);
}
watch(
workflowTodos,
(newTodos, oldTodos) => {
// Only track if we had todos before and now we don't
if (oldTodos && oldTodos.length > 0 && newTodos.length === 0) {
trackWorkflowBuilderJourney('no_placeholder_values_left');
}
},
{ deep: true },
);
// Public API
return {
// State
@@ -187,6 +187,13 @@ function trackBuilderPlaceholders(issue: WorkflowValidationIssue) {
onMounted(scrollIntoView);
// Track when all todos are resolved while the component is visible
watch(hasValidationIssues, (hasIssues, hadIssues) => {
if (hadIssues && !hasIssues) {
builderStore.trackWorkflowBuilderJourney('no_placeholder_values_left');
}
});
onBeforeUnmount(() => {
stopExecutionWatcher();
});