Backport: telemetry workflow_opened with open_source and missing node metrics (#6476) (#6497)

Backport of #6476 onto rh-test.

- Adds telemetry events for `workflow_opened` and `workflow_imported`
including `open_source` and missing node metrics.
- Resolves merge conflict in `src/scripts/app.ts` by keeping the
telemetry block after `afterConfigureGraph`.
- Includes template load and file input changes to pass `openSource`.

Files changed:
- src/platform/telemetry/providers/cloud/MixpanelTelemetryProvider.ts
- src/platform/telemetry/types.ts
- src/platform/workflow/templates/composables/useTemplateWorkflows.ts
- src/scripts/app.ts
- src/scripts/ui.ts

Validated with `pnpm lint:fix` and `pnpm typecheck`.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6497-Backport-telemetry-workflow_opened-with-open_source-and-missing-node-metrics-6476-29e6d73d365081238b8cef1d1a44287f)
by [Unito](https://www.unito.io)

Co-authored-by: bymyself <cbyrne@comfy.org>
This commit is contained in:
Benjamin Lu
2025-11-01 01:38:42 -07:00
committed by GitHub
parent c5acb39c30
commit 4412ae4bff
5 changed files with 83 additions and 22 deletions

View File

@@ -371,6 +371,10 @@ export class MixpanelTelemetryProvider implements TelemetryProvider {
this.trackEvent(TelemetryEvents.WORKFLOW_IMPORTED, metadata)
}
trackWorkflowOpened(metadata: WorkflowImportMetadata): void {
this.trackEvent(TelemetryEvents.WORKFLOW_OPENED, metadata)
}
trackPageVisibilityChanged(metadata: PageVisibilityMetadata): void {
this.trackEvent(TelemetryEvents.PAGE_VISIBILITY_CHANGED, metadata)
}