Skip to content

Desktop telemetry: include which app in app_connect/app_disconnect - #979

Merged
kotevcode merged 2 commits into
mainfrom
feat/telemetry-app-connect-name
Sep 2, 2026
Merged

Desktop telemetry: include which app in app_connect/app_disconnect#979
kotevcode merged 2 commits into
mainfrom
feat/telemetry-app-connect-name

Conversation

@kotevcode

Copy link
Copy Markdown
Contributor

Summary

The user_action PostHog event for app_connect / app_disconnect now carries an app property saying which app was connected or disconnected.

  • Fixed local taxonomy (TELEMETRY_APP_NAMES in shared/telemetry.ts): the packaged profile names (opencode, codex, claude-desktop, hermes, droid, t3code, pi, gooeypi, crush, goose, zed) plus telegram; anything else — user-added custom apps — normalizes to custom, so raw app names never leave the device, in line with the telemetry allowlisting rules.
  • The property flows renderer → IPC (validated against the taxonomy) → telemetry service → PostHog, and is added to the user_action sanitize allowlist. The pending-action dedup key includes the app, so connecting two different apps in quick succession emits both events.
  • Better attribution: the connect event moved from startProfiles (which also runs on profile switches and custom-app removal restarts, emitting spurious app_connect) to connectProfile/connectApp where the specific app is known. Single-app disconnects now emit app_disconnect with the app; full disconnect keeps the un-attributed event.
  • Call sites covered: Apps page connect/disconnect/remove, Home one-click connect, Telegram bot card.

Testing

  • New main-process test: app names ride along per event, distinct apps aren't coalesced, non-app actions carry no app property.
  • pnpm run test in apps/desktop (main + 350 renderer tests) and pnpm run typecheck:renderer pass.

CHANGELOG.md updated.

@kotevcode
kotevcode merged commit 865c770 into main Sep 2, 2026
4 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