Skip to content

feat: add enterprise user activity events for request/document actions - #10337

Open
fiosman wants to merge 7 commits into
developfrom
feat/account-tracking-activity-events
Open

feat: add enterprise user activity events for request/document actions#10337
fiosman wants to merge 7 commits into
developfrom
feat/account-tracking-activity-events

Conversation

@fiosman

@fiosman fiosman commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

This PR adds logic to integrate new POST /v3/users/me/actions API endpoint. It fires off events after a request/design document is created and a request is executed. All events are fire and forget.

Jira

Copilot AI lite review requested due to automatic review settings August 5, 2026 20:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates the new POST /v3/users/me/actions endpoint by adding a lightweight “fire-and-forget” tracking helper in the UI and emitting user-action events when documents/requests are created and when requests are executed.

Changes:

  • Added trackUserAction API wrapper and UserActionType union in insomnia-api.
  • Added trackUserActivity UI utility to generate eventIds and no-op when logged out.
  • Wired activity tracking into workspace/document creation, request creation, and request execution routes.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/insomnia/src/ui/utils/track-user-activity.ts New UI helper that reads session id, generates an event id, and posts the user action (best-effort).
packages/insomnia/src/routes/organization.$organizationId.project.$projectId.workspace.new.tsx Emits document_created and request_created activity events after corresponding create flows.
packages/insomnia/src/routes/organization.$organizationId.project.$projectId.workspace.$workspaceId.debug.request.new.tsx Emits request_created activity event on request creation via debug route.
packages/insomnia/src/routes/organization.$organizationId.project.$projectId.workspace.$workspaceId.debug.request.$requestId.send.tsx Emits request_executed activity event after successful request execution analytics.
packages/insomnia-api/src/user.ts Adds the API client wrapper (trackUserAction) for POST /v3/users/me/actions.
Suppressed comments (1)

packages/insomnia/src/ui/utils/track-user-activity.ts:8

  • The doc comment endpoint path is missing the /v3 prefix; it should match the actual trackUserAction path (/v3/users/me/actions).
 * POST /users/me/actions. Fire-and-forget: never throws, no-ops when logged out.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/insomnia/src/ui/utils/track-user-activity.ts Outdated
Comment thread packages/insomnia-api/src/user.ts
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

✅ Circular References Report

Generated at: 2026-08-07T22:08:13.178Z
Status: ✅ NO CHANGE

Summary

Metric Base (develop) PR Change
Total Circular References 9 9 0 (0.00%)
Click to view all circular references in PR (9)
insomnia-inso/src/db/models/types.ts -> insomnia-inso/src/db/types.ts
insomnia/src/main/prompt-bridge.ts -> insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/network/network.ts -> insomnia-scripting-environment/src/objects/index.ts -> insomnia-scripting-environment/src/objects/collection.ts -> insomnia-scripting-environment/src/objects/response.ts
insomnia/src/network/network.ts -> insomnia/src/common/render.ts
insomnia/src/ui/components/settings/import-export.tsx -> insomnia/src/ui/components/modals/export-requests-modal.tsx
insomnia/src/ui/components/tabs/tab-list.tsx -> insomnia/src/ui/components/tabs/tab.tsx
insomnia/src/ui/components/templating/tag-editor-arg-sub-form.tsx -> insomnia/src/ui/components/templating/external-vault/external-vault-form.tsx
insomnia/src/ui/components/viewers/response-viewer.tsx -> insomnia/src/ui/components/viewers/response-multipart-viewer.tsx
Click to view all circular references in base branch (9)
insomnia-inso/src/db/models/types.ts -> insomnia-inso/src/db/types.ts
insomnia/src/main/prompt-bridge.ts -> insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/network/network.ts -> insomnia-scripting-environment/src/objects/index.ts -> insomnia-scripting-environment/src/objects/collection.ts -> insomnia-scripting-environment/src/objects/response.ts
insomnia/src/network/network.ts -> insomnia/src/common/render.ts
insomnia/src/ui/components/settings/import-export.tsx -> insomnia/src/ui/components/modals/export-requests-modal.tsx
insomnia/src/ui/components/tabs/tab-list.tsx -> insomnia/src/ui/components/tabs/tab.tsx
insomnia/src/ui/components/templating/tag-editor-arg-sub-form.tsx -> insomnia/src/ui/components/templating/external-vault/external-vault-form.tsx
insomnia/src/ui/components/viewers/response-viewer.tsx -> insomnia/src/ui/components/viewers/response-multipart-viewer.tsx

Analysis

No Change: This PR does not introduce or remove any circular references.


This report was generated automatically by comparing against the develop branch.

@fiosman
fiosman force-pushed the feat/account-tracking-activity-events branch from cd08be7 to 85fc792 Compare August 6, 2026 15:05
@fiosman
fiosman marked this pull request as draft August 6, 2026 15:57
@fiosman
fiosman marked this pull request as ready for review August 6, 2026 20:25
@fiosman
fiosman force-pushed the feat/account-tracking-activity-events branch from 338fb1c to f81f662 Compare August 7, 2026 15:22
@fiosman
fiosman force-pushed the feat/account-tracking-activity-events branch from f81f662 to 8d2ae9b Compare August 7, 2026 15:41
Comment thread packages/insomnia-api/src/user.ts
@fiosman fiosman changed the title feat: track user activity events for request/document actions feat: add user activity events for request/document actions Aug 7, 2026
@fiosman fiosman changed the title feat: add user activity events for request/document actions feat: add enterprise user activity events for request/document actions Aug 7, 2026
@fiosman
fiosman requested a review from Ali-Sab August 7, 2026 21:57
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.

3 participants