Skip to content

Conversation

@benceruleanlu
Copy link
Member

@benceruleanlu benceruleanlu commented Nov 1, 2025

Backport of upstream PR #6499 onto rh-test.

Summary

  • Adds unified telemetry event app:run_triggered with { trigger_source: 'button' | 'keybinding' | 'menu' }.
  • Instruments all run initiation paths:
    • Queue button emits run_triggered (source button) and still emits run_button_click for UI-only tracking.
    • Keybindings emit run_triggered (source keybinding).
    • Menus (menubar + legacy menu buttons) emit run_triggered (source menu).
  • Mixpanel provider implements trackRunTriggered.
  • No changes to execution_start logic.

Files changed (matching PR #6499 exactly)

  • src/components/actionbar/ComfyRunButton/ComfyQueueButton.vue
  • src/platform/telemetry/providers/cloud/MixpanelTelemetryProvider.ts
  • src/platform/telemetry/types.ts
  • src/scripts/ui.ts
  • src/services/keybindingService.ts
  • src/stores/menuItemStore.ts

Notes

Upstream reference: #6499

┆Issue is synchronized with this Notion page by Unito

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 1, 2025
@github-actions
Copy link

github-actions bot commented Nov 1, 2025

🎭 Playwright Test Results

Some tests failed

⏰ Completed at: 11/01/2025, 07:08:59 PM UTC

📊 Test Reports by Browser


🎉 Click on the links above to view detailed test results for each browser configuration.

@github-actions
Copy link

github-actions bot commented Nov 1, 2025

🔧 Auto-fixes Applied

This PR has been automatically updated to fix linting and formatting issues.

⚠️ Important: Your local branch is now behind. Run git pull before making additional changes to avoid conflicts.

Changes made:

  • ESLint auto-fixes
  • Prettier formatting

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Nov 1, 2025
@christian-byrne christian-byrne added the claude-review Add to trigger a PR code review from Claude Code label Nov 1, 2025
…ons (#6499)

Summary
- Add new telemetry event: `app:run_triggered` with `{ trigger_source:
'button' | 'keybinding' | 'menu' }`.
- Instrument all run initiation paths:
- UI Queue button emits `run_triggered` (source `button`) and keeps
emitting `run_button_click` for UI-only tracking.
- Keybindings (Ctrl+Enter / Ctrl+Shift+Enter) emit `run_triggered`
(source `keybinding`).
- Menus (menubar + legacy menu buttons) emit `run_triggered` (source
`menu`).
- Mixpanel provider now supports `trackRunTriggered` and forwards
`run_triggered`.
- `execution_start` tracking remains unchanged.

Motivation
GTM observed more `execution_start` events than `run_button_click`. This
change clarifies attribution by adding a unified event across all
triggers while preserving the UI-only `run_button_click` metric.

Files
- src/platform/telemetry/types.ts: Add `RunTriggeredMetadata`,
`RUN_TRIGGERED`, provider method signature.
- src/platform/telemetry/providers/cloud/MixpanelTelemetryProvider.ts:
Implement `trackRunTriggered`.
- src/components/actionbar/ComfyRunButton/ComfyQueueButton.vue: Emit
`run_triggered` on button path.
- src/services/keybindingService.ts: Emit `run_triggered` when queue
commands are invoked via keybindings.
- src/stores/menuItemStore.ts: Emit `run_triggered` for queue commands
invoked via menubar.
- src/scripts/ui.ts: Emit `run_triggered` for legacy menu queue buttons.

Notes
- `run_button_click` continues to represent UI button presses only.
- `run_triggered` now represents all user-initiated runs with clear
source attribution.

QA
- Cloud build: verify `app:run_triggered` appears with the correct
`trigger_source` for button, keybinding, and menu triggers.
- Verify `app:run_button_click` only fires for the button path.
- Confirm `execution_start` still tracks as before.

If preferred, we can extend `run_triggered` with additional fields
(e.g., queue mode, batchCount) in a follow-up.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6499-feat-telemetry-add-unified-run_triggered-event-for-all-run-initiations-29e6d73d3650819fb481d3e0e925c50f)
by [Unito](https://www.unito.io)

---------

Co-authored-by: GitHub Action <[email protected]>
@christian-byrne christian-byrne force-pushed the backport-6499-to-rh-test branch from c0777db to 777e751 Compare November 1, 2025 18:33
@github-actions
Copy link

github-actions bot commented Nov 1, 2025

🔧 Auto-fixes Applied

This PR has been automatically updated to fix linting and formatting issues.

⚠️ Important: Your local branch is now behind. Run git pull before making additional changes to avoid conflicts.

Changes made:

  • ESLint auto-fixes
  • Prettier formatting

@christian-byrne
Copy link
Contributor

Updated this PR with a clean backport from the merged commit on main.

Changes made:

Result:

  • ✅ Clean cherry-pick with no conflicts
  • ✅ All 5 files changed match the original PR exactly
  • ✅ Total: +49 lines, -3 lines

The backport is now ready for review and merging.

@christian-byrne christian-byrne merged commit a898739 into rh-test Nov 1, 2025
2 checks passed
@christian-byrne christian-byrne deleted the backport-6499-to-rh-test branch November 1, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-review Add to trigger a PR code review from Claude Code size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants