You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Chore: remove dead Segment analytics code (#762)
## Summary
The Segment analytics module (`packages/main/src/logging/analytics.ts`)
has been orphaned since the Vue → React migration in #579. The exported
`initAnalyticsEventHandling`, `trackEvent`, and `trackPage` functions
are not called anywhere in the current codebase — verified via
exhaustive grep across `.ts`, `.tsx`, and `.js` files in
`packages/main`, `packages/preload`, and `packages/renderer`.
The previous call site was in `src/ui/components/app/MainContent.vue`,
which was deleted as part of the migration. The React replacement never
re-wired the analytics call.
This PR removes the dead module and its supporting infrastructure:
- Deletes `packages/main/src/logging/analytics.ts` (70 lines)
- Removes `analytics-node`, `@types/analytics-node`, and
`node-machine-id` from `package.json`
- Removes `VITE_SEGMENT_WRITE_KEY` from the env type definition and the
release workflow
Sentry remains in place — it is still wired up for the user-initiated
"Report a problem" flow.
## Follow-ups (out of scope for this PR)
- The `SEGMENT_WRITE_KEY` GitHub Actions secret can now be deleted from
repository settings.
- The corresponding Segment source can be archived.
## Test plan
- [x] `yarn typecheck` passes
- [x] `yarn build` passes
- [x] `yarn test:main`, `yarn test:preload`, `yarn test:renderer` pass
(54 tests)
- [x] App launches cleanly via direct Electron run
(`./node_modules/.bin/electron .`) — clean log, no errors
Note: `yarn test:e2e` fails on this branch, but it also fails on
`master` — pre-existing, unrelated to this change.
🤖 Generated with [Claude Code](https://claude.com/claude-code)