Conversation
- Added event tracking for desktop app activation and quitting. - Introduced analytics bridge in preload script to handle user identification and event capturing. - Updated IPC channels to support analytics-related actions. - Enhanced analytics functionality in the main process to track user interactions and application updates. - Integrated analytics tracking for folder watching and deep link handling. - Improved connector setup tracking in the web application. This commit enhances the overall analytics capabilities of the application, ensuring better user behavior insights and event tracking across both desktop and web environments.
- Implemented IPC channels for managing auto-launch settings. - Enhanced main process to handle auto-launch behavior on startup. - Updated UI components to allow users to configure launch options. - Integrated analytics tracking for auto-launch events. This commit introduces the ability for users to enable or disable the application launching at system startup, along with options for starting minimized to the tray.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Review by RecurseML
🔍 Review performed on f2bb6db..24383a3
✨ No bugs found, your code is sparkling clean
✅ Files analyzed, no issues (23)
• surfsense_backend/alembic/versions/127_add_report_content_type.py
• surfsense_backend/alembic/versions/128_seed_build_resume_prompt.py
• surfsense_desktop/src/ipc/channels.ts
• surfsense_desktop/src/ipc/handlers.ts
• surfsense_desktop/src/main.ts
• surfsense_desktop/src/modules/analytics.ts
• surfsense_desktop/src/modules/auto-launch.ts
• surfsense_desktop/src/modules/auto-updater.ts
• surfsense_desktop/src/modules/deep-links.ts
• surfsense_desktop/src/modules/folder-watcher.ts
• surfsense_desktop/src/modules/tray.ts
• surfsense_desktop/src/modules/window.ts
• surfsense_desktop/src/preload.ts
• surfsense_web/app/dashboard/[search_space_id]/user-settings/components/DesktopContent.tsx
• surfsense_web/app/dashboard/[search_space_id]/user-settings/components/PurchaseHistoryContent.tsx
• surfsense_web/components/assistant-ui/connector-popup/constants/connector-constants.ts
• surfsense_web/components/assistant-ui/connector-popup/hooks/use-connector-dialog.ts
• surfsense_web/components/free-chat/anonymous-chat.tsx
• surfsense_web/components/free-chat/free-chat-page.tsx
• surfsense_web/contracts/types/stripe.types.ts
• surfsense_web/instrumentation-client.ts
• surfsense_web/lib/posthog/events.ts
• surfsense_web/types/window.d.ts
Description
Motivation and Context
FIX #
Screenshots
API Changes
Change Type
Testing Performed
Checklist
High-level PR Summary
This PR adds launch on startup functionality to the desktop app, allowing users to configure SurfSense to open automatically when they log in to their computer (with an option to start minimized to the tray). The implementation includes cross-platform support (macOS, Windows, and Linux), a UI toggle in the desktop settings panel, first-launch opt-in defaults, and comprehensive analytics tracking. The PR also significantly enhances PostHog analytics integration across both the desktop app and web UI, including unified identity tracking between Electron main process and renderer, connector lifecycle telemetry improvements, and anonymous chat tracking. Minor changes include database migration version renumbering and UI updates to the purchase history table to support multiple product types.
⏱️ Estimated Review Time: 30-90 minutes
💡 Review Order Suggestion
surfsense_desktop/src/modules/auto-launch.tssurfsense_desktop/src/ipc/channels.tssurfsense_desktop/src/ipc/handlers.tssurfsense_desktop/src/main.tssurfsense_desktop/src/modules/window.tssurfsense_desktop/src/preload.tssurfsense_web/types/window.d.tssurfsense_web/app/dashboard/[search_space_id]/user-settings/components/DesktopContent.tsxsurfsense_desktop/src/modules/analytics.tssurfsense_web/instrumentation-client.tssurfsense_web/lib/posthog/events.tssurfsense_desktop/src/modules/deep-links.tssurfsense_desktop/src/modules/auto-updater.tssurfsense_desktop/src/modules/folder-watcher.tssurfsense_desktop/src/modules/tray.tssurfsense_web/components/assistant-ui/connector-popup/constants/connector-constants.tssurfsense_web/components/assistant-ui/connector-popup/hooks/use-connector-dialog.tssurfsense_web/components/free-chat/anonymous-chat.tsxsurfsense_web/components/free-chat/free-chat-page.tsxsurfsense_web/app/dashboard/[search_space_id]/user-settings/components/PurchaseHistoryContent.tsxsurfsense_web/contracts/types/stripe.types.tssurfsense_backend/alembic/versions/127_add_report_content_type.pysurfsense_backend/alembic/versions/128_seed_build_resume_prompt.pysurfsense_backend/alembic/versions/127_add_report_content_type.pysurfsense_backend/alembic/versions/128_seed_build_resume_prompt.pysurfsense_web/app/dashboard/[search_space_id]/user-settings/components/PurchaseHistoryContent.tsxsurfsense_web/contracts/types/stripe.types.ts