Skip to content

feat(automations): enhance tracking for automation lifecycle events#1452

Merged
MODSetter merged 1 commit into
devfrom
dev_mod
May 31, 2026
Merged

feat(automations): enhance tracking for automation lifecycle events#1452
MODSetter merged 1 commit into
devfrom
dev_mod

Conversation

@MODSetter
Copy link
Copy Markdown
Owner

@MODSetter MODSetter commented May 31, 2026

  • Added tracking for automation creation, updates, deletions, and trigger modifications, including success and failure events.
  • Implemented event tracking in the automation creation process, including chat approval and rejection scenarios.
  • Updated the instrumentation client to ensure correct typing for PostHog integration.
  • Refactored existing mutation atoms to include tracking calls for automation-related actions, improving analytics capabilities.

Description

Motivation and Context

FIX #

Screenshots

API Changes

  • This PR includes API changes

Change Type

  • Bug fix
  • New feature
  • Performance improvement
  • Refactoring
  • Documentation
  • Dependency/Build system
  • Breaking change
  • Other (specify):

Testing Performed

  • Tested locally
  • Manual/QA verification

Checklist

  • Follows project coding standards and conventions
  • Documentation updated as needed
  • Dependencies updated as needed
  • No lint/build errors or new warnings
  • All relevant tests are passing

High-level PR Summary

This PR introduces comprehensive analytics tracking for automation lifecycle events throughout the application. It adds tracking for automation creation, updates, deletions, and trigger modifications (both success and failure cases), implements event tracking in the chat-based automation creation flow (approval, rejection, and draft editing), and fixes a TypeScript typing issue in the PostHog instrumentation client. All tracking calls use a new set of event functions defined in lib/posthog/events.ts and are integrated into existing mutation handlers and UI components without changing core business logic.

⏱️ Estimated Review Time: 30-90 minutes

💡 Review Order Suggestion
Order File Path
1 surfsense_web/lib/posthog/events.ts
2 surfsense_web/instrumentation-client.ts
3 surfsense_web/atoms/automations/automations-mutation.atoms.ts
4 surfsense_web/components/tool-ui/automation/create-automation.tsx

Need help? Join our Discord

- Added tracking for automation creation, updates, deletions, and trigger modifications, including success and failure events.
- Implemented event tracking in the automation creation process, including chat approval and rejection scenarios.
- Updated the instrumentation client to ensure correct typing for PostHog integration.
- Refactored existing mutation atoms to include tracking calls for automation-related actions, improving analytics capabilities.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
surf-sense-frontend Ready Ready Preview, Comment May 31, 2026 12:46am

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 31, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a4a35b89-7cca-4db6-915d-59989b9783f0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev_mod

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@MODSetter MODSetter merged commit 034f80f into dev May 31, 2026
5 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant