Commit Graph

6 Commits

Author SHA1 Message Date
Christian Byrne
bb11639b75 [bugfix] update survey response event to match exact survey schema 1-to-1 (#6325)
## Summary

Fixes all usages of `SurveyResponses` interface to match the updated
structure.

## Problem

After PR #6314 updated the `SurveyResponses` interface, several files
still used the old property names causing TypeScript errors:
- `team_size` (removed)
- `use_case` (should be `useCase`)
- `intended_use` (removed)

## Changes

Updated all survey response usages:

**CloudSurveyView.vue:**
- Updated `trackSurvey` call to use new field names
- Removed obsolete `team_size` and `intended_use` fields
- Added `making` field for content type tracking

**MixpanelTelemetryProvider.ts (4 locations):**
- User properties from cached store
- User properties from dynamic import  
- Event properties in `trackSurvey`
- `setSurveyUserProperties` method

## Testing

- [x] Type checking passes
- [x] Survey data now maps 1-to-1 with actual survey fields

## Related

Follow-up to PR #6314 which updated the interface definition.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6325-bugfix-update-survey-response-usage-to-match-new-interface-2996d73d36508128bb62deb545b76c7b)
by [Unito](https://www.unito.io)
2025-10-26 22:53:09 -07:00
Comfy Org PR Bot
96d76f0052 [backport rh-test] [bugfix] fix survey properties mapping to match actual survey data (#6315)
Backport of #6314 to `rh-test`

Automatically created by backport workflow.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6315-backport-rh-test-bugfix-fix-survey-properties-mapping-to-match-actual-survey-data-2996d73d36508170a56cea2a95188aea)
by [Unito](https://www.unito.io)

Co-authored-by: Christian Byrne <cbyrne@comfy.org>
2025-10-26 18:11:49 -07:00
Christian Byrne
5229a48ef5 [feat] track analytics in English for template metadata (#6305)
## Summary

Track template metadata in English for analytics regardless of user's
locale to enable consistent statistical analysis.

## Changes

- **What**: Load English template index alongside localized version
(cloud builds only)
- **What**: Added getEnglishMetadata() method to workflowTemplatesStore
that returns English versions of template tags, category, useCase,
models, and license
- **What**: Updated MixpanelTelemetryProvider to prefer English metadata
for analytics events, falling back to localized values

## Review Focus

English template fetch only triggers in cloud builds via isCloud flag.
Non-cloud builds see no bundle size impact. Method returns null when
English templates unavailable, with fallback to localized data ensuring
analytics continue working in edge cases.

Backport of main PR to rh-test branch.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6305-feat-track-analytics-in-English-for-template-metadata-2986d73d365081d1acf6eeeaadb224b5)
by [Unito](https://www.unito.io)
2025-10-26 02:44:36 -07:00
Christian Byrne
ecc809c5c0 [backport rh-test] change cloud feature flags to be loaded dynamically at runtime rather than set in build (#6257)
## Summary

Backport of #6246 to `rh-test` branch.

This PR cherry-picks commit d7a58a7a9b to
the `rh-test` branch with merge conflicts resolved.

### Conflicts Resolved

**GraphCanvas.vue:**
- Accepted incoming template structure changes (removed betaMenuEnabled
check, added workflow tabs)
- Added missing imports: TopbarBadges, WorkflowTabs, isNativeWindow
- Added showUI computed property

**cloudBadge.ts:**
- Deleted file (replaced by cloudBadges.ts plural)

**telemetry/types.ts:**
- Merged interface methods from both branches
- Accepted incoming event constant changes (app: prefix)

Original PR: #6246

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6257-backport-rh-test-change-cloud-feature-flags-to-be-loaded-dynamically-at-runtime-rather--2966d73d365081a59daeeb6dfbbf2af5)
by [Unito](https://www.unito.io)
2025-10-24 12:28:56 -07:00
Christian Byrne
0d4d68fec9 track cloud-specific onboarding events and add performance optimizations for hosted cloud app (#6158)
## Summary
- Complete telemetry implementation with circular dependency fix
- Add build performance optimizations from main branch

### Telemetry Features
-  Final telemetry events: signup opened, survey flow, email
verification
-  Onboarding mode to prevent circular dependencies during app
initialization
-  Lazy composable loading with dynamic imports for workflow tracking
-  Survey responses as both event properties and persistent user
properties
-  User identification method for onboarding flow
-  Deferred user property setting until user is authenticated

### Performance Optimizations  
-  Tree-shaking enabled to remove unused code
-  Manual chunk splitting for vendor libraries (primevue, vue, tiptap,
chart.js, etc.)
-  Enhanced esbuild minification with console removal in production
builds
-  GENERATE_SOURCEMAP environment variable control
-  Maintained ImportMap disabled for cloud performance

## Test plan
- [x] Telemetry events track correctly in Mixpanel
- [x] No circular dependency errors on app startup
- [x] Survey responses appear as both event properties and user
properties
- [x] Build optimizations reduce bundle size and improve loading
performance
- [x] All lint/format/typecheck passes

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6158-track-cloud-specific-onboarding-events-and-add-performance-optimizations-for-hosted-cloud-2926d73d365081a7b533dde249d5f734)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-19 23:16:56 -07:00
Christian Byrne
b708ebf540 [backport rh-test] add telemetry provider for cloud distribution (#6155)
## Summary
This PR manually backports the telemetry provider implementation to the
rh-test branch after the automated backport failed due to merge
conflicts.


┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6155-Manual-backport-add-telemetry-provider-for-cloud-distribution-2926d73d3650812e94e2fe0bd5e9bc59)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-19 20:04:57 -07:00