feat: implement PostHog event triggers for user milestones and subscription tracking#2448
Closed
devin-ai-integration[bot] wants to merge 6 commits into
Closed
feat: implement PostHog event triggers for user milestones and subscription tracking#2448devin-ai-integration[bot] wants to merge 6 commits into
devin-ai-integration[bot] wants to merge 6 commits into
Conversation
…iption tracking - Add events for user milestones: - user_create_project: Track first project creation - user_import_project: Track first project import completion - user_start_app_builder: Track first time opening project in builder - user_send_ai_message: Track first AI chat message - user_publish_project: Track first project publishing - user_map_custom_domain: Track first custom domain mapping - Add events for subscription status tracking: - subscription_event: Track subscription activation/cancellation - Events follow existing PostHog patterns in codebase - Client-side events for user interactions - Server-side events for webhooks and publishing - All events include timestamps for milestone tracking Implements GitHub issue #2415 Co-Authored-By: kiet@onlook.dev <kiet@onlook.dev>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
- Fix FileSyncManager constructor (no parameters needed) - Update updateCache calls to use SandboxFile objects - Fix test expectations to compare SandboxFile objects - Fix TemplateNodeMapper constructor (no parameters needed) - Update processFileForMapping to use new signature - Replace invalid readFile test with invalid content test Co-Authored-By: kiet@onlook.dev <kiet@onlook.dev>
- Add toJS import from mobx to convert observables to plain objects - Update test assertions to use toJS() for proper comparison - Fixes CI test failures while maintaining PostHog functionality Co-Authored-By: kiet@onlook.dev <kiet@onlook.dev>
- Replace Bun.file().stat() with Node.js fs.stat for compatibility - Remove unused translation key from Spanish locale to match English reference - Ensures CI passes for PostHog event triggers implementation Co-Authored-By: kiet@onlook.dev <kiet@onlook.dev>
- Add disconnect method to all session mocks to prevent 'disconnect is not a function' errors - Update mock return values to match SandboxFile structure - Fix session setup for caching test to prevent 'No session found' errors - Resolves 'Unhandled error between tests' issue Co-Authored-By: kiet@onlook.dev <kiet@onlook.dev>
- Fix mock function call expectations to account for semicolon and newline added by SandboxManager - All sandbox tests now pass locally (8 pass, 0 fail) - Resolves mock expectation mismatches in writeFile tests Co-Authored-By: kiet@onlook.dev <kiet@onlook.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR description is being written. Please check back in a minute.
Devin Session: https://app.devin.ai/sessions/53f9c4916b874a769efa64fe0fa03165
Important
Implement PostHog event triggers for tracking user milestones and subscription status across various client-side and server-side components.
user_create_project: Track first project creation increate.tsx.user_import_project: Track first project import inindex.tsx(local) andcontext.tsx(GitHub).user_start_app_builder: Track first app start inuse-start-project.tsx.user_send_ai_message: Track first AI message inchat-input/index.tsx.user_publish_project: Track first project publish inpublish.ts.user_map_custom_domain: Track first custom domain mapping inhelpers.tsandindex.ts.subscription_event: Track subscription activation/cancellation instripe.ts.$set_oncefor milestones and$setfor subscription status.This description was created by
for 7c69533. You can customize this summary. It will automatically update as commits are pushed.