feat(events): add events for request creation and preferences - INS-2376#9911
feat(events): add events for request creation and preferences - INS-2376#9911ihexxa wants to merge 4 commits into
Conversation
✅ Circular References ReportGenerated at: 2026-05-19T08:40:20.806Z Summary
Click to view all circular references in PR (19)Click to view all circular references in base branch (19)Analysis✅ No Change: This PR does not introduce or remove any circular references. This report was generated automatically by comparing against the |
14f53c2 to
5512818
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds analytics instrumentation for two user actions: clicking the "Preferences" entry in the App menu, and creating new requests through three different entry points (sidebar "+" menu, tab list, and the "Add Request to Collection" modal). It defines a new AppMenuPreferencesClicked analytics event and introduces a makeRequestCreatedEvent helper that emits the existing requestCreated event with requestType and source properties.
Changes:
- Add
AppMenuPreferencesClickedenum value and fire it from the Electron main process menu handler. - Add
makeRequestCreatedEventfactory inui/analytics.tsand wire it into the sidebar request creation menu, tab list "+ HTTP request" action, and the add-request-to-collection modal. - Convert
AnalyticsEventimport inui/analytics.tsfrom a type-only to a value import so it can be referenced at runtime.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/insomnia-analytics/src/events.ts | Adds the new AppMenuPreferencesClicked enum value. |
| packages/insomnia/src/main/window-utils.ts | Tracks the new event when the Preferences menu item is clicked. |
| packages/insomnia/src/ui/analytics.ts | Adds the makeRequestCreatedEvent factory and switches AnalyticsEvent to a value import. |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId.workspace.$workspaceId.debug.tsx | Tracks request creation for each request type from the sidebar new-request menu. |
| packages/insomnia/src/ui/components/tabs/tab-list.tsx | Tracks HTTP request creation triggered from the tab list. |
| packages/insomnia/src/ui/components/modals/add-request-to-collection-modal.tsx | Tracks HTTP request creation triggered from the add-request modal (source value appears incorrect). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Changes
https://konghq.atlassian.net/browse/INS-2376