Skip to content

Conversation

@benceruleanlu
Copy link
Member

@benceruleanlu benceruleanlu commented Nov 1, 2025

Summary

  • Add telemetry event for settings changes when the global settings dialog is open
  • Clarify variable names in settings store (settingParameter, settingType) for readability
  • Introduce SettingChangedMetadata and TelemetryEvents.SETTING_CHANGED
  • Implement trackSettingChanged in Mixpanel provider
  • Add focused unit test to verify telemetry triggers when settings dialog is open vs closed

Quality

  • Ran pnpm lint:fix and pnpm typecheck
  • Unit tests pass locally

Notes

  • Event fires only when the settings dialog is open (uses useDialogStore().isDialogOpen('global-settings'))
  • OSS builds are unaffected (useTelemetry() returns null)

┆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

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 11/02/2025, 06:25:45 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Nov 1, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 11/02/2025, 06:41:09 AM UTC

📈 Summary

  • Total Tests: 499
  • Passed: 466 ✅
  • Failed: 0
  • Flaky: 3 ⚠️
  • Skipped: 30 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 457 / ❌ 0 / ⚠️ 3 / ⏭️ 30
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 6 / ❌ 0 / ⚠️ 0 / ⏭️ 0

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

@benceruleanlu benceruleanlu marked this pull request as draft November 1, 2025 06:23
@benceruleanlu benceruleanlu changed the title feat(telemetry): track settings changes; clarify names; add unit test feat(telemetry): track settings changes Nov 1, 2025
@github-actions
Copy link

github-actions bot commented Nov 1, 2025

Bundle Size Report

Summary

  • Raw size: 12.2 MB baseline 12.2 MB — 🔴 +104 B
  • Gzip: 2.48 MB baseline 2.48 MB — 🔴 +34 B
  • Brotli: 1.95 MB baseline 1.95 MB — 🟢 -41 B
  • Bundles: 58 current • 58 baseline • 13 added / 13 removed

Category Glance
App Entry Points 🔴 +104 B (3.27 MB) · Vendor & Third-Party ⚪ 0 B (5.32 MB) · Other ⚪ 0 B (2.55 MB) · Graph Workspace ⚪ 0 B (724 kB) · Panels & Settings ⚪ 0 B (295 kB) · UI Components ⚪ 0 B (12.3 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.27 MB (baseline 3.27 MB) • 🔴 +104 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-BkwuJ9XN.js (new) 2.89 MB 🔴 +2.89 MB 🔴 +596 kB 🔴 +450 kB
assets/index-Cp8qNnwg.js (removed) 2.89 MB 🟢 -2.89 MB 🟢 -596 kB 🟢 -450 kB
assets/index-B_G2OQ9a.js (removed) 381 kB 🟢 -381 kB 🟢 -76.6 kB 🟢 -62.1 kB
assets/index-DOCB-yXx.js (new) 381 kB 🔴 +381 kB 🔴 +76.6 kB 🔴 +62.1 kB
assets/index-DauHU88r.js (removed) 1.75 kB 🟢 -1.75 kB 🟢 -575 B 🟢 -486 B
assets/index-DvWlFxI6.js (new) 1.75 kB 🔴 +1.75 kB 🔴 +578 B 🔴 +486 B

Status: 3 added / 3 removed

Graph Workspace — 724 kB (baseline 724 kB) • ⚪ 0 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-BkYmfyDc.js (removed) 724 kB 🟢 -724 kB 🟢 -141 kB 🟢 -109 kB
assets/GraphView-Bs30n0vA.js (new) 724 kB 🔴 +724 kB 🔴 +141 kB 🔴 +109 kB

Status: 1 added / 1 removed

Views & Navigation — 8.18 kB (baseline 8.18 kB) • ⚪ 0 B

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-CZAe2ffd.js (removed) 8.18 kB 🟢 -8.18 kB 🟢 -2.48 kB 🟢 -2.17 kB
assets/UserSelectView-GtnzEUt_.js (new) 8.18 kB 🔴 +8.18 kB 🔴 +2.48 kB 🔴 +2.17 kB

Status: 1 added / 1 removed

Panels & Settings — 295 kB (baseline 295 kB) • ⚪ 0 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/CreditsPanel-CeHFQry6.js (removed) 22.9 kB 🟢 -22.9 kB 🟢 -5.45 kB 🟢 -4.76 kB
assets/CreditsPanel-IgxypRKq.js (new) 22.9 kB 🔴 +22.9 kB 🔴 +5.45 kB 🔴 +4.75 kB
assets/KeybindingPanel-DkEAShgo.js (new) 15.3 kB 🔴 +15.3 kB 🔴 +3.77 kB 🔴 +3.33 kB
assets/KeybindingPanel-RB7m8cwE.js (removed) 15.3 kB 🟢 -15.3 kB 🟢 -3.78 kB 🟢 -3.33 kB
assets/ExtensionPanel-DbFXKSra.js (new) 12.1 kB 🔴 +12.1 kB 🔴 +2.84 kB 🔴 +2.49 kB
assets/ExtensionPanel-lxFPBVni.js (removed) 12.1 kB 🟢 -12.1 kB 🟢 -2.84 kB 🟢 -2.49 kB
assets/AboutPanel-BC-SmVAZ.js (new) 10.3 kB 🔴 +10.3 kB 🔴 +2.68 kB 🔴 +2.34 kB
assets/AboutPanel-D2ahllD-.js (removed) 10.3 kB 🟢 -10.3 kB 🟢 -2.67 kB 🟢 -2.34 kB
assets/ServerConfigPanel-BJWHLh9p.js (removed) 8.23 kB 🟢 -8.23 kB 🟢 -2.18 kB 🟢 -1.91 kB
assets/ServerConfigPanel-t_Fl_Gb6.js (new) 8.23 kB 🔴 +8.23 kB 🔴 +2.18 kB 🔴 +1.91 kB
assets/UserPanel-DHNFgX9q.js (removed) 7.94 kB 🟢 -7.94 kB 🟢 -2.07 kB 🟢 -1.81 kB
assets/UserPanel-DrpSaZyQ.js (new) 7.94 kB 🔴 +7.94 kB 🔴 +2.07 kB 🔴 +1.81 kB
assets/settings-B-df0dZe.js 20.7 kB 20.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CI6OKvJn.js 22.9 kB 22.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CXGVj_nD.js 24.5 kB 24.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DfQ6dSJj.js 31.6 kB 31.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DJ2QgDzm.js 25.2 kB 25.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DRNLPMG6.js 23.7 kB 23.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DVVycxDc.js 19.9 kB 19.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-G6Dybj1b.js 24.1 kB 24.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-M6_GZccG.js 26 kB 26 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

UI Components — 12.3 kB (baseline 12.3 kB) • ⚪ 0 B

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/ComfyQueueButton-CwsV3XY_.js (new) 11.2 kB 🔴 +11.2 kB 🔴 +2.78 kB 🔴 +2.46 kB
assets/ComfyQueueButton-Is_ub4bS.js (removed) 11.2 kB 🟢 -11.2 kB 🟢 -2.78 kB 🟢 -2.46 kB
assets/UserAvatar.vue_vue_type_script_setup_true_lang-C9bSkTC5.js 1.12 kB 1.12 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 1 added / 1 removed

Data & Services — 11.4 kB (baseline 11.4 kB) • ⚪ 0 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/keybindingService-CbUZi0ue.js (removed) 8.61 kB 🟢 -8.61 kB 🟢 -2.08 kB 🟢 -1.78 kB
assets/keybindingService-CPveN3Tr.js (new) 8.61 kB 🔴 +8.61 kB 🔴 +2.08 kB 🔴 +1.78 kB
assets/serverConfigStore-BXxesUPS.js 2.79 kB 2.79 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 1 added / 1 removed

Utilities & Hooks — 1.07 kB (baseline 1.07 kB) • ⚪ 0 B

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/mathUtil-CTARWQ-l.js 1.07 kB 1.07 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Vendor & Third-Party — 5.32 MB (baseline 5.32 MB) • ⚪ 0 B

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-other-DTJaZ2wB.js 3.22 MB 3.22 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-PESgPnbc.js 517 B 517 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-JDoAqkQm.js 1.37 MB 1.37 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-BovKm-bo.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-CE9hyBb0.js 92.4 kB 92.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BZLod3g9.js 407 kB 407 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 2.55 MB (baseline 2.55 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/commands-B2KZRBmX.js 15.1 kB 15.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-Bw-ckyga.js 13.9 kB 13.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-C_NmM85I.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CuozCW4W.js 14 kB 14 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DGfVUJCR.js 16.2 kB 16.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-dOJNDogK.js 14.5 kB 14.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwiE551e.js 14.7 kB 14.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-Fw7mvqSy.js 13.1 kB 13.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-FXnO1W4Q.js 13.2 kB 13.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Bgu6_Hvd.js 59.5 kB 59.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Bv0L0qvp.js 93 kB 93 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C3Doz3n_.js 67.6 kB 67.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C7eBl607.js 70.7 kB 70.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CHiV9ds2.js 76.4 kB 76.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CIc79Nts.js 68.5 kB 68.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DK5LmuBm.js 58.8 kB 58.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-J1nit7cj.js 66.3 kB 66.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-W97XgvAQ.js 80.4 kB 80.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-8Ef8lY1m.js 196 kB 196 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BdF8EiZl.js 200 kB 200 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bv9Y8Cvp.js 229 kB 229 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-cMdB_wHv.js 179 kB 179 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CvNWbbtX.js 194 kB 194 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CwDWxzVz.js 215 kB 215 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CyPAVHpA.js 191 kB 191 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-D6QTD6bJ.js 181 kB 181 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DKn6VmRJ.js 192 kB 192 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

@benceruleanlu benceruleanlu marked this pull request as ready for review November 1, 2025 06:47
@christian-byrne christian-byrne added the claude-review Add to trigger a PR code review from Claude Code label Nov 1, 2025
Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comprehensive PR Review

This review is generated by Claude. It may not always be accurate, as with human reviewers. If you believe that any of the comments are invalid or incorrect, please state why for each. For others, please implement the changes in one way or another.

Review Summary

PR: feat(telemetry): track settings changes (#6504)
Impact: 117 additions, 2 deletions across 4 files

Issue Distribution

  • Critical: 0
  • High: 1
  • Medium: 3
  • Low: 3

Category Breakdown

  • Architecture: 2 issues
  • Security: 1 issue
  • Performance: 1 issue
  • Code Quality: 3 issues

Key Findings

Architecture & Design

Positive: The implementation follows a good pattern by only tracking telemetry when the settings dialog is open, preventing unnecessary data collection during programmatic settings changes.

Concerns:

  1. The telemetry tracking is directly embedded in the settings store, violating single responsibility principle
  2. Error handling could be more robust with better isolation between core functionality and telemetry

Recommendation: Consider extracting telemetry to a separate service that observes settings changes through Vue's reactivity system.

Security Considerations

Critical Issue: The current implementation tracks previous_value and new_value as unknown types, which could inadvertently capture sensitive data like API keys, tokens, or personal information in telemetry systems.

Recommendation: Implement a whitelist approach for trackable settings or add data sanitization to prevent sensitive information leaks.

Performance Impact

Minor Issue: There's unnecessary computation happening on every settings change (like getSettingInfo calls) even when telemetry won't be sent.

Bundle Impact: Minimal - only adds telemetry interface and tracking logic, with good conditional compilation for OSS builds.

Integration Points

Extension Compatibility: Changes are additive and shouldn't affect existing extensions or settings functionality.

Testing: Excellent test coverage with both positive and negative test cases for telemetry triggering.

Positive Observations

  1. Excellent Test Coverage: Comprehensive unit tests covering both telemetry enabled/disabled scenarios
  2. OSS Build Safety: Proper conditional compilation ensures telemetry is excluded from open source builds
  3. Type Safety: Good TypeScript usage with proper interfaces and type definitions
  4. Error Handling: Basic error handling with try-catch blocks and console error logging
  5. Conditional Logic: Smart approach to only track when settings dialog is open
  6. Code Organization: Clean separation of telemetry types and provider implementation

Next Steps

  1. Address security issue - Implement data sanitization for sensitive settings before merge
  2. Consider architectural feedback for long-term maintainability (can be addressed in follow-up PR)
  3. Performance optimization - Move unnecessary computations inside conditional blocks
  4. Code cleanup - Remove unnecessary import reordering for cleaner diffs

This is a comprehensive automated review. For architectural decisions requiring human judgment, please request additional manual review.

@github-actions github-actions bot removed the claude-review Add to trigger a PR code review from Claude Code label Nov 1, 2025
@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
@benceruleanlu benceruleanlu marked this pull request as draft November 1, 2025 21:18
@benceruleanlu benceruleanlu marked this pull request as ready for review November 1, 2025 21:37
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Nov 1, 2025
@benceruleanlu benceruleanlu added needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch branch:rh-test labels Nov 1, 2025
@christian-byrne christian-byrne merged commit feda2d4 into main Nov 2, 2025
27 checks passed
@christian-byrne christian-byrne deleted the chief-pig branch November 2, 2025 06:52
@github-actions
Copy link

github-actions bot commented Nov 2, 2025

@benceruleanlu Backport to rh-test failed: Merge conflicts detected.

Please manually cherry-pick commit feda2d47b003fdc1bfa4720abd743d6259382c80 to the rh-test branch.

Conflicting files
  • src/platform/telemetry/providers/cloud/MixpanelTelemetryProvider.ts
  • src/platform/telemetry/types.ts

benceruleanlu added a commit that referenced this pull request Nov 4, 2025
…factor dialogService telemetry import\n\n- Backport of #6504 and https://github.com/Comfy-Org/ComfyUI_frontend/pull/6511\n- Remove input_type, category, sub_category from SettingChangedMetadata\n- Replace lazy import in dialogService error dialog onClose with top-level useTelemetry()\n- Lint and typecheck pass (pnpm lint:fix && pnpm typecheck)
christian-byrne pushed a commit that referenced this pull request Nov 4, 2025
…import refactor (#6567)

Backports the combined changes from the following PRs into `rh-test`:

- #6504 — Settings telemetry (track `SETTING_CHANGED` on successful
update)
- #6511 — UI telemetry (actionbar drag handle, run button
choices/multi‑batch submit, breadcrumb item/root selection)

Key points
- Settings telemetry added via `SettingItem.vue` after successful
setting updates and wired to `TelemetryEvents.SETTING_CHANGED`.
- UI telemetry wired for run/queue actions and breadcrumbs to match
upstream behavior.

Divergences from the source PRs
- Removed `input_type`, `category`, and `sub_category` from
`SettingChangedMetadata` to keep the event shape focused and consistent
with downstream consumers.
- Replaced lazy telemetry import in `dialogService` error dialog
`onClose` handlers with a top‑level `useTelemetry()` import for clarity
and to avoid unnecessary dynamic imports.
- Kept a few additional telemetry events already present in this branch
(error dialog actions, graph/sidebar/template interactions). Happy to
trim these for a strict backport if desired.

Validation
- Ran `pnpm lint:fix && pnpm typecheck` successfully locally.

References
- Upstream PRs: #6504,
#6511
- Branch: `backport-6511-6504-to-rh-test`

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6567-Backport-telemetry-settings-UI-tracking-6504-6511-and-dialog-import-refactor-2a16d73d365081ce80a0f973c4483653)
by [Unito](https://www.unito.io)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch:rh-test needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants